app/views/my_accounts/edit.html.erb in enju_leaf-1.1.0.rc12 vs app/views/my_accounts/edit.html.erb in enju_leaf-1.1.0.rc13

- old
+ new

@@ -1,73 +1,33 @@ <div id="content_detail" class="ui-corner-all ui-widget-content"> -<h1 class="title"><%= t('page.edit_user_profile', :login_name => @user.username) -%></h1> +<h1 class="title"><%= t('page.edit_user_profile', login_name: @profile.user.username) -%></h1> <div id="content_list"> <%= render 'page/required_field' %> -<%= simple_form_for(@user, :url => my_account_path) do |f| -%> +<%= simple_form_for(@profile, url: my_account_path) do |f| -%> <%= f.error_messages -%> - <%= render :partial => 'edit_credential', :locals => {:f => f, :user => @user} -%> + <%= render partial: 'edit_credential', locals: {f: f, profile: @profile} -%> <div class="actions"> <%= f.submit %> </div> <div style="clear: both"> <div class="field"> <%= f.label :keyword_list -%><br /> - <%= f.text_area :keyword_list, :class => 'resource_textarea' -%> + <%= f.text_area :keyword_list, class: 'resource_textarea' -%> </div> - <% if defined?(EnjuCirculation) %> - <div class="field"> - <%= f.label t('user.checkout_history_icalendar_url') -%><br /> - <div id="feed_token"> - <%- if @user.checkout_icalendar_token? -%> - <%= link_to checkouts_url(:icalendar_token => @user.checkout_icalendar_token, :format => :ics), checkouts_url(:icalendar_token => @user.checkout_icalendar_token, :format => :ics) -%> - <%= f.hidden_field :checkout_icalendar_token -%> - <%- end -%> - <br /> - <input onclick="$.ajax({data:'authenticity_token=' + encodeURIComponent('<%= form_authenticity_token %>'), success:function(request){$('#feed_token').html(request);}, type:'get', url:'<%= edit_my_account_path(:mode => 'feed_token') %>'});" type="button" value="<%= t('page.reset') %>" /> - <input onclick="$.ajax({data:'authenticity_token=' + encodeURIComponent('<%= form_authenticity_token %>'), success:function(request){$('#feed_token').html(request);}, type:'get', url:'<%= edit_my_account_path(:disable => true, :mode => 'feed_token') %>'});" type="button" value="<%= t('page.delete') %>" /> - </div> - <br /> - </div> - <% end %> - - <% if defined?(EnjuSearchLog) %> - <div class="field"> - <%= f.check_box :save_search_history %> - <%= f.label :save_search_history %> - </div> - <% end %> - - <% if defined?(EnjuCirculation) %> - <div class="field"> - <%= f.check_box :save_checkout_history %> - <%= f.label :save_checkout_history %> - </div> - <% end %> - - <% if current_user.has_role?('Librarian') %> - <div class="field"> - <%= f.label :note -%><br /> - <%= f.text_area :note, :class => 'resource_textarea' -%> - </div> - <% end %> - - <div class="actions"> - <%= f.submit %> - </div> - + <%= render partial: 'profiles/edit_profile', locals: {f: f, profile: @profile} -%> </div> <%- end -%> </div> </div> <div id="submenu" class="ui-corner-all ui-widget-content"> <ul> <li><%= link_to t('page.show'), my_account_path -%></li> <% if current_user.has_role?('Librarian') %> - <li><%= link_to t('page.listing', :model => t('activerecord.models.user')), users_path -%></li> + <li><%= link_to t('page.listing', model: t('activerecord.models.user')), profiles_path -%></li> <% end %> </ul> </div>