##// END OF EJS Templates
Adds a user search field with autocompleter on project members screen....
Jean-Philippe Lang -
r2549:04e181b8b05d
parent child
Show More
@@ -0,0 +1,5
1 <ul>
2 <% @users.each do |user| -%>
3 <li><%= h user.login %><span class="informal"> (<%= h(user.name(:lastname_coma_firstname)) %>)</span></li>
4 <% end -%>
5 </ul>
@@ -1,77 +1,84
1 # redMine - project management software
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 class MembersController < ApplicationController
18 class MembersController < ApplicationController
19 before_filter :find_member, :except => :new
19 before_filter :find_member, :except => [:new, :autocomplete_for_member_login]
20 before_filter :find_project, :only => :new
20 before_filter :find_project, :only => [:new, :autocomplete_for_member_login]
21 before_filter :authorize
21 before_filter :authorize
22
22
23 def new
23 def new
24 members = []
24 members = []
25 if params[:member] && request.post?
25 if params[:member] && request.post?
26 attrs = params[:member].dup
26 attrs = params[:member].dup
27 if (user_ids = attrs.delete(:user_ids))
27 if (user_ids = attrs.delete(:user_ids))
28 user_ids.each do |user_id|
28 user_ids.each do |user_id|
29 members << Member.new(attrs.merge(:user_id => user_id))
29 members << Member.new(attrs.merge(:user_id => user_id))
30 end
30 end
31 else
31 else
32 members << Member.new(attrs)
32 members << Member.new(attrs)
33 end
33 end
34 @project.members << members
34 @project.members << members
35 end
35 end
36 respond_to do |format|
36 respond_to do |format|
37 format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project }
37 format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project }
38 format.js {
38 format.js {
39 render(:update) {|page|
39 render(:update) {|page|
40 page.replace_html "tab-content-members", :partial => 'projects/settings/members'
40 page.replace_html "tab-content-members", :partial => 'projects/settings/members'
41 members.each {|member| page.visual_effect(:highlight, "member-#{member.id}") }
41 members.each {|member| page.visual_effect(:highlight, "member-#{member.id}") }
42 }
42 }
43 }
43 }
44 end
44 end
45 end
45 end
46
46
47 def edit
47 def edit
48 if request.post? and @member.update_attributes(params[:member])
48 if request.post? and @member.update_attributes(params[:member])
49 respond_to do |format|
49 respond_to do |format|
50 format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project }
50 format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project }
51 format.js { render(:update) {|page| page.replace_html "tab-content-members", :partial => 'projects/settings/members'} }
51 format.js { render(:update) {|page| page.replace_html "tab-content-members", :partial => 'projects/settings/members'} }
52 end
52 end
53 end
53 end
54 end
54 end
55
55
56 def destroy
56 def destroy
57 @member.destroy
57 @member.destroy
58 respond_to do |format|
58 respond_to do |format|
59 format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project }
59 format.html { redirect_to :controller => 'projects', :action => 'settings', :tab => 'members', :id => @project }
60 format.js { render(:update) {|page| page.replace_html "tab-content-members", :partial => 'projects/settings/members'} }
60 format.js { render(:update) {|page| page.replace_html "tab-content-members", :partial => 'projects/settings/members'} }
61 end
61 end
62 end
62 end
63
64 def autocomplete_for_member_login
65 @users = User.active.find(:all, :conditions => ["LOWER(login) LIKE ? OR LOWER(firstname) LIKE ? OR LOWER(lastname) LIKE ?", "#{params[:user]}%", "#{params[:user]}%", "#{params[:user]}%"],
66 :limit => 10,
67 :order => 'login ASC') - @project.users
68 render :layout => false
69 end
63
70
64 private
71 private
65 def find_project
72 def find_project
66 @project = Project.find(params[:id])
73 @project = Project.find(params[:id])
67 rescue ActiveRecord::RecordNotFound
74 rescue ActiveRecord::RecordNotFound
68 render_404
75 render_404
69 end
76 end
70
77
71 def find_member
78 def find_member
72 @member = Member.find(params[:id])
79 @member = Member.find(params[:id])
73 @project = @member.project
80 @project = @member.project
74 rescue ActiveRecord::RecordNotFound
81 rescue ActiveRecord::RecordNotFound
75 render_404
82 render_404
76 end
83 end
77 end
84 end
@@ -1,42 +1,52
1 # redMine - project management software
1 # redMine - project management software
2 # Copyright (C) 2006 Jean-Philippe Lang
2 # Copyright (C) 2006 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 class Member < ActiveRecord::Base
18 class Member < ActiveRecord::Base
19 belongs_to :user
19 belongs_to :user
20 belongs_to :role
20 belongs_to :role
21 belongs_to :project
21 belongs_to :project
22
22
23 validates_presence_of :role, :user, :project
23 validates_presence_of :role, :user, :project
24 validates_uniqueness_of :user_id, :scope => :project_id
24 validates_uniqueness_of :user_id, :scope => :project_id
25
25
26 def validate
26 def validate
27 errors.add :role_id, :invalid if role && !role.member?
27 errors.add :role_id, :invalid if role && !role.member?
28 end
28 end
29
29
30 def name
30 def name
31 self.user.name
31 self.user.name
32 end
32 end
33
33
34 # Sets user by login
35 def user_login=(login)
36 login = login.to_s
37 unless login.blank?
38 if (u = User.find_by_login(login))
39 self.user = u
40 end
41 end
42 end
43
34 def <=>(member)
44 def <=>(member)
35 role == member.role ? (user <=> member.user) : (role <=> member.role)
45 role == member.role ? (user <=> member.user) : (role <=> member.role)
36 end
46 end
37
47
38 def before_destroy
48 def before_destroy
39 # remove category based auto assignments for this member
49 # remove category based auto assignments for this member
40 IssueCategory.update_all "assigned_to_id = NULL", ["project_id = ? AND assigned_to_id = ?", project.id, user.id]
50 IssueCategory.update_all "assigned_to_id = NULL", ["project_id = ? AND assigned_to_id = ?", project.id, user.id]
41 end
51 end
42 end
52 end
@@ -1,59 +1,66
1 <%= error_messages_for 'member' %>
1 <%= error_messages_for 'member' %>
2 <% roles = Role.find_all_givable %>
2 <% roles = Role.find_all_givable
3 <% users = User.active.find(:all).sort - @project.users %>
4 <% # members sorted by role position
5 members = @project.members.find(:all, :include => [:role, :user]).sort %>
3 members = @project.members.find(:all, :include => [:role, :user]).sort %>
6
4
7 <div class="splitcontentleft">
5 <div class="splitcontentleft">
8 <% if members.any? %>
6 <% if members.any? %>
9 <table class="list">
7 <table class="list">
10 <thead>
8 <thead>
11 <th><%= l(:label_user) %></th>
9 <th><%= l(:label_user) %></th>
12 <th><%= l(:label_role) %></th>
10 <th><%= l(:label_role) %></th>
13 <th style="width:15%"></th>
11 <th style="width:15%"></th>
14 <%= call_hook(:view_projects_settings_members_table_header, :project => @project) %>
12 <%= call_hook(:view_projects_settings_members_table_header, :project => @project) %>
15 </thead>
13 </thead>
16 <tbody>
14 <tbody>
17 <% members.each do |member| %>
15 <% members.each do |member| %>
18 <% next if member.new_record? %>
16 <% next if member.new_record? %>
19 <tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %>">
17 <tr id="member-<%= member.id %>" class="<%= cycle 'odd', 'even' %>">
20 <td><%=h member.name %></td>
18 <td><%=h member.name %></td>
21 <td align="center">
19 <td align="center">
22 <% if authorize_for('members', 'edit') %>
20 <% if authorize_for('members', 'edit') %>
23 <% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member}, :method => :post) do |f| %>
21 <% remote_form_for(:member, member, :url => {:controller => 'members', :action => 'edit', :id => member}, :method => :post) do |f| %>
24 <%= f.select :role_id, roles.collect{|role| [role.name, role.id]}, {}, :class => "small" %>
22 <%= f.select :role_id, roles.collect{|role| [role.name, role.id]}, {}, :class => "small" %>
25 <%= submit_tag l(:button_change), :class => "small" %>
23 <%= submit_tag l(:button_change), :class => "small" %>
26 <% end %>
24 <% end %>
27 <% end %>
25 <% end %>
28 </td>
26 </td>
29 <td align="center">
27 <td align="center">
30 <%= link_to_remote l(:button_delete), { :url => {:controller => 'members', :action => 'destroy', :id => member},
28 <%= link_to_remote l(:button_delete), { :url => {:controller => 'members', :action => 'destroy', :id => member},
31 :method => :post
29 :method => :post
32 }, :title => l(:button_delete),
30 }, :title => l(:button_delete),
33 :class => 'icon icon-del' %>
31 :class => 'icon icon-del' %>
34 </td>
32 </td>
35 <%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %>
33 <%= call_hook(:view_projects_settings_members_table_row, { :project => @project, :member => member}) %>
36 </tr>
34 </tr>
37 </tbody>
35 </tbody>
38 <% end; reset_cycle %>
36 <% end; reset_cycle %>
39 </table>
37 </table>
40 <% else %>
38 <% else %>
41 <p class="nodata"><%= l(:label_no_data) %></p>
39 <p class="nodata"><%= l(:label_no_data) %></p>
42 <% end %>
40 <% end %>
43 </div>
41 </div>
44
42
43
44 <% users_count = User.active.count - @project.users.count
45 users = (users_count < 300) ? User.active.find(:all, :limit => 200).sort - @project.users : [] %>
46
45 <div class="splitcontentright">
47 <div class="splitcontentright">
46 <% if !users.empty? %>
48 <% if roles.any? && users_count > 0 %>
47 <% remote_form_for(:member, @member, :url => {:controller => 'members', :action => 'new', :id => @project}, :method => :post) do |f| %>
49 <% remote_form_for(:member, @member, :url => {:controller => 'members', :action => 'new', :id => @project}, :method => :post) do |f| %>
48 <fieldset><legend><%=l(:label_member_new)%></legend>
50 <fieldset><legend><%=l(:label_member_new)%></legend>
49 <div>
51 <p><%= text_field_tag 'member[user_login]', nil, :size => "40" %></p>
50 <% users.each do |user| -%>
52 <div id="member_user_login_choices" class="autocomplete">sqd</div>
51 <label><%= check_box_tag 'member[user_ids][]', user.id, false %> <%= user %></label>
53 <%= javascript_tag "new Ajax.Autocompleter('member_user_login', 'member_user_login_choices', '#{ url_for(:controller => 'members', :action => 'autocomplete_for_member_login', :id => @project) }', { minChars: 1, frequency: 0.5, paramName: 'user' });" %>
52 <% end -%>
54 <% unless users.empty? %>
53 </div>
55 <div>
56 <% users.each do |user| -%>
57 <label><%= check_box_tag 'member[user_ids][]', user.id, false %> <%= user %></label>
58 <% end -%>
59 </div>
60 <% end %>
54 <p><%= l(:label_role) %>: <%= f.select :role_id, roles.collect{|role| [role.name, role.id]}, :selected => nil %>
61 <p><%= l(:label_role) %>: <%= f.select :role_id, roles.collect{|role| [role.name, role.id]}, :selected => nil %>
55 <%= submit_tag l(:button_add) %></p>
62 <%= submit_tag l(:button_add) %></p>
56 </fieldset>
63 </fieldset>
57 <% end %>
64 <% end %>
58 <% end %>
65 <% end %>
59 </div>
66 </div>
@@ -1,163 +1,163
1 require 'redmine/access_control'
1 require 'redmine/access_control'
2 require 'redmine/menu_manager'
2 require 'redmine/menu_manager'
3 require 'redmine/activity'
3 require 'redmine/activity'
4 require 'redmine/mime_type'
4 require 'redmine/mime_type'
5 require 'redmine/core_ext'
5 require 'redmine/core_ext'
6 require 'redmine/themes'
6 require 'redmine/themes'
7 require 'redmine/hook'
7 require 'redmine/hook'
8 require 'redmine/plugin'
8 require 'redmine/plugin'
9 require 'redmine/wiki_formatting'
9 require 'redmine/wiki_formatting'
10
10
11 begin
11 begin
12 require_library_or_gem 'RMagick' unless Object.const_defined?(:Magick)
12 require_library_or_gem 'RMagick' unless Object.const_defined?(:Magick)
13 rescue LoadError
13 rescue LoadError
14 # RMagick is not available
14 # RMagick is not available
15 end
15 end
16
16
17 REDMINE_SUPPORTED_SCM = %w( Subversion Darcs Mercurial Cvs Bazaar Git Filesystem )
17 REDMINE_SUPPORTED_SCM = %w( Subversion Darcs Mercurial Cvs Bazaar Git Filesystem )
18
18
19 # Permissions
19 # Permissions
20 Redmine::AccessControl.map do |map|
20 Redmine::AccessControl.map do |map|
21 map.permission :view_project, {:projects => [:show, :activity]}, :public => true
21 map.permission :view_project, {:projects => [:show, :activity]}, :public => true
22 map.permission :search_project, {:search => :index}, :public => true
22 map.permission :search_project, {:search => :index}, :public => true
23 map.permission :edit_project, {:projects => [:settings, :edit]}, :require => :member
23 map.permission :edit_project, {:projects => [:settings, :edit]}, :require => :member
24 map.permission :select_project_modules, {:projects => :modules}, :require => :member
24 map.permission :select_project_modules, {:projects => :modules}, :require => :member
25 map.permission :manage_members, {:projects => :settings, :members => [:new, :edit, :destroy]}, :require => :member
25 map.permission :manage_members, {:projects => :settings, :members => [:new, :edit, :destroy, :autocomplete_for_member_login]}, :require => :member
26 map.permission :manage_versions, {:projects => [:settings, :add_version], :versions => [:edit, :destroy]}, :require => :member
26 map.permission :manage_versions, {:projects => [:settings, :add_version], :versions => [:edit, :destroy]}, :require => :member
27
27
28 map.project_module :issue_tracking do |map|
28 map.project_module :issue_tracking do |map|
29 # Issue categories
29 # Issue categories
30 map.permission :manage_categories, {:projects => [:settings, :add_issue_category], :issue_categories => [:edit, :destroy]}, :require => :member
30 map.permission :manage_categories, {:projects => [:settings, :add_issue_category], :issue_categories => [:edit, :destroy]}, :require => :member
31 # Issues
31 # Issues
32 map.permission :view_issues, {:projects => [:changelog, :roadmap],
32 map.permission :view_issues, {:projects => [:changelog, :roadmap],
33 :issues => [:index, :changes, :show, :context_menu],
33 :issues => [:index, :changes, :show, :context_menu],
34 :versions => [:show, :status_by],
34 :versions => [:show, :status_by],
35 :queries => :index,
35 :queries => :index,
36 :reports => :issue_report}, :public => true
36 :reports => :issue_report}, :public => true
37 map.permission :add_issues, {:issues => :new}
37 map.permission :add_issues, {:issues => :new}
38 map.permission :edit_issues, {:issues => [:edit, :reply, :bulk_edit]}
38 map.permission :edit_issues, {:issues => [:edit, :reply, :bulk_edit]}
39 map.permission :manage_issue_relations, {:issue_relations => [:new, :destroy]}
39 map.permission :manage_issue_relations, {:issue_relations => [:new, :destroy]}
40 map.permission :add_issue_notes, {:issues => [:edit, :reply]}
40 map.permission :add_issue_notes, {:issues => [:edit, :reply]}
41 map.permission :edit_issue_notes, {:journals => :edit}, :require => :loggedin
41 map.permission :edit_issue_notes, {:journals => :edit}, :require => :loggedin
42 map.permission :edit_own_issue_notes, {:journals => :edit}, :require => :loggedin
42 map.permission :edit_own_issue_notes, {:journals => :edit}, :require => :loggedin
43 map.permission :move_issues, {:issues => :move}, :require => :loggedin
43 map.permission :move_issues, {:issues => :move}, :require => :loggedin
44 map.permission :delete_issues, {:issues => :destroy}, :require => :member
44 map.permission :delete_issues, {:issues => :destroy}, :require => :member
45 # Queries
45 # Queries
46 map.permission :manage_public_queries, {:queries => [:new, :edit, :destroy]}, :require => :member
46 map.permission :manage_public_queries, {:queries => [:new, :edit, :destroy]}, :require => :member
47 map.permission :save_queries, {:queries => [:new, :edit, :destroy]}, :require => :loggedin
47 map.permission :save_queries, {:queries => [:new, :edit, :destroy]}, :require => :loggedin
48 # Gantt & calendar
48 # Gantt & calendar
49 map.permission :view_gantt, :issues => :gantt
49 map.permission :view_gantt, :issues => :gantt
50 map.permission :view_calendar, :issues => :calendar
50 map.permission :view_calendar, :issues => :calendar
51 # Watchers
51 # Watchers
52 map.permission :view_issue_watchers, {}
52 map.permission :view_issue_watchers, {}
53 map.permission :add_issue_watchers, {:watchers => :new}
53 map.permission :add_issue_watchers, {:watchers => :new}
54 end
54 end
55
55
56 map.project_module :time_tracking do |map|
56 map.project_module :time_tracking do |map|
57 map.permission :log_time, {:timelog => :edit}, :require => :loggedin
57 map.permission :log_time, {:timelog => :edit}, :require => :loggedin
58 map.permission :view_time_entries, :timelog => [:details, :report]
58 map.permission :view_time_entries, :timelog => [:details, :report]
59 map.permission :edit_time_entries, {:timelog => [:edit, :destroy]}, :require => :member
59 map.permission :edit_time_entries, {:timelog => [:edit, :destroy]}, :require => :member
60 map.permission :edit_own_time_entries, {:timelog => [:edit, :destroy]}, :require => :loggedin
60 map.permission :edit_own_time_entries, {:timelog => [:edit, :destroy]}, :require => :loggedin
61 end
61 end
62
62
63 map.project_module :news do |map|
63 map.project_module :news do |map|
64 map.permission :manage_news, {:news => [:new, :edit, :destroy, :destroy_comment]}, :require => :member
64 map.permission :manage_news, {:news => [:new, :edit, :destroy, :destroy_comment]}, :require => :member
65 map.permission :view_news, {:news => [:index, :show]}, :public => true
65 map.permission :view_news, {:news => [:index, :show]}, :public => true
66 map.permission :comment_news, {:news => :add_comment}
66 map.permission :comment_news, {:news => :add_comment}
67 end
67 end
68
68
69 map.project_module :documents do |map|
69 map.project_module :documents do |map|
70 map.permission :manage_documents, {:documents => [:new, :edit, :destroy, :add_attachment]}, :require => :loggedin
70 map.permission :manage_documents, {:documents => [:new, :edit, :destroy, :add_attachment]}, :require => :loggedin
71 map.permission :view_documents, :documents => [:index, :show, :download]
71 map.permission :view_documents, :documents => [:index, :show, :download]
72 end
72 end
73
73
74 map.project_module :files do |map|
74 map.project_module :files do |map|
75 map.permission :manage_files, {:projects => :add_file}, :require => :loggedin
75 map.permission :manage_files, {:projects => :add_file}, :require => :loggedin
76 map.permission :view_files, :projects => :list_files, :versions => :download
76 map.permission :view_files, :projects => :list_files, :versions => :download
77 end
77 end
78
78
79 map.project_module :wiki do |map|
79 map.project_module :wiki do |map|
80 map.permission :manage_wiki, {:wikis => [:edit, :destroy]}, :require => :member
80 map.permission :manage_wiki, {:wikis => [:edit, :destroy]}, :require => :member
81 map.permission :rename_wiki_pages, {:wiki => :rename}, :require => :member
81 map.permission :rename_wiki_pages, {:wiki => :rename}, :require => :member
82 map.permission :delete_wiki_pages, {:wiki => :destroy}, :require => :member
82 map.permission :delete_wiki_pages, {:wiki => :destroy}, :require => :member
83 map.permission :view_wiki_pages, :wiki => [:index, :special]
83 map.permission :view_wiki_pages, :wiki => [:index, :special]
84 map.permission :view_wiki_edits, :wiki => [:history, :diff, :annotate]
84 map.permission :view_wiki_edits, :wiki => [:history, :diff, :annotate]
85 map.permission :edit_wiki_pages, :wiki => [:edit, :preview, :add_attachment]
85 map.permission :edit_wiki_pages, :wiki => [:edit, :preview, :add_attachment]
86 map.permission :delete_wiki_pages_attachments, {}
86 map.permission :delete_wiki_pages_attachments, {}
87 map.permission :protect_wiki_pages, {:wiki => :protect}, :require => :member
87 map.permission :protect_wiki_pages, {:wiki => :protect}, :require => :member
88 end
88 end
89
89
90 map.project_module :repository do |map|
90 map.project_module :repository do |map|
91 map.permission :manage_repository, {:repositories => [:edit, :committers, :destroy]}, :require => :member
91 map.permission :manage_repository, {:repositories => [:edit, :committers, :destroy]}, :require => :member
92 map.permission :browse_repository, :repositories => [:show, :browse, :entry, :annotate, :changes, :diff, :stats, :graph]
92 map.permission :browse_repository, :repositories => [:show, :browse, :entry, :annotate, :changes, :diff, :stats, :graph]
93 map.permission :view_changesets, :repositories => [:show, :revisions, :revision]
93 map.permission :view_changesets, :repositories => [:show, :revisions, :revision]
94 map.permission :commit_access, {}
94 map.permission :commit_access, {}
95 end
95 end
96
96
97 map.project_module :boards do |map|
97 map.project_module :boards do |map|
98 map.permission :manage_boards, {:boards => [:new, :edit, :destroy]}, :require => :member
98 map.permission :manage_boards, {:boards => [:new, :edit, :destroy]}, :require => :member
99 map.permission :view_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true
99 map.permission :view_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true
100 map.permission :add_messages, {:messages => [:new, :reply, :quote]}
100 map.permission :add_messages, {:messages => [:new, :reply, :quote]}
101 map.permission :edit_messages, {:messages => :edit}, :require => :member
101 map.permission :edit_messages, {:messages => :edit}, :require => :member
102 map.permission :edit_own_messages, {:messages => :edit}, :require => :loggedin
102 map.permission :edit_own_messages, {:messages => :edit}, :require => :loggedin
103 map.permission :delete_messages, {:messages => :destroy}, :require => :member
103 map.permission :delete_messages, {:messages => :destroy}, :require => :member
104 map.permission :delete_own_messages, {:messages => :destroy}, :require => :loggedin
104 map.permission :delete_own_messages, {:messages => :destroy}, :require => :loggedin
105 end
105 end
106 end
106 end
107
107
108 Redmine::MenuManager.map :top_menu do |menu|
108 Redmine::MenuManager.map :top_menu do |menu|
109 menu.push :home, :home_path
109 menu.push :home, :home_path
110 menu.push :my_page, { :controller => 'my', :action => 'page' }, :if => Proc.new { User.current.logged? }
110 menu.push :my_page, { :controller => 'my', :action => 'page' }, :if => Proc.new { User.current.logged? }
111 menu.push :projects, { :controller => 'projects', :action => 'index' }, :caption => :label_project_plural
111 menu.push :projects, { :controller => 'projects', :action => 'index' }, :caption => :label_project_plural
112 menu.push :administration, { :controller => 'admin', :action => 'index' }, :if => Proc.new { User.current.admin? }, :last => true
112 menu.push :administration, { :controller => 'admin', :action => 'index' }, :if => Proc.new { User.current.admin? }, :last => true
113 menu.push :help, Redmine::Info.help_url, :last => true
113 menu.push :help, Redmine::Info.help_url, :last => true
114 end
114 end
115
115
116 Redmine::MenuManager.map :account_menu do |menu|
116 Redmine::MenuManager.map :account_menu do |menu|
117 menu.push :login, :signin_path, :if => Proc.new { !User.current.logged? }
117 menu.push :login, :signin_path, :if => Proc.new { !User.current.logged? }
118 menu.push :register, { :controller => 'account', :action => 'register' }, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
118 menu.push :register, { :controller => 'account', :action => 'register' }, :if => Proc.new { !User.current.logged? && Setting.self_registration? }
119 menu.push :my_account, { :controller => 'my', :action => 'account' }, :if => Proc.new { User.current.logged? }
119 menu.push :my_account, { :controller => 'my', :action => 'account' }, :if => Proc.new { User.current.logged? }
120 menu.push :logout, :signout_path, :if => Proc.new { User.current.logged? }
120 menu.push :logout, :signout_path, :if => Proc.new { User.current.logged? }
121 end
121 end
122
122
123 Redmine::MenuManager.map :application_menu do |menu|
123 Redmine::MenuManager.map :application_menu do |menu|
124 # Empty
124 # Empty
125 end
125 end
126
126
127 Redmine::MenuManager.map :admin_menu do |menu|
127 Redmine::MenuManager.map :admin_menu do |menu|
128 # Empty
128 # Empty
129 end
129 end
130
130
131 Redmine::MenuManager.map :project_menu do |menu|
131 Redmine::MenuManager.map :project_menu do |menu|
132 menu.push :overview, { :controller => 'projects', :action => 'show' }
132 menu.push :overview, { :controller => 'projects', :action => 'show' }
133 menu.push :activity, { :controller => 'projects', :action => 'activity' }
133 menu.push :activity, { :controller => 'projects', :action => 'activity' }
134 menu.push :roadmap, { :controller => 'projects', :action => 'roadmap' },
134 menu.push :roadmap, { :controller => 'projects', :action => 'roadmap' },
135 :if => Proc.new { |p| p.versions.any? }
135 :if => Proc.new { |p| p.versions.any? }
136 menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural
136 menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural
137 menu.push :new_issue, { :controller => 'issues', :action => 'new' }, :param => :project_id, :caption => :label_issue_new,
137 menu.push :new_issue, { :controller => 'issues', :action => 'new' }, :param => :project_id, :caption => :label_issue_new,
138 :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }
138 :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }
139 menu.push :news, { :controller => 'news', :action => 'index' }, :param => :project_id, :caption => :label_news_plural
139 menu.push :news, { :controller => 'news', :action => 'index' }, :param => :project_id, :caption => :label_news_plural
140 menu.push :documents, { :controller => 'documents', :action => 'index' }, :param => :project_id, :caption => :label_document_plural
140 menu.push :documents, { :controller => 'documents', :action => 'index' }, :param => :project_id, :caption => :label_document_plural
141 menu.push :wiki, { :controller => 'wiki', :action => 'index', :page => nil },
141 menu.push :wiki, { :controller => 'wiki', :action => 'index', :page => nil },
142 :if => Proc.new { |p| p.wiki && !p.wiki.new_record? }
142 :if => Proc.new { |p| p.wiki && !p.wiki.new_record? }
143 menu.push :boards, { :controller => 'boards', :action => 'index', :id => nil }, :param => :project_id,
143 menu.push :boards, { :controller => 'boards', :action => 'index', :id => nil }, :param => :project_id,
144 :if => Proc.new { |p| p.boards.any? }, :caption => :label_board_plural
144 :if => Proc.new { |p| p.boards.any? }, :caption => :label_board_plural
145 menu.push :files, { :controller => 'projects', :action => 'list_files' }, :caption => :label_attachment_plural
145 menu.push :files, { :controller => 'projects', :action => 'list_files' }, :caption => :label_attachment_plural
146 menu.push :repository, { :controller => 'repositories', :action => 'show' },
146 menu.push :repository, { :controller => 'repositories', :action => 'show' },
147 :if => Proc.new { |p| p.repository && !p.repository.new_record? }
147 :if => Proc.new { |p| p.repository && !p.repository.new_record? }
148 menu.push :settings, { :controller => 'projects', :action => 'settings' }, :last => true
148 menu.push :settings, { :controller => 'projects', :action => 'settings' }, :last => true
149 end
149 end
150
150
151 Redmine::Activity.map do |activity|
151 Redmine::Activity.map do |activity|
152 activity.register :issues, :class_name => %w(Issue Journal)
152 activity.register :issues, :class_name => %w(Issue Journal)
153 activity.register :changesets
153 activity.register :changesets
154 activity.register :news
154 activity.register :news
155 activity.register :documents, :class_name => %w(Document Attachment)
155 activity.register :documents, :class_name => %w(Document Attachment)
156 activity.register :files, :class_name => 'Attachment'
156 activity.register :files, :class_name => 'Attachment'
157 activity.register :wiki_edits, :class_name => 'WikiContent::Version', :default => false
157 activity.register :wiki_edits, :class_name => 'WikiContent::Version', :default => false
158 activity.register :messages, :default => false
158 activity.register :messages, :default => false
159 end
159 end
160
160
161 Redmine::WikiFormatting.map do |format|
161 Redmine::WikiFormatting.map do |format|
162 format.register :textile, Redmine::WikiFormatting::Textile::Formatter, Redmine::WikiFormatting::Textile::Helper
162 format.register :textile, Redmine::WikiFormatting::Textile::Formatter, Redmine::WikiFormatting::Textile::Helper
163 end
163 end
@@ -1,729 +1,759
1 body { font-family: Verdana, sans-serif; font-size: 12px; color:#484848; margin: 0; padding: 0; min-width: 900px; }
1 body { font-family: Verdana, sans-serif; font-size: 12px; color:#484848; margin: 0; padding: 0; min-width: 900px; }
2
2
3 h1, h2, h3, h4 { font-family: "Trebuchet MS", Verdana, sans-serif;}
3 h1, h2, h3, h4 { font-family: "Trebuchet MS", Verdana, sans-serif;}
4 h1 {margin:0; padding:0; font-size: 24px;}
4 h1 {margin:0; padding:0; font-size: 24px;}
5 h2, .wiki h1 {font-size: 20px;padding: 2px 10px 1px 0px;margin: 0 0 10px 0; border-bottom: 1px solid #bbbbbb; color: #444;}
5 h2, .wiki h1 {font-size: 20px;padding: 2px 10px 1px 0px;margin: 0 0 10px 0; border-bottom: 1px solid #bbbbbb; color: #444;}
6 h3, .wiki h2 {font-size: 16px;padding: 2px 10px 1px 0px;margin: 0 0 10px 0; border-bottom: 1px solid #bbbbbb; color: #444;}
6 h3, .wiki h2 {font-size: 16px;padding: 2px 10px 1px 0px;margin: 0 0 10px 0; border-bottom: 1px solid #bbbbbb; color: #444;}
7 h4, .wiki h3 {font-size: 13px;padding: 2px 10px 1px 0px;margin-bottom: 5px; border-bottom: 1px dotted #bbbbbb; color: #444;}
7 h4, .wiki h3 {font-size: 13px;padding: 2px 10px 1px 0px;margin-bottom: 5px; border-bottom: 1px dotted #bbbbbb; color: #444;}
8
8
9 /***** Layout *****/
9 /***** Layout *****/
10 #wrapper {background: white;}
10 #wrapper {background: white;}
11
11
12 #top-menu {background: #2C4056; color: #fff; height:1.8em; font-size: 0.8em; padding: 2px 2px 0px 6px;}
12 #top-menu {background: #2C4056; color: #fff; height:1.8em; font-size: 0.8em; padding: 2px 2px 0px 6px;}
13 #top-menu ul {margin: 0; padding: 0;}
13 #top-menu ul {margin: 0; padding: 0;}
14 #top-menu li {
14 #top-menu li {
15 float:left;
15 float:left;
16 list-style-type:none;
16 list-style-type:none;
17 margin: 0px 0px 0px 0px;
17 margin: 0px 0px 0px 0px;
18 padding: 0px 0px 0px 0px;
18 padding: 0px 0px 0px 0px;
19 white-space:nowrap;
19 white-space:nowrap;
20 }
20 }
21 #top-menu a {color: #fff; margin-right: 8px; font-weight: bold;}
21 #top-menu a {color: #fff; margin-right: 8px; font-weight: bold;}
22 #top-menu #loggedas { float: right; margin-right: 0.5em; color: #fff; }
22 #top-menu #loggedas { float: right; margin-right: 0.5em; color: #fff; }
23
23
24 #account {float:right;}
24 #account {float:right;}
25
25
26 #header {height:5.3em;margin:0;background-color:#507AAA;color:#f8f8f8; padding: 4px 8px 0px 6px; position:relative;}
26 #header {height:5.3em;margin:0;background-color:#507AAA;color:#f8f8f8; padding: 4px 8px 0px 6px; position:relative;}
27 #header a {color:#f8f8f8;}
27 #header a {color:#f8f8f8;}
28 #header h1 a.ancestor { font-size: 80%; }
28 #header h1 a.ancestor { font-size: 80%; }
29 #quick-search {float:right;}
29 #quick-search {float:right;}
30
30
31 #main-menu {position: absolute; bottom: 0px; left:6px; margin-right: -500px;}
31 #main-menu {position: absolute; bottom: 0px; left:6px; margin-right: -500px;}
32 #main-menu ul {margin: 0; padding: 0;}
32 #main-menu ul {margin: 0; padding: 0;}
33 #main-menu li {
33 #main-menu li {
34 float:left;
34 float:left;
35 list-style-type:none;
35 list-style-type:none;
36 margin: 0px 2px 0px 0px;
36 margin: 0px 2px 0px 0px;
37 padding: 0px 0px 0px 0px;
37 padding: 0px 0px 0px 0px;
38 white-space:nowrap;
38 white-space:nowrap;
39 }
39 }
40 #main-menu li a {
40 #main-menu li a {
41 display: block;
41 display: block;
42 color: #fff;
42 color: #fff;
43 text-decoration: none;
43 text-decoration: none;
44 font-weight: bold;
44 font-weight: bold;
45 margin: 0;
45 margin: 0;
46 padding: 4px 10px 4px 10px;
46 padding: 4px 10px 4px 10px;
47 }
47 }
48 #main-menu li a:hover {background:#759FCF; color:#fff;}
48 #main-menu li a:hover {background:#759FCF; color:#fff;}
49 #main-menu li a.selected, #main-menu li a.selected:hover {background:#fff; color:#555;}
49 #main-menu li a.selected, #main-menu li a.selected:hover {background:#fff; color:#555;}
50
50
51 #main {background-color:#EEEEEE;}
51 #main {background-color:#EEEEEE;}
52
52
53 #sidebar{ float: right; width: 17%; position: relative; z-index: 9; min-height: 600px; padding: 0; margin: 0;}
53 #sidebar{ float: right; width: 17%; position: relative; z-index: 9; min-height: 600px; padding: 0; margin: 0;}
54 * html #sidebar{ width: 17%; }
54 * html #sidebar{ width: 17%; }
55 #sidebar h3{ font-size: 14px; margin-top:14px; color: #666; }
55 #sidebar h3{ font-size: 14px; margin-top:14px; color: #666; }
56 #sidebar hr{ width: 100%; margin: 0 auto; height: 1px; background: #ccc; border: 0; }
56 #sidebar hr{ width: 100%; margin: 0 auto; height: 1px; background: #ccc; border: 0; }
57 * html #sidebar hr{ width: 95%; position: relative; left: -6px; color: #ccc; }
57 * html #sidebar hr{ width: 95%; position: relative; left: -6px; color: #ccc; }
58
58
59 #content { width: 80%; background-color: #fff; margin: 0px; border-right: 1px solid #ddd; padding: 6px 10px 10px 10px; z-index: 10; }
59 #content { width: 80%; background-color: #fff; margin: 0px; border-right: 1px solid #ddd; padding: 6px 10px 10px 10px; z-index: 10; }
60 * html #content{ width: 80%; padding-left: 0; margin-top: 0px; padding: 6px 10px 10px 10px;}
60 * html #content{ width: 80%; padding-left: 0; margin-top: 0px; padding: 6px 10px 10px 10px;}
61 html>body #content { min-height: 600px; }
61 html>body #content { min-height: 600px; }
62 * html body #content { height: 600px; } /* IE */
62 * html body #content { height: 600px; } /* IE */
63
63
64 #main.nosidebar #sidebar{ display: none; }
64 #main.nosidebar #sidebar{ display: none; }
65 #main.nosidebar #content{ width: auto; border-right: 0; }
65 #main.nosidebar #content{ width: auto; border-right: 0; }
66
66
67 #footer {clear: both; border-top: 1px solid #bbb; font-size: 0.9em; color: #aaa; padding: 5px; text-align:center; background:#fff;}
67 #footer {clear: both; border-top: 1px solid #bbb; font-size: 0.9em; color: #aaa; padding: 5px; text-align:center; background:#fff;}
68
68
69 #login-form table {margin-top:5em; padding:1em; margin-left: auto; margin-right: auto; border: 2px solid #FDBF3B; background-color:#FFEBC1; }
69 #login-form table {margin-top:5em; padding:1em; margin-left: auto; margin-right: auto; border: 2px solid #FDBF3B; background-color:#FFEBC1; }
70 #login-form table td {padding: 6px;}
70 #login-form table td {padding: 6px;}
71 #login-form label {font-weight: bold;}
71 #login-form label {font-weight: bold;}
72
72
73 input#openid_url { background: url(../images/openid-bg.gif) no-repeat; background-color: #fff; background-position: 0 50%; padding-left: 18px; }
73 input#openid_url { background: url(../images/openid-bg.gif) no-repeat; background-color: #fff; background-position: 0 50%; padding-left: 18px; }
74
74
75 .clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; }
75 .clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; }
76
76
77 /***** Links *****/
77 /***** Links *****/
78 a, a:link, a:visited{ color: #2A5685; text-decoration: none; }
78 a, a:link, a:visited{ color: #2A5685; text-decoration: none; }
79 a:hover, a:active{ color: #c61a1a; text-decoration: underline;}
79 a:hover, a:active{ color: #c61a1a; text-decoration: underline;}
80 a img{ border: 0; }
80 a img{ border: 0; }
81
81
82 a.issue.closed, a.issue.closed:link, a.issue.closed:visited { text-decoration: line-through; }
82 a.issue.closed, a.issue.closed:link, a.issue.closed:visited { text-decoration: line-through; }
83
83
84 /***** Tables *****/
84 /***** Tables *****/
85 table.list { border: 1px solid #e4e4e4; border-collapse: collapse; width: 100%; margin-bottom: 4px; }
85 table.list { border: 1px solid #e4e4e4; border-collapse: collapse; width: 100%; margin-bottom: 4px; }
86 table.list th { background-color:#EEEEEE; padding: 4px; white-space:nowrap; }
86 table.list th { background-color:#EEEEEE; padding: 4px; white-space:nowrap; }
87 table.list td { vertical-align: top; }
87 table.list td { vertical-align: top; }
88 table.list td.id { width: 2%; text-align: center;}
88 table.list td.id { width: 2%; text-align: center;}
89 table.list td.checkbox { width: 15px; padding: 0px;}
89 table.list td.checkbox { width: 15px; padding: 0px;}
90
90
91 tr.project td.name a { padding-left: 16px; white-space:nowrap; }
91 tr.project td.name a { padding-left: 16px; white-space:nowrap; }
92 tr.project.parent td.name a { background: url('../images/bullet_toggle_minus.png') no-repeat; }
92 tr.project.parent td.name a { background: url('../images/bullet_toggle_minus.png') no-repeat; }
93
93
94 tr.issue { text-align: center; white-space: nowrap; }
94 tr.issue { text-align: center; white-space: nowrap; }
95 tr.issue td.subject, tr.issue td.category, td.assigned_to { white-space: normal; }
95 tr.issue td.subject, tr.issue td.category, td.assigned_to { white-space: normal; }
96 tr.issue td.subject { text-align: left; }
96 tr.issue td.subject { text-align: left; }
97 tr.issue td.done_ratio table.progress { margin-left:auto; margin-right: auto;}
97 tr.issue td.done_ratio table.progress { margin-left:auto; margin-right: auto;}
98
98
99 tr.entry { border: 1px solid #f8f8f8; }
99 tr.entry { border: 1px solid #f8f8f8; }
100 tr.entry td { white-space: nowrap; }
100 tr.entry td { white-space: nowrap; }
101 tr.entry td.filename { width: 30%; }
101 tr.entry td.filename { width: 30%; }
102 tr.entry td.size { text-align: right; font-size: 90%; }
102 tr.entry td.size { text-align: right; font-size: 90%; }
103 tr.entry td.revision, tr.entry td.author { text-align: center; }
103 tr.entry td.revision, tr.entry td.author { text-align: center; }
104 tr.entry td.age { text-align: right; }
104 tr.entry td.age { text-align: right; }
105
105
106 tr.entry span.expander {background-image: url(../images/bullet_toggle_plus.png); padding-left: 8px; margin-left: 0; cursor: pointer;}
106 tr.entry span.expander {background-image: url(../images/bullet_toggle_plus.png); padding-left: 8px; margin-left: 0; cursor: pointer;}
107 tr.entry.open span.expander {background-image: url(../images/bullet_toggle_minus.png);}
107 tr.entry.open span.expander {background-image: url(../images/bullet_toggle_minus.png);}
108 tr.entry.file td.filename a { margin-left: 16px; }
108 tr.entry.file td.filename a { margin-left: 16px; }
109
109
110 tr.changeset td.author { text-align: center; width: 15%; }
110 tr.changeset td.author { text-align: center; width: 15%; }
111 tr.changeset td.committed_on { text-align: center; width: 15%; }
111 tr.changeset td.committed_on { text-align: center; width: 15%; }
112
112
113 table.files tr.file td { text-align: center; }
113 table.files tr.file td { text-align: center; }
114 table.files tr.file td.filename { text-align: left; padding-left: 24px; }
114 table.files tr.file td.filename { text-align: left; padding-left: 24px; }
115 table.files tr.file td.digest { font-size: 80%; }
115 table.files tr.file td.digest { font-size: 80%; }
116
116
117 tr.message { height: 2.6em; }
117 tr.message { height: 2.6em; }
118 tr.message td.last_message { font-size: 80%; }
118 tr.message td.last_message { font-size: 80%; }
119 tr.message.locked td.subject a { background-image: url(../images/locked.png); }
119 tr.message.locked td.subject a { background-image: url(../images/locked.png); }
120 tr.message.sticky td.subject a { background-image: url(../images/sticky.png); font-weight: bold; }
120 tr.message.sticky td.subject a { background-image: url(../images/sticky.png); font-weight: bold; }
121
121
122 tr.user td { width:13%; }
122 tr.user td { width:13%; }
123 tr.user td.email { width:18%; }
123 tr.user td.email { width:18%; }
124 tr.user td { white-space: nowrap; }
124 tr.user td { white-space: nowrap; }
125 tr.user.locked, tr.user.registered { color: #aaa; }
125 tr.user.locked, tr.user.registered { color: #aaa; }
126 tr.user.locked a, tr.user.registered a { color: #aaa; }
126 tr.user.locked a, tr.user.registered a { color: #aaa; }
127
127
128 tr.time-entry { text-align: center; white-space: nowrap; }
128 tr.time-entry { text-align: center; white-space: nowrap; }
129 tr.time-entry td.subject, tr.time-entry td.comments { text-align: left; white-space: normal; }
129 tr.time-entry td.subject, tr.time-entry td.comments { text-align: left; white-space: normal; }
130 td.hours { text-align: right; font-weight: bold; padding-right: 0.5em; }
130 td.hours { text-align: right; font-weight: bold; padding-right: 0.5em; }
131 td.hours .hours-dec { font-size: 0.9em; }
131 td.hours .hours-dec { font-size: 0.9em; }
132
132
133 table.plugins td { vertical-align: middle; }
133 table.plugins td { vertical-align: middle; }
134 table.plugins td.configure { text-align: right; padding-right: 1em; }
134 table.plugins td.configure { text-align: right; padding-right: 1em; }
135 table.plugins span.name { font-weight: bold; display: block; margin-bottom: 6px; }
135 table.plugins span.name { font-weight: bold; display: block; margin-bottom: 6px; }
136 table.plugins span.description { display: block; font-size: 0.9em; }
136 table.plugins span.description { display: block; font-size: 0.9em; }
137 table.plugins span.url { display: block; font-size: 0.9em; }
137 table.plugins span.url { display: block; font-size: 0.9em; }
138
138
139 table.list tbody tr:hover { background-color:#ffffdd; }
139 table.list tbody tr:hover { background-color:#ffffdd; }
140 table td {padding:2px;}
140 table td {padding:2px;}
141 table p {margin:0;}
141 table p {margin:0;}
142 .odd {background-color:#f6f7f8;}
142 .odd {background-color:#f6f7f8;}
143 .even {background-color: #fff;}
143 .even {background-color: #fff;}
144
144
145 a.sort { padding-right: 16px; background-position: 100% 50%; background-repeat: no-repeat; }
145 a.sort { padding-right: 16px; background-position: 100% 50%; background-repeat: no-repeat; }
146 a.sort.asc { background-image: url(../images/sort_asc.png); }
146 a.sort.asc { background-image: url(../images/sort_asc.png); }
147 a.sort.desc { background-image: url(../images/sort_desc.png); }
147 a.sort.desc { background-image: url(../images/sort_desc.png); }
148
148
149 .highlight { background-color: #FCFD8D;}
149 .highlight { background-color: #FCFD8D;}
150 .highlight.token-1 { background-color: #faa;}
150 .highlight.token-1 { background-color: #faa;}
151 .highlight.token-2 { background-color: #afa;}
151 .highlight.token-2 { background-color: #afa;}
152 .highlight.token-3 { background-color: #aaf;}
152 .highlight.token-3 { background-color: #aaf;}
153
153
154 .box{
154 .box{
155 padding:6px;
155 padding:6px;
156 margin-bottom: 10px;
156 margin-bottom: 10px;
157 background-color:#f6f6f6;
157 background-color:#f6f6f6;
158 color:#505050;
158 color:#505050;
159 line-height:1.5em;
159 line-height:1.5em;
160 border: 1px solid #e4e4e4;
160 border: 1px solid #e4e4e4;
161 }
161 }
162
162
163 div.square {
163 div.square {
164 border: 1px solid #999;
164 border: 1px solid #999;
165 float: left;
165 float: left;
166 margin: .3em .4em 0 .4em;
166 margin: .3em .4em 0 .4em;
167 overflow: hidden;
167 overflow: hidden;
168 width: .6em; height: .6em;
168 width: .6em; height: .6em;
169 }
169 }
170 .contextual {float:right; white-space: nowrap; line-height:1.4em;margin-top:5px; padding-left: 10px; font-size:0.9em;}
170 .contextual {float:right; white-space: nowrap; line-height:1.4em;margin-top:5px; padding-left: 10px; font-size:0.9em;}
171 .contextual input {font-size:0.9em;}
171 .contextual input {font-size:0.9em;}
172 .message .contextual { margin-top: 0; }
172 .message .contextual { margin-top: 0; }
173
173
174 .splitcontentleft{float:left; width:49%;}
174 .splitcontentleft{float:left; width:49%;}
175 .splitcontentright{float:right; width:49%;}
175 .splitcontentright{float:right; width:49%;}
176 form {display: inline;}
176 form {display: inline;}
177 input, select {vertical-align: middle; margin-top: 1px; margin-bottom: 1px;}
177 input, select {vertical-align: middle; margin-top: 1px; margin-bottom: 1px;}
178 fieldset {border: 1px solid #e4e4e4; margin:0;}
178 fieldset {border: 1px solid #e4e4e4; margin:0;}
179 legend {color: #484848;}
179 legend {color: #484848;}
180 hr { width: 100%; height: 1px; background: #ccc; border: 0;}
180 hr { width: 100%; height: 1px; background: #ccc; border: 0;}
181 blockquote { font-style: italic; border-left: 3px solid #e0e0e0; padding-left: 0.6em; margin-left: 2.4em;}
181 blockquote { font-style: italic; border-left: 3px solid #e0e0e0; padding-left: 0.6em; margin-left: 2.4em;}
182 blockquote blockquote { margin-left: 0;}
182 blockquote blockquote { margin-left: 0;}
183 textarea.wiki-edit { width: 99%; }
183 textarea.wiki-edit { width: 99%; }
184 li p {margin-top: 0;}
184 li p {margin-top: 0;}
185 div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
185 div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
186 p.breadcrumb { font-size: 0.9em; margin: 4px 0 4px 0;}
186 p.breadcrumb { font-size: 0.9em; margin: 4px 0 4px 0;}
187 p.subtitle { font-size: 0.9em; margin: -6px 0 12px 0; font-style: italic; }
187 p.subtitle { font-size: 0.9em; margin: -6px 0 12px 0; font-style: italic; }
188 p.footnote { font-size: 0.9em; margin-top: 0px; margin-bottom: 0px; }
188 p.footnote { font-size: 0.9em; margin-top: 0px; margin-bottom: 0px; }
189
189
190 fieldset#filters, fieldset#date-range { padding: 0.7em; margin-bottom: 8px; }
190 fieldset#filters, fieldset#date-range { padding: 0.7em; margin-bottom: 8px; }
191 fieldset#filters p { margin: 1.2em 0 0.8em 2px; }
191 fieldset#filters p { margin: 1.2em 0 0.8em 2px; }
192 fieldset#filters table { border-collapse: collapse; }
192 fieldset#filters table { border-collapse: collapse; }
193 fieldset#filters table td { padding: 0; vertical-align: middle; }
193 fieldset#filters table td { padding: 0; vertical-align: middle; }
194 fieldset#filters tr.filter { height: 2em; }
194 fieldset#filters tr.filter { height: 2em; }
195 fieldset#filters td.add-filter { text-align: right; vertical-align: top; }
195 fieldset#filters td.add-filter { text-align: right; vertical-align: top; }
196 .buttons { font-size: 0.9em; }
196 .buttons { font-size: 0.9em; }
197
197
198 div#issue-changesets {float:right; width:45%; margin-left: 1em; margin-bottom: 1em; background: #fff; padding-left: 1em; font-size: 90%;}
198 div#issue-changesets {float:right; width:45%; margin-left: 1em; margin-bottom: 1em; background: #fff; padding-left: 1em; font-size: 90%;}
199 div#issue-changesets .changeset { padding: 4px;}
199 div#issue-changesets .changeset { padding: 4px;}
200 div#issue-changesets .changeset { border-bottom: 1px solid #ddd; }
200 div#issue-changesets .changeset { border-bottom: 1px solid #ddd; }
201 div#issue-changesets p { margin-top: 0; margin-bottom: 1em;}
201 div#issue-changesets p { margin-top: 0; margin-bottom: 1em;}
202
202
203 div#activity dl, #search-results { margin-left: 2em; }
203 div#activity dl, #search-results { margin-left: 2em; }
204 div#activity dd, #search-results dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }
204 div#activity dd, #search-results dd { margin-bottom: 1em; padding-left: 18px; font-size: 0.9em; }
205 div#activity dt, #search-results dt { margin-bottom: 0px; padding-left: 20px; line-height: 18px; background-position: 0 50%; background-repeat: no-repeat; }
205 div#activity dt, #search-results dt { margin-bottom: 0px; padding-left: 20px; line-height: 18px; background-position: 0 50%; background-repeat: no-repeat; }
206 div#activity dt.me .time { border-bottom: 1px solid #999; }
206 div#activity dt.me .time { border-bottom: 1px solid #999; }
207 div#activity dt .time { color: #777; font-size: 80%; }
207 div#activity dt .time { color: #777; font-size: 80%; }
208 div#activity dd .description, #search-results dd .description { font-style: italic; }
208 div#activity dd .description, #search-results dd .description { font-style: italic; }
209 div#activity span.project:after, #search-results span.project:after { content: " -"; }
209 div#activity span.project:after, #search-results span.project:after { content: " -"; }
210 div#activity dd span.description, #search-results dd span.description { display:block; color: #808080; }
210 div#activity dd span.description, #search-results dd span.description { display:block; color: #808080; }
211
211
212 #search-results dd { margin-bottom: 1em; padding-left: 20px; margin-left:0px; }
212 #search-results dd { margin-bottom: 1em; padding-left: 20px; margin-left:0px; }
213
213
214 div#search-results-counts {float:right;}
214 div#search-results-counts {float:right;}
215 div#search-results-counts ul { margin-top: 0.5em; }
215 div#search-results-counts ul { margin-top: 0.5em; }
216 div#search-results-counts li { list-style-type:none; float: left; margin-left: 1em; }
216 div#search-results-counts li { list-style-type:none; float: left; margin-left: 1em; }
217
217
218 dt.issue { background-image: url(../images/ticket.png); }
218 dt.issue { background-image: url(../images/ticket.png); }
219 dt.issue-edit { background-image: url(../images/ticket_edit.png); }
219 dt.issue-edit { background-image: url(../images/ticket_edit.png); }
220 dt.issue-closed { background-image: url(../images/ticket_checked.png); }
220 dt.issue-closed { background-image: url(../images/ticket_checked.png); }
221 dt.issue-note { background-image: url(../images/ticket_note.png); }
221 dt.issue-note { background-image: url(../images/ticket_note.png); }
222 dt.changeset { background-image: url(../images/changeset.png); }
222 dt.changeset { background-image: url(../images/changeset.png); }
223 dt.news { background-image: url(../images/news.png); }
223 dt.news { background-image: url(../images/news.png); }
224 dt.message { background-image: url(../images/message.png); }
224 dt.message { background-image: url(../images/message.png); }
225 dt.reply { background-image: url(../images/comments.png); }
225 dt.reply { background-image: url(../images/comments.png); }
226 dt.wiki-page { background-image: url(../images/wiki_edit.png); }
226 dt.wiki-page { background-image: url(../images/wiki_edit.png); }
227 dt.attachment { background-image: url(../images/attachment.png); }
227 dt.attachment { background-image: url(../images/attachment.png); }
228 dt.document { background-image: url(../images/document.png); }
228 dt.document { background-image: url(../images/document.png); }
229 dt.project { background-image: url(../images/projects.png); }
229 dt.project { background-image: url(../images/projects.png); }
230
230
231 #search-results dt.issue.closed { background-image: url(../images/ticket_checked.png); }
231 #search-results dt.issue.closed { background-image: url(../images/ticket_checked.png); }
232
232
233 div#roadmap fieldset.related-issues { margin-bottom: 1em; }
233 div#roadmap fieldset.related-issues { margin-bottom: 1em; }
234 div#roadmap fieldset.related-issues ul { margin-top: 0.3em; margin-bottom: 0.3em; }
234 div#roadmap fieldset.related-issues ul { margin-top: 0.3em; margin-bottom: 0.3em; }
235 div#roadmap .wiki h1:first-child { display: none; }
235 div#roadmap .wiki h1:first-child { display: none; }
236 div#roadmap .wiki h1 { font-size: 120%; }
236 div#roadmap .wiki h1 { font-size: 120%; }
237 div#roadmap .wiki h2 { font-size: 110%; }
237 div#roadmap .wiki h2 { font-size: 110%; }
238
238
239 div#version-summary { float:right; width:380px; margin-left: 16px; margin-bottom: 16px; background-color: #fff; }
239 div#version-summary { float:right; width:380px; margin-left: 16px; margin-bottom: 16px; background-color: #fff; }
240 div#version-summary fieldset { margin-bottom: 1em; }
240 div#version-summary fieldset { margin-bottom: 1em; }
241 div#version-summary .total-hours { text-align: right; }
241 div#version-summary .total-hours { text-align: right; }
242
242
243 table#time-report td.hours, table#time-report th.period, table#time-report th.total { text-align: right; padding-right: 0.5em; }
243 table#time-report td.hours, table#time-report th.period, table#time-report th.total { text-align: right; padding-right: 0.5em; }
244 table#time-report tbody tr { font-style: italic; color: #777; }
244 table#time-report tbody tr { font-style: italic; color: #777; }
245 table#time-report tbody tr.last-level { font-style: normal; color: #555; }
245 table#time-report tbody tr.last-level { font-style: normal; color: #555; }
246 table#time-report tbody tr.total { font-style: normal; font-weight: bold; color: #555; background-color:#EEEEEE; }
246 table#time-report tbody tr.total { font-style: normal; font-weight: bold; color: #555; background-color:#EEEEEE; }
247 table#time-report .hours-dec { font-size: 0.9em; }
247 table#time-report .hours-dec { font-size: 0.9em; }
248
248
249 form#issue-form .attributes { margin-bottom: 8px; }
249 form#issue-form .attributes { margin-bottom: 8px; }
250 form#issue-form .attributes p { padding-top: 1px; padding-bottom: 2px; }
250 form#issue-form .attributes p { padding-top: 1px; padding-bottom: 2px; }
251 form#issue-form .attributes select { min-width: 30%; }
251 form#issue-form .attributes select { min-width: 30%; }
252
252
253 ul.projects { margin: 0; padding-left: 1em; }
253 ul.projects { margin: 0; padding-left: 1em; }
254 ul.projects.root { margin: 0; padding: 0; }
254 ul.projects.root { margin: 0; padding: 0; }
255 ul.projects ul { border-left: 3px solid #e0e0e0; }
255 ul.projects ul { border-left: 3px solid #e0e0e0; }
256 ul.projects li { list-style-type:none; }
256 ul.projects li { list-style-type:none; }
257 ul.projects li.root { margin-bottom: 1em; }
257 ul.projects li.root { margin-bottom: 1em; }
258 ul.projects li.child { margin-top: 1em;}
258 ul.projects li.child { margin-top: 1em;}
259 ul.projects div.root a.project { font-family: "Trebuchet MS", Verdana, sans-serif; font-weight: bold; font-size: 16px; margin: 0 0 10px 0; }
259 ul.projects div.root a.project { font-family: "Trebuchet MS", Verdana, sans-serif; font-weight: bold; font-size: 16px; margin: 0 0 10px 0; }
260 .my-project { padding-left: 18px; background: url(../images/fav.png) no-repeat 0 50%; }
260 .my-project { padding-left: 18px; background: url(../images/fav.png) no-repeat 0 50%; }
261
261
262 #tracker_project_ids ul { margin: 0; padding-left: 1em; }
262 #tracker_project_ids ul { margin: 0; padding-left: 1em; }
263 #tracker_project_ids li { list-style-type:none; }
263 #tracker_project_ids li { list-style-type:none; }
264
264
265 ul.properties {padding:0; font-size: 0.9em; color: #777;}
265 ul.properties {padding:0; font-size: 0.9em; color: #777;}
266 ul.properties li {list-style-type:none;}
266 ul.properties li {list-style-type:none;}
267 ul.properties li span {font-style:italic;}
267 ul.properties li span {font-style:italic;}
268
268
269 .total-hours { font-size: 110%; font-weight: bold; }
269 .total-hours { font-size: 110%; font-weight: bold; }
270 .total-hours span.hours-int { font-size: 120%; }
270 .total-hours span.hours-int { font-size: 120%; }
271
271
272 .autoscroll {overflow-x: auto; padding:1px; margin-bottom: 1.2em;}
272 .autoscroll {overflow-x: auto; padding:1px; margin-bottom: 1.2em;}
273 #user_firstname, #user_lastname, #user_mail, #my_account_form select { width: 90%; }
273 #user_firstname, #user_lastname, #user_mail, #my_account_form select { width: 90%; }
274
274
275 .pagination {font-size: 90%}
275 .pagination {font-size: 90%}
276 p.pagination {margin-top:8px;}
276 p.pagination {margin-top:8px;}
277
277
278 /***** Tabular forms ******/
278 /***** Tabular forms ******/
279 .tabular p{
279 .tabular p{
280 margin: 0;
280 margin: 0;
281 padding: 5px 0 8px 0;
281 padding: 5px 0 8px 0;
282 padding-left: 180px; /*width of left column containing the label elements*/
282 padding-left: 180px; /*width of left column containing the label elements*/
283 height: 1%;
283 height: 1%;
284 clear:left;
284 clear:left;
285 }
285 }
286
286
287 html>body .tabular p {overflow:hidden;}
287 html>body .tabular p {overflow:hidden;}
288
288
289 .tabular label{
289 .tabular label{
290 font-weight: bold;
290 font-weight: bold;
291 float: left;
291 float: left;
292 text-align: right;
292 text-align: right;
293 margin-left: -180px; /*width of left column*/
293 margin-left: -180px; /*width of left column*/
294 width: 175px; /*width of labels. Should be smaller than left column to create some right
294 width: 175px; /*width of labels. Should be smaller than left column to create some right
295 margin*/
295 margin*/
296 }
296 }
297
297
298 .tabular label.floating{
298 .tabular label.floating{
299 font-weight: normal;
299 font-weight: normal;
300 margin-left: 0px;
300 margin-left: 0px;
301 text-align: left;
301 text-align: left;
302 width: 270px;
302 width: 270px;
303 }
303 }
304
304
305 input#time_entry_comments { width: 90%;}
305 input#time_entry_comments { width: 90%;}
306
306
307 #preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
307 #preview fieldset {margin-top: 1em; background: url(../images/draft.png)}
308
308
309 .tabular.settings p{ padding-left: 300px; }
309 .tabular.settings p{ padding-left: 300px; }
310 .tabular.settings label{ margin-left: -300px; width: 295px; }
310 .tabular.settings label{ margin-left: -300px; width: 295px; }
311
311
312 .required {color: #bb0000;}
312 .required {color: #bb0000;}
313 .summary {font-style: italic;}
313 .summary {font-style: italic;}
314
314
315 #attachments_fields input[type=text] {margin-left: 8px; }
315 #attachments_fields input[type=text] {margin-left: 8px; }
316
316
317 div.attachments { margin-top: 12px; }
317 div.attachments { margin-top: 12px; }
318 div.attachments p { margin:4px 0 2px 0; }
318 div.attachments p { margin:4px 0 2px 0; }
319 div.attachments img { vertical-align: middle; }
319 div.attachments img { vertical-align: middle; }
320 div.attachments span.author { font-size: 0.9em; color: #888; }
320 div.attachments span.author { font-size: 0.9em; color: #888; }
321
321
322 p.other-formats { text-align: right; font-size:0.9em; color: #666; }
322 p.other-formats { text-align: right; font-size:0.9em; color: #666; }
323 .other-formats span + span:before { content: "| "; }
323 .other-formats span + span:before { content: "| "; }
324
324
325 a.atom { background: url(../images/feed.png) no-repeat 1px 50%; padding: 2px 0px 3px 16px; }
325 a.atom { background: url(../images/feed.png) no-repeat 1px 50%; padding: 2px 0px 3px 16px; }
326
326
327 /* Project members tab */
327 /* Project members tab */
328 div#tab-content-members .splitcontentleft { width: 64% }
328 div#tab-content-members .splitcontentleft { width: 64% }
329 div#tab-content-members .splitcontentright { width: 34% }
329 div#tab-content-members .splitcontentright { width: 34% }
330 div#tab-content-members fieldset { margin-top: -8px; padding-top:0.6em; margin-bottom: 1em; }
330 div#tab-content-members fieldset { padding:1em; margin-bottom: 1em; }
331 div#tab-content-members fieldset legend { font-weight: bold; }
331 div#tab-content-members fieldset legend { font-weight: bold; }
332 div#tab-content-members fieldset label { display: block; }
332 div#tab-content-members fieldset label { display: block; }
333 div#tab-content-members fieldset div { max-height: 400px; overflow:auto; }
333 div#tab-content-members fieldset div { max-height: 400px; overflow:auto; }
334
334
335 * html div#tab-content-members fieldset div { height: 450px; }
335 * html div#tab-content-members fieldset div { height: 450px; }
336
336
337 /***** Flash & error messages ****/
337 /***** Flash & error messages ****/
338 #errorExplanation, div.flash, .nodata, .warning {
338 #errorExplanation, div.flash, .nodata, .warning {
339 padding: 4px 4px 4px 30px;
339 padding: 4px 4px 4px 30px;
340 margin-bottom: 12px;
340 margin-bottom: 12px;
341 font-size: 1.1em;
341 font-size: 1.1em;
342 border: 2px solid;
342 border: 2px solid;
343 }
343 }
344
344
345 div.flash {margin-top: 8px;}
345 div.flash {margin-top: 8px;}
346
346
347 div.flash.error, #errorExplanation {
347 div.flash.error, #errorExplanation {
348 background: url(../images/false.png) 8px 5px no-repeat;
348 background: url(../images/false.png) 8px 5px no-repeat;
349 background-color: #ffe3e3;
349 background-color: #ffe3e3;
350 border-color: #dd0000;
350 border-color: #dd0000;
351 color: #550000;
351 color: #550000;
352 }
352 }
353
353
354 div.flash.notice {
354 div.flash.notice {
355 background: url(../images/true.png) 8px 5px no-repeat;
355 background: url(../images/true.png) 8px 5px no-repeat;
356 background-color: #dfffdf;
356 background-color: #dfffdf;
357 border-color: #9fcf9f;
357 border-color: #9fcf9f;
358 color: #005f00;
358 color: #005f00;
359 }
359 }
360
360
361 div.flash.warning {
361 div.flash.warning {
362 background: url(../images/warning.png) 8px 5px no-repeat;
362 background: url(../images/warning.png) 8px 5px no-repeat;
363 background-color: #FFEBC1;
363 background-color: #FFEBC1;
364 border-color: #FDBF3B;
364 border-color: #FDBF3B;
365 color: #A6750C;
365 color: #A6750C;
366 text-align: left;
366 text-align: left;
367 }
367 }
368
368
369 .nodata, .warning {
369 .nodata, .warning {
370 text-align: center;
370 text-align: center;
371 background-color: #FFEBC1;
371 background-color: #FFEBC1;
372 border-color: #FDBF3B;
372 border-color: #FDBF3B;
373 color: #A6750C;
373 color: #A6750C;
374 }
374 }
375
375
376 #errorExplanation ul { font-size: 0.9em;}
376 #errorExplanation ul { font-size: 0.9em;}
377 #errorExplanation h2, #errorExplanation p { display: none; }
377 #errorExplanation h2, #errorExplanation p { display: none; }
378
378
379 /***** Ajax indicator ******/
379 /***** Ajax indicator ******/
380 #ajax-indicator {
380 #ajax-indicator {
381 position: absolute; /* fixed not supported by IE */
381 position: absolute; /* fixed not supported by IE */
382 background-color:#eee;
382 background-color:#eee;
383 border: 1px solid #bbb;
383 border: 1px solid #bbb;
384 top:35%;
384 top:35%;
385 left:40%;
385 left:40%;
386 width:20%;
386 width:20%;
387 font-weight:bold;
387 font-weight:bold;
388 text-align:center;
388 text-align:center;
389 padding:0.6em;
389 padding:0.6em;
390 z-index:100;
390 z-index:100;
391 filter:alpha(opacity=50);
391 filter:alpha(opacity=50);
392 opacity: 0.5;
392 opacity: 0.5;
393 }
393 }
394
394
395 html>body #ajax-indicator { position: fixed; }
395 html>body #ajax-indicator { position: fixed; }
396
396
397 #ajax-indicator span {
397 #ajax-indicator span {
398 background-position: 0% 40%;
398 background-position: 0% 40%;
399 background-repeat: no-repeat;
399 background-repeat: no-repeat;
400 background-image: url(../images/loading.gif);
400 background-image: url(../images/loading.gif);
401 padding-left: 26px;
401 padding-left: 26px;
402 vertical-align: bottom;
402 vertical-align: bottom;
403 }
403 }
404
404
405 /***** Calendar *****/
405 /***** Calendar *****/
406 table.cal {border-collapse: collapse; width: 100%; margin: 0px 0 6px 0;border: 1px solid #d7d7d7;}
406 table.cal {border-collapse: collapse; width: 100%; margin: 0px 0 6px 0;border: 1px solid #d7d7d7;}
407 table.cal thead th {width: 14%;}
407 table.cal thead th {width: 14%;}
408 table.cal tbody tr {height: 100px;}
408 table.cal tbody tr {height: 100px;}
409 table.cal th { background-color:#EEEEEE; padding: 4px; }
409 table.cal th { background-color:#EEEEEE; padding: 4px; }
410 table.cal td {border: 1px solid #d7d7d7; vertical-align: top; font-size: 0.9em;}
410 table.cal td {border: 1px solid #d7d7d7; vertical-align: top; font-size: 0.9em;}
411 table.cal td p.day-num {font-size: 1.1em; text-align:right;}
411 table.cal td p.day-num {font-size: 1.1em; text-align:right;}
412 table.cal td.odd p.day-num {color: #bbb;}
412 table.cal td.odd p.day-num {color: #bbb;}
413 table.cal td.today {background:#ffffdd;}
413 table.cal td.today {background:#ffffdd;}
414 table.cal td.today p.day-num {font-weight: bold;}
414 table.cal td.today p.day-num {font-weight: bold;}
415
415
416 /***** Tooltips ******/
416 /***** Tooltips ******/
417 .tooltip{position:relative;z-index:24;}
417 .tooltip{position:relative;z-index:24;}
418 .tooltip:hover{z-index:25;color:#000;}
418 .tooltip:hover{z-index:25;color:#000;}
419 .tooltip span.tip{display: none; text-align:left;}
419 .tooltip span.tip{display: none; text-align:left;}
420
420
421 div.tooltip:hover span.tip{
421 div.tooltip:hover span.tip{
422 display:block;
422 display:block;
423 position:absolute;
423 position:absolute;
424 top:12px; left:24px; width:270px;
424 top:12px; left:24px; width:270px;
425 border:1px solid #555;
425 border:1px solid #555;
426 background-color:#fff;
426 background-color:#fff;
427 padding: 4px;
427 padding: 4px;
428 font-size: 0.8em;
428 font-size: 0.8em;
429 color:#505050;
429 color:#505050;
430 }
430 }
431
431
432 /***** Progress bar *****/
432 /***** Progress bar *****/
433 table.progress {
433 table.progress {
434 border: 1px solid #D7D7D7;
434 border: 1px solid #D7D7D7;
435 border-collapse: collapse;
435 border-collapse: collapse;
436 border-spacing: 0pt;
436 border-spacing: 0pt;
437 empty-cells: show;
437 empty-cells: show;
438 text-align: center;
438 text-align: center;
439 float:left;
439 float:left;
440 margin: 1px 6px 1px 0px;
440 margin: 1px 6px 1px 0px;
441 }
441 }
442
442
443 table.progress td { height: 0.9em; }
443 table.progress td { height: 0.9em; }
444 table.progress td.closed { background: #BAE0BA none repeat scroll 0%; }
444 table.progress td.closed { background: #BAE0BA none repeat scroll 0%; }
445 table.progress td.done { background: #DEF0DE none repeat scroll 0%; }
445 table.progress td.done { background: #DEF0DE none repeat scroll 0%; }
446 table.progress td.open { background: #FFF none repeat scroll 0%; }
446 table.progress td.open { background: #FFF none repeat scroll 0%; }
447 p.pourcent {font-size: 80%;}
447 p.pourcent {font-size: 80%;}
448 p.progress-info {clear: left; font-style: italic; font-size: 80%;}
448 p.progress-info {clear: left; font-style: italic; font-size: 80%;}
449
449
450 /***** Tabs *****/
450 /***** Tabs *****/
451 #content .tabs {height: 2.6em; border-bottom: 1px solid #bbbbbb; margin-bottom:1.2em; position:relative;}
451 #content .tabs {height: 2.6em; border-bottom: 1px solid #bbbbbb; margin-bottom:1.2em; position:relative;}
452 #content .tabs ul {margin:0; position:absolute; bottom:-2px; padding-left:1em;}
452 #content .tabs ul {margin:0; position:absolute; bottom:-2px; padding-left:1em;}
453 #content .tabs>ul { bottom:-1px; } /* others */
453 #content .tabs>ul { bottom:-1px; } /* others */
454 #content .tabs ul li {
454 #content .tabs ul li {
455 float:left;
455 float:left;
456 list-style-type:none;
456 list-style-type:none;
457 white-space:nowrap;
457 white-space:nowrap;
458 margin-right:8px;
458 margin-right:8px;
459 background:#fff;
459 background:#fff;
460 }
460 }
461 #content .tabs ul li a{
461 #content .tabs ul li a{
462 display:block;
462 display:block;
463 font-size: 0.9em;
463 font-size: 0.9em;
464 text-decoration:none;
464 text-decoration:none;
465 line-height:1.3em;
465 line-height:1.3em;
466 padding:4px 6px 4px 6px;
466 padding:4px 6px 4px 6px;
467 border: 1px solid #ccc;
467 border: 1px solid #ccc;
468 border-bottom: 1px solid #bbbbbb;
468 border-bottom: 1px solid #bbbbbb;
469 background-color: #eeeeee;
469 background-color: #eeeeee;
470 color:#777;
470 color:#777;
471 font-weight:bold;
471 font-weight:bold;
472 }
472 }
473
473
474 #content .tabs ul li a:hover {
474 #content .tabs ul li a:hover {
475 background-color: #ffffdd;
475 background-color: #ffffdd;
476 text-decoration:none;
476 text-decoration:none;
477 }
477 }
478
478
479 #content .tabs ul li a.selected {
479 #content .tabs ul li a.selected {
480 background-color: #fff;
480 background-color: #fff;
481 border: 1px solid #bbbbbb;
481 border: 1px solid #bbbbbb;
482 border-bottom: 1px solid #fff;
482 border-bottom: 1px solid #fff;
483 }
483 }
484
484
485 #content .tabs ul li a.selected:hover {
485 #content .tabs ul li a.selected:hover {
486 background-color: #fff;
486 background-color: #fff;
487 }
487 }
488
488
489 /***** Auto-complete *****/
490 div.autocomplete {
491 position:absolute;
492 width:250px;
493 background-color:white;
494 margin:0;
495 padding:0;
496 }
497 div.autocomplete ul {
498 list-style-type:none;
499 margin:0;
500 padding:0;
501 }
502 div.autocomplete ul li.selected { background-color: #ffb;}
503 div.autocomplete ul li {
504 list-style-type:none;
505 display:block;
506 margin:0;
507 padding:2px;
508 cursor:pointer;
509 font-size: 90%;
510 border-bottom: 1px solid #ccc;
511 border-left: 1px solid #ccc;
512 border-right: 1px solid #ccc;
513 }
514 div.autocomplete ul li span.informal {
515 font-size: 80%;
516 color: #aaa;
517 }
518
489 /***** Diff *****/
519 /***** Diff *****/
490 .diff_out { background: #fcc; }
520 .diff_out { background: #fcc; }
491 .diff_in { background: #cfc; }
521 .diff_in { background: #cfc; }
492
522
493 /***** Wiki *****/
523 /***** Wiki *****/
494 div.wiki table {
524 div.wiki table {
495 border: 1px solid #505050;
525 border: 1px solid #505050;
496 border-collapse: collapse;
526 border-collapse: collapse;
497 margin-bottom: 1em;
527 margin-bottom: 1em;
498 }
528 }
499
529
500 div.wiki table, div.wiki td, div.wiki th {
530 div.wiki table, div.wiki td, div.wiki th {
501 border: 1px solid #bbb;
531 border: 1px solid #bbb;
502 padding: 4px;
532 padding: 4px;
503 }
533 }
504
534
505 div.wiki .external {
535 div.wiki .external {
506 background-position: 0% 60%;
536 background-position: 0% 60%;
507 background-repeat: no-repeat;
537 background-repeat: no-repeat;
508 padding-left: 12px;
538 padding-left: 12px;
509 background-image: url(../images/external.png);
539 background-image: url(../images/external.png);
510 }
540 }
511
541
512 div.wiki a.new {
542 div.wiki a.new {
513 color: #b73535;
543 color: #b73535;
514 }
544 }
515
545
516 div.wiki pre {
546 div.wiki pre {
517 margin: 1em 1em 1em 1.6em;
547 margin: 1em 1em 1em 1.6em;
518 padding: 2px;
548 padding: 2px;
519 background-color: #fafafa;
549 background-color: #fafafa;
520 border: 1px solid #dadada;
550 border: 1px solid #dadada;
521 width:95%;
551 width:95%;
522 overflow-x: auto;
552 overflow-x: auto;
523 }
553 }
524
554
525 div.wiki ul.toc {
555 div.wiki ul.toc {
526 background-color: #ffffdd;
556 background-color: #ffffdd;
527 border: 1px solid #e4e4e4;
557 border: 1px solid #e4e4e4;
528 padding: 4px;
558 padding: 4px;
529 line-height: 1.2em;
559 line-height: 1.2em;
530 margin-bottom: 12px;
560 margin-bottom: 12px;
531 margin-right: 12px;
561 margin-right: 12px;
532 margin-left: 0;
562 margin-left: 0;
533 display: table
563 display: table
534 }
564 }
535 * html div.wiki ul.toc { width: 50%; } /* IE6 doesn't autosize div */
565 * html div.wiki ul.toc { width: 50%; } /* IE6 doesn't autosize div */
536
566
537 div.wiki ul.toc.right { float: right; margin-left: 12px; margin-right: 0; width: auto; }
567 div.wiki ul.toc.right { float: right; margin-left: 12px; margin-right: 0; width: auto; }
538 div.wiki ul.toc.left { float: left; margin-right: 12px; margin-left: 0; width: auto; }
568 div.wiki ul.toc.left { float: left; margin-right: 12px; margin-left: 0; width: auto; }
539 div.wiki ul.toc li { list-style-type:none;}
569 div.wiki ul.toc li { list-style-type:none;}
540 div.wiki ul.toc li.heading2 { margin-left: 6px; }
570 div.wiki ul.toc li.heading2 { margin-left: 6px; }
541 div.wiki ul.toc li.heading3 { margin-left: 12px; font-size: 0.8em; }
571 div.wiki ul.toc li.heading3 { margin-left: 12px; font-size: 0.8em; }
542
572
543 div.wiki ul.toc a {
573 div.wiki ul.toc a {
544 font-size: 0.9em;
574 font-size: 0.9em;
545 font-weight: normal;
575 font-weight: normal;
546 text-decoration: none;
576 text-decoration: none;
547 color: #606060;
577 color: #606060;
548 }
578 }
549 div.wiki ul.toc a:hover { color: #c61a1a; text-decoration: underline;}
579 div.wiki ul.toc a:hover { color: #c61a1a; text-decoration: underline;}
550
580
551 a.wiki-anchor { display: none; margin-left: 6px; text-decoration: none; }
581 a.wiki-anchor { display: none; margin-left: 6px; text-decoration: none; }
552 a.wiki-anchor:hover { color: #aaa !important; text-decoration: none; }
582 a.wiki-anchor:hover { color: #aaa !important; text-decoration: none; }
553 h1:hover a.wiki-anchor, h2:hover a.wiki-anchor, h3:hover a.wiki-anchor { display: inline; color: #ddd; }
583 h1:hover a.wiki-anchor, h2:hover a.wiki-anchor, h3:hover a.wiki-anchor { display: inline; color: #ddd; }
554
584
555 /***** My page layout *****/
585 /***** My page layout *****/
556 .block-receiver {
586 .block-receiver {
557 border:1px dashed #c0c0c0;
587 border:1px dashed #c0c0c0;
558 margin-bottom: 20px;
588 margin-bottom: 20px;
559 padding: 15px 0 15px 0;
589 padding: 15px 0 15px 0;
560 }
590 }
561
591
562 .mypage-box {
592 .mypage-box {
563 margin:0 0 20px 0;
593 margin:0 0 20px 0;
564 color:#505050;
594 color:#505050;
565 line-height:1.5em;
595 line-height:1.5em;
566 }
596 }
567
597
568 .handle {
598 .handle {
569 cursor: move;
599 cursor: move;
570 }
600 }
571
601
572 a.close-icon {
602 a.close-icon {
573 display:block;
603 display:block;
574 margin-top:3px;
604 margin-top:3px;
575 overflow:hidden;
605 overflow:hidden;
576 width:12px;
606 width:12px;
577 height:12px;
607 height:12px;
578 background-repeat: no-repeat;
608 background-repeat: no-repeat;
579 cursor:pointer;
609 cursor:pointer;
580 background-image:url('../images/close.png');
610 background-image:url('../images/close.png');
581 }
611 }
582
612
583 a.close-icon:hover {
613 a.close-icon:hover {
584 background-image:url('../images/close_hl.png');
614 background-image:url('../images/close_hl.png');
585 }
615 }
586
616
587 /***** Gantt chart *****/
617 /***** Gantt chart *****/
588 .gantt_hdr {
618 .gantt_hdr {
589 position:absolute;
619 position:absolute;
590 top:0;
620 top:0;
591 height:16px;
621 height:16px;
592 border-top: 1px solid #c0c0c0;
622 border-top: 1px solid #c0c0c0;
593 border-bottom: 1px solid #c0c0c0;
623 border-bottom: 1px solid #c0c0c0;
594 border-right: 1px solid #c0c0c0;
624 border-right: 1px solid #c0c0c0;
595 text-align: center;
625 text-align: center;
596 overflow: hidden;
626 overflow: hidden;
597 }
627 }
598
628
599 .task {
629 .task {
600 position: absolute;
630 position: absolute;
601 height:8px;
631 height:8px;
602 font-size:0.8em;
632 font-size:0.8em;
603 color:#888;
633 color:#888;
604 padding:0;
634 padding:0;
605 margin:0;
635 margin:0;
606 line-height:0.8em;
636 line-height:0.8em;
607 }
637 }
608
638
609 .task_late { background:#f66 url(../images/task_late.png); border: 1px solid #f66; }
639 .task_late { background:#f66 url(../images/task_late.png); border: 1px solid #f66; }
610 .task_done { background:#66f url(../images/task_done.png); border: 1px solid #66f; }
640 .task_done { background:#66f url(../images/task_done.png); border: 1px solid #66f; }
611 .task_todo { background:#aaa url(../images/task_todo.png); border: 1px solid #aaa; }
641 .task_todo { background:#aaa url(../images/task_todo.png); border: 1px solid #aaa; }
612 .milestone { background-image:url(../images/milestone.png); background-repeat: no-repeat; border: 0; }
642 .milestone { background-image:url(../images/milestone.png); background-repeat: no-repeat; border: 0; }
613
643
614 /***** Icons *****/
644 /***** Icons *****/
615 .icon {
645 .icon {
616 background-position: 0% 40%;
646 background-position: 0% 40%;
617 background-repeat: no-repeat;
647 background-repeat: no-repeat;
618 padding-left: 20px;
648 padding-left: 20px;
619 padding-top: 2px;
649 padding-top: 2px;
620 padding-bottom: 3px;
650 padding-bottom: 3px;
621 }
651 }
622
652
623 .icon22 {
653 .icon22 {
624 background-position: 0% 40%;
654 background-position: 0% 40%;
625 background-repeat: no-repeat;
655 background-repeat: no-repeat;
626 padding-left: 26px;
656 padding-left: 26px;
627 line-height: 22px;
657 line-height: 22px;
628 vertical-align: middle;
658 vertical-align: middle;
629 }
659 }
630
660
631 .icon-add { background-image: url(../images/add.png); }
661 .icon-add { background-image: url(../images/add.png); }
632 .icon-edit { background-image: url(../images/edit.png); }
662 .icon-edit { background-image: url(../images/edit.png); }
633 .icon-copy { background-image: url(../images/copy.png); }
663 .icon-copy { background-image: url(../images/copy.png); }
634 .icon-del { background-image: url(../images/delete.png); }
664 .icon-del { background-image: url(../images/delete.png); }
635 .icon-move { background-image: url(../images/move.png); }
665 .icon-move { background-image: url(../images/move.png); }
636 .icon-save { background-image: url(../images/save.png); }
666 .icon-save { background-image: url(../images/save.png); }
637 .icon-cancel { background-image: url(../images/cancel.png); }
667 .icon-cancel { background-image: url(../images/cancel.png); }
638 .icon-file { background-image: url(../images/file.png); }
668 .icon-file { background-image: url(../images/file.png); }
639 .icon-folder { background-image: url(../images/folder.png); }
669 .icon-folder { background-image: url(../images/folder.png); }
640 .open .icon-folder { background-image: url(../images/folder_open.png); }
670 .open .icon-folder { background-image: url(../images/folder_open.png); }
641 .icon-package { background-image: url(../images/package.png); }
671 .icon-package { background-image: url(../images/package.png); }
642 .icon-home { background-image: url(../images/home.png); }
672 .icon-home { background-image: url(../images/home.png); }
643 .icon-user { background-image: url(../images/user.png); }
673 .icon-user { background-image: url(../images/user.png); }
644 .icon-mypage { background-image: url(../images/user_page.png); }
674 .icon-mypage { background-image: url(../images/user_page.png); }
645 .icon-admin { background-image: url(../images/admin.png); }
675 .icon-admin { background-image: url(../images/admin.png); }
646 .icon-projects { background-image: url(../images/projects.png); }
676 .icon-projects { background-image: url(../images/projects.png); }
647 .icon-help { background-image: url(../images/help.png); }
677 .icon-help { background-image: url(../images/help.png); }
648 .icon-attachment { background-image: url(../images/attachment.png); }
678 .icon-attachment { background-image: url(../images/attachment.png); }
649 .icon-index { background-image: url(../images/index.png); }
679 .icon-index { background-image: url(../images/index.png); }
650 .icon-history { background-image: url(../images/history.png); }
680 .icon-history { background-image: url(../images/history.png); }
651 .icon-time { background-image: url(../images/time.png); }
681 .icon-time { background-image: url(../images/time.png); }
652 .icon-time-add { background-image: url(../images/time_add.png); }
682 .icon-time-add { background-image: url(../images/time_add.png); }
653 .icon-stats { background-image: url(../images/stats.png); }
683 .icon-stats { background-image: url(../images/stats.png); }
654 .icon-warning { background-image: url(../images/warning.png); }
684 .icon-warning { background-image: url(../images/warning.png); }
655 .icon-fav { background-image: url(../images/fav.png); }
685 .icon-fav { background-image: url(../images/fav.png); }
656 .icon-fav-off { background-image: url(../images/fav_off.png); }
686 .icon-fav-off { background-image: url(../images/fav_off.png); }
657 .icon-reload { background-image: url(../images/reload.png); }
687 .icon-reload { background-image: url(../images/reload.png); }
658 .icon-lock { background-image: url(../images/locked.png); }
688 .icon-lock { background-image: url(../images/locked.png); }
659 .icon-unlock { background-image: url(../images/unlock.png); }
689 .icon-unlock { background-image: url(../images/unlock.png); }
660 .icon-checked { background-image: url(../images/true.png); }
690 .icon-checked { background-image: url(../images/true.png); }
661 .icon-details { background-image: url(../images/zoom_in.png); }
691 .icon-details { background-image: url(../images/zoom_in.png); }
662 .icon-report { background-image: url(../images/report.png); }
692 .icon-report { background-image: url(../images/report.png); }
663 .icon-comment { background-image: url(../images/comment.png); }
693 .icon-comment { background-image: url(../images/comment.png); }
664
694
665 .icon22-projects { background-image: url(../images/22x22/projects.png); }
695 .icon22-projects { background-image: url(../images/22x22/projects.png); }
666 .icon22-users { background-image: url(../images/22x22/users.png); }
696 .icon22-users { background-image: url(../images/22x22/users.png); }
667 .icon22-tracker { background-image: url(../images/22x22/tracker.png); }
697 .icon22-tracker { background-image: url(../images/22x22/tracker.png); }
668 .icon22-role { background-image: url(../images/22x22/role.png); }
698 .icon22-role { background-image: url(../images/22x22/role.png); }
669 .icon22-workflow { background-image: url(../images/22x22/workflow.png); }
699 .icon22-workflow { background-image: url(../images/22x22/workflow.png); }
670 .icon22-options { background-image: url(../images/22x22/options.png); }
700 .icon22-options { background-image: url(../images/22x22/options.png); }
671 .icon22-notifications { background-image: url(../images/22x22/notifications.png); }
701 .icon22-notifications { background-image: url(../images/22x22/notifications.png); }
672 .icon22-authent { background-image: url(../images/22x22/authent.png); }
702 .icon22-authent { background-image: url(../images/22x22/authent.png); }
673 .icon22-info { background-image: url(../images/22x22/info.png); }
703 .icon22-info { background-image: url(../images/22x22/info.png); }
674 .icon22-comment { background-image: url(../images/22x22/comment.png); }
704 .icon22-comment { background-image: url(../images/22x22/comment.png); }
675 .icon22-package { background-image: url(../images/22x22/package.png); }
705 .icon22-package { background-image: url(../images/22x22/package.png); }
676 .icon22-settings { background-image: url(../images/22x22/settings.png); }
706 .icon22-settings { background-image: url(../images/22x22/settings.png); }
677 .icon22-plugin { background-image: url(../images/22x22/plugin.png); }
707 .icon22-plugin { background-image: url(../images/22x22/plugin.png); }
678
708
679 img.gravatar {
709 img.gravatar {
680 padding: 2px;
710 padding: 2px;
681 border: solid 1px #d5d5d5;
711 border: solid 1px #d5d5d5;
682 background: #fff;
712 background: #fff;
683 }
713 }
684
714
685 div.issue img.gravatar {
715 div.issue img.gravatar {
686 float: right;
716 float: right;
687 margin: 0 0 0 1em;
717 margin: 0 0 0 1em;
688 padding: 5px;
718 padding: 5px;
689 }
719 }
690
720
691 div.issue table img.gravatar {
721 div.issue table img.gravatar {
692 height: 14px;
722 height: 14px;
693 width: 14px;
723 width: 14px;
694 padding: 2px;
724 padding: 2px;
695 float: left;
725 float: left;
696 margin: 0 0.5em 0 0;
726 margin: 0 0.5em 0 0;
697 }
727 }
698
728
699 #history img.gravatar {
729 #history img.gravatar {
700 padding: 3px;
730 padding: 3px;
701 margin: 0 1.5em 1em 0;
731 margin: 0 1.5em 1em 0;
702 float: left;
732 float: left;
703 }
733 }
704
734
705 td.username img.gravatar {
735 td.username img.gravatar {
706 float: left;
736 float: left;
707 margin: 0 1em 0 0;
737 margin: 0 1em 0 0;
708 }
738 }
709
739
710 #activity dt img.gravatar {
740 #activity dt img.gravatar {
711 float: left;
741 float: left;
712 margin: 0 1em 1em 0;
742 margin: 0 1em 1em 0;
713 }
743 }
714
744
715 #activity dt,
745 #activity dt,
716 .journal {
746 .journal {
717 clear: left;
747 clear: left;
718 }
748 }
719
749
720 h2 img { vertical-align:middle; }
750 h2 img { vertical-align:middle; }
721
751
722
752
723 /***** Media print specific styles *****/
753 /***** Media print specific styles *****/
724 @media print {
754 @media print {
725 #top-menu, #header, #main-menu, #sidebar, #footer, .contextual, .other-formats { display:none; }
755 #top-menu, #header, #main-menu, #sidebar, #footer, .contextual, .other-formats { display:none; }
726 #main { background: #fff; }
756 #main { background: #fff; }
727 #content { width: 99%; margin: 0; padding: 0; border: 0; background: #fff; overflow: visible !important;}
757 #content { width: 99%; margin: 0; padding: 0; border: 0; background: #fff; overflow: visible !important;}
728 #wiki_add_attachment { display:none; }
758 #wiki_add_attachment { display:none; }
729 }
759 }
@@ -1,73 +1,89
1 # Redmine - project management software
1 # Redmine - project management software
2 # Copyright (C) 2006-2009 Jean-Philippe Lang
2 # Copyright (C) 2006-2009 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 require File.dirname(__FILE__) + '/../test_helper'
18 require File.dirname(__FILE__) + '/../test_helper'
19 require 'members_controller'
19 require 'members_controller'
20
20
21 # Re-raise errors caught by the controller.
21 # Re-raise errors caught by the controller.
22 class MembersController; def rescue_action(e) raise e end; end
22 class MembersController; def rescue_action(e) raise e end; end
23
23
24
24
25 class MembersControllerTest < Test::Unit::TestCase
25 class MembersControllerTest < Test::Unit::TestCase
26 fixtures :projects, :members, :roles, :users
26 fixtures :projects, :members, :roles, :users
27
27
28 def setup
28 def setup
29 @controller = MembersController.new
29 @controller = MembersController.new
30 @request = ActionController::TestRequest.new
30 @request = ActionController::TestRequest.new
31 @response = ActionController::TestResponse.new
31 @response = ActionController::TestResponse.new
32 User.current = nil
32 User.current = nil
33 @request.session[:user_id] = 2
33 @request.session[:user_id] = 2
34 end
34 end
35
35
36 def test_members_routing
36 def test_members_routing
37 assert_routing(
37 assert_routing(
38 {:method => :post, :path => 'projects/5234/members/new'},
38 {:method => :post, :path => 'projects/5234/members/new'},
39 :controller => 'members', :action => 'new', :id => '5234'
39 :controller => 'members', :action => 'new', :id => '5234'
40 )
40 )
41 end
41 end
42
42
43 def test_create
43 def test_create
44 assert_difference 'Member.count' do
44 assert_difference 'Member.count' do
45 post :new, :id => 1, :member => {:role_id => 1, :user_id => 7}
45 post :new, :id => 1, :member => {:role_id => 1, :user_id => 7}
46 end
46 end
47 assert_redirected_to '/projects/ecookbook/settings/members'
47 assert_redirected_to '/projects/ecookbook/settings/members'
48 assert User.find(7).member_of?(Project.find(1))
48 assert User.find(7).member_of?(Project.find(1))
49 end
49 end
50
50
51 def test_create_by_user_login
52 assert_difference 'Member.count' do
53 post :new, :id => 1, :member => {:role_id => 1, :user_login => 'someone'}
54 end
55 assert_redirected_to '/projects/ecookbook/settings/members'
56 assert User.find(7).member_of?(Project.find(1))
57 end
58
51 def test_create_multiple
59 def test_create_multiple
52 assert_difference 'Member.count', 3 do
60 assert_difference 'Member.count', 3 do
53 post :new, :id => 1, :member => {:role_id => 1, :user_ids => [7, 8, 9]}
61 post :new, :id => 1, :member => {:role_id => 1, :user_ids => [7, 8, 9]}
54 end
62 end
55 assert_redirected_to '/projects/ecookbook/settings/members'
63 assert_redirected_to '/projects/ecookbook/settings/members'
56 assert User.find(7).member_of?(Project.find(1))
64 assert User.find(7).member_of?(Project.find(1))
57 end
65 end
58
66
59 def test_edit
67 def test_edit
60 assert_no_difference 'Member.count' do
68 assert_no_difference 'Member.count' do
61 post :edit, :id => 2, :member => {:role_id => 1, :user_id => 3}
69 post :edit, :id => 2, :member => {:role_id => 1, :user_id => 3}
62 end
70 end
63 assert_redirected_to '/projects/ecookbook/settings/members'
71 assert_redirected_to '/projects/ecookbook/settings/members'
64 end
72 end
65
73
66 def test_destroy
74 def test_destroy
67 assert_difference 'Member.count', -1 do
75 assert_difference 'Member.count', -1 do
68 post :destroy, :id => 2
76 post :destroy, :id => 2
69 end
77 end
70 assert_redirected_to '/projects/ecookbook/settings/members'
78 assert_redirected_to '/projects/ecookbook/settings/members'
71 assert !User.find(3).member_of?(Project.find(1))
79 assert !User.find(3).member_of?(Project.find(1))
72 end
80 end
81
82 def test_autocomplete_for_member_login
83 get :autocomplete_for_member_login, :id => 1, :user => 'mis'
84 assert_response :success
85 assert_template 'autocomplete_for_member_login'
86
87 assert_tag :ul, :child => {:tag => 'li', :content => /miscuser8/}
88 end
73 end
89 end
General Comments 0
You need to be logged in to leave comments. Login now