user new interface 70%

This commit is contained in:
Matthew K. Fu JuYuan authored and chris committed 2012-10-09 06:40:18 +08:00
1 parent 1aacf5e2ce
commit 9f825de288
20 files changed
+589 -52

No files matched your search

@@ -10,13 +10,15 @@
<% end %>
<td class='select_type'>
<%= f.select :markup, LIST[:markups], {}, {:style => "width:90px"} %>
<div <%= attribute_field[:markup].eql?('select') ? nil : "style='display:none'"%>>
<%= t('admin.options') %>:
<%= f.select "select_list_options", {'1'=>"A",'2'=>"B",'3'=>"C"}, :style => "width:130px" %>
<%#= collection_select(:select_list_options, method, collection, value_method, text_method, options = {}, html_options = {}) %>
<ul>
<li><%= f.select :markup, LIST[:markups], {}, {:style => "width:90px"} %> </li>
<li><%= f.check_box :locale %><%= label_tag "Locale" %> </li>
<li><%= attribute_field[:markup].eql?('select') ? nil : "style='display:none'"%> </li>
<li><%= t('admin.options') %>: <%= f.text_field :markup_value%></li>
</ul>
</div>
</td>
<td class="action">
<% if attribute_field.new_record? %>
@@ -0,0 +1,19 @@
<div class="user-info">
<div class="user-avatar pull-left">
<p class="reflective"></p>
<% if @user.avatar? %>
<%= image_tag(@user.avatar.thumb.url) %>
<% else %>
<%= image_tag "person.png" %>
<% end %>
<%= file_field_tag 'file' %>
<%= hidden_field_tag :avatar_cache %>
</div>
<label>
<%= f.check_box :admin %>
<span><%= t('admin.admin') %>:</span>
</label>
</div>
<%= render :partial=>"infos"%>
@@ -0,0 +1,14 @@
<div class="map-block back">
<h4><span><%= info.title %></span></h4>
<div class="form-horizontal">
<% info.attribute_fields.each do |af|%>
<div class="control-group">
<%= af.block_helper(@user,@form_index)%>
</div>
<% @form_index = @form_index +1 %>
<% end %>
</div>
</div>
@@ -0,0 +1,4 @@
<!--<span><%#= t('admin.email') %>:</span> -->
<%#= f.text_field :email, :onfocus => "this.value='';", :onblur => "if(this.value==''){this.value=#{t('admin.email')};}", :value => (@user.email.blank? ? t('admin.email') : @user.email), :class => 'user_mail' %>
<%=render :partial=>"info",:collection=>Info.all%>
@@ -0,0 +1,31 @@
<div id="person" class="clear">
<% if @user.avatar? %>
<%= image_tag(@user.avatar.thumb.url) %>
<% else %>
<%= image_tag "person.png" %>
<% end %>
<%= file_field_tag 'file' %>
<%= hidden_field_tag :avatar_cache %>
<label>
<span><%= t('admin.email') %>:</span>
<%= f.text_field :email, :onfocus => "this.value='';", :onblur => "if(this.value==''){this.value=#{t('admin.email')};}", :value => (@user.email.blank? ? t('admin.email') : @user.email), :class => 'user_mail' %>
</label>
<label>
<%= f.check_box :admin %>
<span><%= t('admin.admin') %>:</span>
</label>
<label>
</label>
<table>
<tr>
<%=render :partial=>"temp_profile",:collection=>Info.all%>
<tr>
<tr> <span><%= t('admin.role') %>:</span> </tr>
<tr>
<%= render :partial=>"temp_sub_role_from",:collection=>@user.sub_roles %>
</tr>
</table>
</div>
@@ -0,0 +1,9 @@
<td>
<%= temp_profile.title %>
<% temp_profile.attribute_fields.each do |af|%>
<div class="control-group">
<%= af.block_helper(@user,@form_index)%>
</div>
<% @form_index = @form_index +1 %>
<% end %>
</td>
@@ -0,0 +1,10 @@
<td>
<%= temp_sub_role_from.title%>
<ul>
<% temp_sub_role_from.attribute_fields.each do |af| %>
<li><%= af.block_helper(@user,@form_index) %></li>
<% @form_index = @form_index +1 %>
<% end %>
</ul>
</td>
@@ -0,0 +1,24 @@
<% content_for :page_specific_css do -%>
<%= stylesheet_link_tag "member" %>
<%= stylesheet_link_tag "site-map" %>
<%= stylesheet_link_tag "isotope" %>
<% end -%>
<% content_for :page_specific_javascript do -%>
<%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %>
<%= javascript_include_tag "inc/modal-preview" %>
<%= javascript_include_tag "lib/contenteditable" %>
<% end -%>
<%= content_tag :div,:class=>"user-role site-map" do%>
<%= form_for @user, :url => admin_users_new_interface_path(@user), :html => { :multipart => true } do |f| %>
<%= f.error_messages %>
<%= render :partial => 'form', :locals => { :f => f } %>
<div class="button_bar">
<%= link_back %>
<%= link_to t('update'), "#", :onclick=>"$('#edit_user_#{@user.id}').submit()" %>
</div>
<% end -%>
<% end -%>
@@ -34,6 +34,7 @@
<p class="user-mail">
<%= @user.email %>
</p>
<%= link_to "<i class='icon-pencil'></i>TempEdit".html_safe,temp_edit_admin_users_new_interface_path(@user),:class=>"btn btn-small"%>
<button class="btn btn-small"><i class="icon-pencil"></i> <%= t("admin.edit")%></button>
</div>
<div class="user-roles my_scroll">
@@ -0,0 +1,23 @@
<% content_for :page_specific_css do -%>
<%= stylesheet_link_tag "member" %>
<%= stylesheet_link_tag "site-map" %>
<%= stylesheet_link_tag "isotope" %>
<% end -%>
<% content_for :page_specific_javascript do -%>
<%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %>
<%= javascript_include_tag "inc/modal-preview" %>
<%= javascript_include_tag "lib/contenteditable" %>
<% end -%>
<%= content_tag :div,:class=>"user-role site-map" do%>
<%= form_for @user, :url => admin_users_new_interface_path(@user), :html => { :multipart => true } do |f| %>
<%= f.error_messages %>
<%= render :partial => 'temp_form', :locals => { :f => f } %>
<div class="button_bar">
<%= link_back %>
<%= link_to t('update'), "#", :onclick=>"$('#edit_user_#{@user.id}').submit()" %>
</div>
<% end -%>
<% end -%>