From f1aca94a30b6b4c63714de769564f99103b37413 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 24 Nov 2014 15:03:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=81=E5=B8=88=E9=85=8D=E7=BD=AE=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E6=97=B6=E6=88=90=E5=91=98=E5=88=97=E8=A1=A8=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/settings/_members.html.erb | 51 +++++++++++++++----- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/app/views/courses/settings/_members.html.erb b/app/views/courses/settings/_members.html.erb index e73e9cf7b..c76f1c48e 100644 --- a/app/views/courses/settings/_members.html.erb +++ b/app/views/courses/settings/_members.html.erb @@ -20,8 +20,10 @@ <% members.each do |member| %> <% next if member.new_record? %> - <%= link_to_user member.principal %> - + + <%= link_to_user member.principal %> + + <%= h member.roles.sort.collect(&:to_s).join(', ') %> @@ -31,9 +33,14 @@ ) do |f| %>

<% roles.each do |role| %> -
- <% end %>

+ +
+ <% end %> +

<%= hidden_field_tag 'membership[role_ids][]', '' %>

<%= submit_tag l(:button_change), :class => "small" %> <%= link_to_function l(:button_cancel), @@ -43,7 +50,9 @@ <% if member.roles.first.to_s == "Manager" %> - + + + <% else %> <%= link_to_function l(:button_edit), @@ -61,7 +70,9 @@ <% else %> -

<%= l(:label_no_data) %>

+

+ <%= l(:label_no_data) %> +

<% end %> @@ -69,9 +80,14 @@ <% if roles.any? %> <%= form_for(@member, {:as => :membership, :url => course_memberships_path(@course), :remote => true, :method => :post}) do |f| %>
- <%= l(:label_member_new) %> + + <%= l(:label_member_new) %> + -

<%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %>

+

+ <%= label_tag "principal_search", l(:label_principal_search) %> + <%= text_field_tag 'principal_search', nil %> +

<%= javascript_tag "observeSearchfield('principal_search', null, '#{ escape_javascript autocomplete_course_memberships_path(@course, :format => 'js') }')" %>
@@ -83,13 +99,22 @@ <% roles.each do |role| %> <% if role.id == 10 %> - + <% else %> - + <% end %> - <% end %>

+ <% end %> +

-

<%= submit_tag l(:button_add), :id => 'member-add-submit' %>

+

+ <%= submit_tag l(:button_add), :id => 'member-add-submit' %> +

<% end %> <% end %>