diff --git a/app/models/project.rb b/app/models/project.rb index ca80d90f8..668e243c9 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -114,8 +114,8 @@ class Project < ActiveRecord::Base validates_presence_of :name, :identifier validates_uniqueness_of :identifier validates_uniqueness_of :name - validates_associated :repository, :wiki - # validates_length_of :description, :maximum => 255 + validates_associated :wiki#, :repository + # validates_length_of :description, :maximum => 255 validates_length_of :name, :maximum => 255 validates_length_of :homepage, :maximum => 255 validates_length_of :identifier, :in => 1..IDENTIFIER_MAX_LENGTH diff --git a/app/views/members/create.js.erb b/app/views/members/create.js.erb index 3b01980ad..35280b7a4 100644 --- a/app/views/members/create.js.erb +++ b/app/views/members/create.js.erb @@ -12,7 +12,11 @@ hideOnLoad(); $("#member-<%= member.id %>").effect("highlight"); <% end %> <% else %> - <% errors = @members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ') %> - alert('<%= raw(escape_javascript(l(:notice_failed_to_save_members, :errors => errors))) %>'); + <% if @members %> + <% errors = @members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ')%> + alert('<%= raw(escape_javascript(l(:notice_failed_to_save_members, :errors => errors || ''))) %>'); + <% else%> +// alert(''); + <% end%> <% end %> <% end %> diff --git a/app/views/projects/settings/_members.html.erb b/app/views/projects/settings/_members.html.erb index 25f02da0d..9c9c64bd1 100644 --- a/app/views/projects/settings/_members.html.erb +++ b/app/views/projects/settings/_members.html.erb @@ -14,8 +14,12 @@
<%= l(:label_user) %> | -<%= l(:label_role_plural) %> | ++ <%= l(:label_user) %> + | ++ <%= l(:label_role_plural) %> + | <%= call_hook(:view_projects_settings_members_table_header, :project => @project) %> |
---|---|---|---|---|
<%= link_to_user member.principal %> | ++ <%= link_to_user member.principal %> + |
-
- <%= h member.roles.sort.collect(&:to_s).join(', ') %>
-
+
+ <%= h member.roles.sort.collect(&:to_s).join(', ') %>
+
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
:method => :put,
:html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}}
) do |f| %>
-
<% roles.each do |role| %>
<%= submit_tag l(:button_change), :class => "small" %> + + <%= submit_tag l(:button_change), :class => "small" %> <%= link_to_function l(:button_cancel), "$('#member-#{member.id}-roles').show(); $('#member-#{member.id}-roles-form').hide(); return false;" - %> + %> + <% end %> |
@@ -77,7 +85,9 @@
<%= l(:label_no_data) %>
++ <%= l(:label_no_data) %> +
<% end %> @@ -87,20 +97,25 @@