don't invite existing users; some polish

pull/3480/head
Markus Kahl 9 years ago
parent fecb1b91b7
commit 0f3a34f703
  1. 3
      app/views/members/autocomplete_for_member.json.erb
  2. 2
      app/views/members/index.html.erb
  3. 5
      app/views/members/new.html.erb
  4. 3
      config/locales/en.yml

@ -36,7 +36,8 @@ See doc/COPYRIGHT.rdoc for more details.
{
"results":
{
<% email = params[:q] =~ /.+@.+/ %>
<%# Offer to invite via email unless it's one of the found user's addresses already. #%>
<% email = params[:q] =~ /.+@.+/ && @principals.none? { |p| p.mail == params[:q] } %>
"items":[
<% @principals.each_with_index do |principal, ix| %>
{

@ -104,7 +104,7 @@ See doc/COPYRIGHT.rdoc for more details.
<%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %>
<td class="buttons">
<%= link_to_function l(:button_edit), "$('member-#{member.id}-roles').hide(); $('member-#{member.id}-roles-form').show(); return false;", :class => 'icon icon-edit' %>
<%= link_to(l(:button_delete), {:controller => '/members', :action => 'destroy', :id => member, :page => params[:page]},
<%= link_to(l(:button_remove), {:controller => '/members', :action => 'destroy', :id => member, :page => params[:page]},
:method => :delete,
data: { confirm: ((!User.current.admin? && member.include?(User.current)) ? l(:text_own_membership_delete_confirmation) : nil) },
:title => l(:button_delete), :class => 'icon icon-delete') if member.deletable? %>

@ -37,6 +37,9 @@ See doc/COPYRIGHT.rdoc for more details.
:roles => @roles } %>
<% else %>
No roles defined.
<p>
<%= @roles.any? ? I18n.t('text_no_more_users_to_add') : I18n.t('text_no_roles_defined') %>
</p>
<%= link_to I18n.t('button_back'), :back, class: 'button' %>
<% end %>
</div>

@ -391,6 +391,7 @@ en:
button_move: "Move"
button_move_and_follow: "Move and follow"
button_quote: "Quote"
button_remove: Remove
button_remove_widget: "Remove widget"
button_rename: "Rename"
button_reply: "Reply"
@ -1569,6 +1570,8 @@ en:
text_line_separated: "Multiple values allowed (one line for each value)."
text_load_default_configuration: "Load the default configuration"
text_min_max_length_info: "0 means no restriction"
text_no_more_users_to_add: There are no more users to be added.
text_no_roles_defined: There are no roles defined.
text_no_configuration_data: "Roles, types, work package statuses and workflow have not been configured yet.\nIt is highly recommended to load the default configuration. You will be able to modify it once loaded."
text_no_notes: "There are no comments available for this work package."
text_notice_too_many_values_are_inperformant: "Note: Displaying more than 100 items per page can increase the page load time."

Loading…
Cancel
Save