Orbit/app/views/admin/users_new_interface/_form.html.erb

69 lines
2.4 KiB
Plaintext
Raw Normal View History

2012-10-08 08:58:33 +00:00
<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 %>
Merge branch 'various_bugs' into nccu_master Conflicts: Gemfile.lock app/assets/javascripts/ajax_form.js.erb app/assets/stylesheets/style.css.erb app/controllers/application_controller.rb app/controllers/sessions_controller.rb app/helpers/admin/web_link_helper.rb app/views/admin/attributes/_attribute_field.html.erb app/views/admin/designs/_form.html.erb app/views/admin/pages/_form.html.erb app/views/admin/sites/_side_bar.html.erb app/views/layouts/_orbit_bar.html.erb app/views/layouts/_side_bar.html.erb config/locales/en.yml config/locales/zh_tw.yml config/mongoid.yml vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/index.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_status.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_news_bulletin.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/index.html.erb vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/index.html.erb
2012-10-29 08:10:07 +00:00
<span><%= t(:admin) %></span>
2012-10-08 08:58:33 +00:00
</label>
</div>
<%= render :partial=>"infos"%>
<%= render :partial=>"roles"%>
2012-10-18 10:36:21 +00:00
<% content_for :page_specific_javascript do -%>
<script>
2012-11-08 10:59:19 +00:00
var CloneTarget ;
var NewNode;
$(document).ready(function(){
function checkMultipleInput() {
$(".multipleInput").each(function(i) {
$(this).find('.tabbable').length==1 ? $(this).addClass("plural") : $(this).removeClass("plural")
});
}
2012-11-08 10:59:19 +00:00
function removeInput(){
$(".removeInput").live('click',function (){
$(this).parents(".tabbable").remove();
checkMultipleInput();
return false;
});
}
2012-11-08 10:59:19 +00:00
checkMultipleInput();
removeInput();
$(".help-block a").live('click',function (){
CloneTarget = $(this).parents(".controls").find(".tabbable:last");
NewNode = CloneTarget.clone();
var index;
NewNode.find("input").each(function(k,v){
index = CloneTarget.parents("div.control-group").find(".list_count").val();
field_name = CloneTarget.parents("div.control-group").find(".field_name").val();
ori_str = $(v).attr("name").replace(field_name,"");
lang = ori_str.match(/\[\D*\]/);
new_field_name = (field_name+"[" + (parseInt(index)+1) + "]" + lang);
$(v).attr("name",new_field_name);
$(v).val("");
})
$(this).parents("div.control-group").find(".list_count").val(parseInt(index)+1)
$(this).parents(".controls").find(".tabbable:last").after(NewNode);
removeInput();
// checkMultipleInput();
return false;
})
});
2012-11-08 10:59:19 +00:00
</script>
2012-10-18 10:36:21 +00:00
</script>
<% end -%>