@@ -0,0 +1,9 | |||||
|
1 | module Redmine | |||
|
2 | module Info | |||
|
3 | class << self | |||
|
4 | def app_name; 'Redmine' end | |||
|
5 | def url; 'http://www.redmine.org/' end | |||
|
6 | def versioned_name; "#{app_name} #{Redmine::VERSION}" end | |||
|
7 | end | |||
|
8 | end | |||
|
9 | end |
@@ -1,9 +1,9 | |||||
1 | <h2><%=l(:label_information_plural)%></h2> |
|
1 | <h2><%=l(:label_information_plural)%></h2> | |
2 |
|
2 | |||
3 |
<p><%=l(:field_version)%>: <strong> |
|
3 | <p><%=l(:field_version)%>: <strong><%= Redmine::Info.versioned_name %></strong> (<%= @db_adapter_name %>)</p> | |
4 |
|
4 | |||
5 | <table class="list"> |
|
5 | <table class="list"> | |
6 | <tr class="odd"><td>File repository writable</td><td><%= image_tag (@flags[:file_repository_writable] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr> |
|
6 | <tr class="odd"><td>File repository writable</td><td><%= image_tag (@flags[:file_repository_writable] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr> | |
7 | <tr class="even"><td>Default administrator account changed</td><td><%= image_tag (@flags[:default_admin_changed] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr> |
|
7 | <tr class="even"><td>Default administrator account changed</td><td><%= image_tag (@flags[:default_admin_changed] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr> | |
8 | <tr class="odd"><td>Textile available</td><td><%= image_tag (@flags[:textile_available] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr> |
|
8 | <tr class="odd"><td>Textile available</td><td><%= image_tag (@flags[:textile_available] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %></td></tr> | |
9 | </table> |
|
9 | </table> |
@@ -1,26 +1,26 | |||||
1 | xml.instruct! |
|
1 | xml.instruct! | |
2 | xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do |
|
2 | xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do | |
3 | xml.title @title |
|
3 | xml.title @title | |
4 | xml.link "rel" => "self", "href" => url_for(params.merge({:format => nil, :only_path => false})) |
|
4 | xml.link "rel" => "self", "href" => url_for(params.merge({:format => nil, :only_path => false})) | |
5 | xml.link "rel" => "alternate", "href" => url_for(:controller => 'welcome', :only_path => false) |
|
5 | xml.link "rel" => "alternate", "href" => url_for(:controller => 'welcome', :only_path => false) | |
6 | xml.id url_for(:controller => 'welcome', :only_path => false) |
|
6 | xml.id url_for(:controller => 'welcome', :only_path => false) | |
7 | xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema) |
|
7 | xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema) | |
8 | xml.author { xml.name "#{Setting.app_title}" } |
|
8 | xml.author { xml.name "#{Setting.app_title}" } | |
9 |
xml.generator(:uri => Redmine::Info.url, :version => Redmine::VERSION) { xml.text! |
|
9 | xml.generator(:uri => Redmine::Info.url, :version => Redmine::VERSION) { xml.text! Redmine::Info.versioned_name; } | |
10 | @items.each do |item| |
|
10 | @items.each do |item| | |
11 | xml.entry do |
|
11 | xml.entry do | |
12 | xml.title truncate(item.event_title, 100) |
|
12 | xml.title truncate(item.event_title, 100) | |
13 | xml.link "rel" => "alternate", "href" => url_for(item.event_url(:only_path => false)) |
|
13 | xml.link "rel" => "alternate", "href" => url_for(item.event_url(:only_path => false)) | |
14 | xml.id url_for(item.event_url(:only_path => false)) |
|
14 | xml.id url_for(item.event_url(:only_path => false)) | |
15 | xml.updated item.event_datetime.xmlschema |
|
15 | xml.updated item.event_datetime.xmlschema | |
16 | author = item.event_author |
|
16 | author = item.event_author | |
17 | xml.author do |
|
17 | xml.author do | |
18 | xml.name(author.is_a?(User) ? author.name : author) |
|
18 | xml.name(author.is_a?(User) ? author.name : author) | |
19 | xml.email(author.mail) if author.is_a?(User) |
|
19 | xml.email(author.mail) if author.is_a?(User) | |
20 | end if author |
|
20 | end if author | |
21 | xml.content "type" => "html" do |
|
21 | xml.content "type" => "html" do | |
22 | xml.text! textilizable(item.event_description) |
|
22 | xml.text! textilizable(item.event_description) | |
23 | end |
|
23 | end | |
24 | end |
|
24 | end | |
25 | end |
|
25 | end | |
26 | end |
|
26 | end |
@@ -1,111 +1,111 | |||||
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
|
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> | |
2 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> |
|
2 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | |
3 | <head> |
|
3 | <head> | |
4 | <title><%= Setting.app_title + (@html_title ? ": #{@html_title}" : "") %></title> |
|
4 | <title><%= Setting.app_title + (@html_title ? ": #{@html_title}" : "") %></title> | |
5 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
|
5 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
6 |
<meta name="description" content=" |
|
6 | <meta name="description" content="<%= Redmine::Info.app_name %>" /> | |
7 | <meta name="keywords" content="issue,bug,tracker" /> |
|
7 | <meta name="keywords" content="issue,bug,tracker" /> | |
8 | <!--[if IE]> |
|
8 | <!--[if IE]> | |
9 | <style type="text/css"> |
|
9 | <style type="text/css"> | |
10 | body {behavior: url(<%= stylesheet_path "csshover.htc" %>);} |
|
10 | body {behavior: url(<%= stylesheet_path "csshover.htc" %>);} | |
11 | </style> |
|
11 | </style> | |
12 | <![endif]--> |
|
12 | <![endif]--> | |
13 | <%= stylesheet_link_tag "application" %> |
|
13 | <%= stylesheet_link_tag "application" %> | |
14 | <%= stylesheet_link_tag "print", :media => "print" %> |
|
14 | <%= stylesheet_link_tag "print", :media => "print" %> | |
15 | <%= javascript_include_tag :defaults %> |
|
15 | <%= javascript_include_tag :defaults %> | |
16 | <%= javascript_include_tag 'menu' %> |
|
16 | <%= javascript_include_tag 'menu' %> | |
17 | <%= stylesheet_link_tag 'jstoolbar' %> |
|
17 | <%= stylesheet_link_tag 'jstoolbar' %> | |
18 | <!-- page specific tags --><%= yield :header_tags %> |
|
18 | <!-- page specific tags --><%= yield :header_tags %> | |
19 | </head> |
|
19 | </head> | |
20 |
|
20 | |||
21 | <body> |
|
21 | <body> | |
22 | <div id="container" > |
|
22 | <div id="container" > | |
23 |
|
23 | |||
24 | <div id="header"> |
|
24 | <div id="header"> | |
25 | <div style="float: left;"> |
|
25 | <div style="float: left;"> | |
26 | <h1><%= Setting.app_title %></h1> |
|
26 | <h1><%= Setting.app_title %></h1> | |
27 | <h2><%= Setting.app_subtitle %></h2> |
|
27 | <h2><%= Setting.app_subtitle %></h2> | |
28 | </div> |
|
28 | </div> | |
29 | <div style="float: right; padding-right: 1em; padding-top: 0.2em;"> |
|
29 | <div style="float: right; padding-right: 1em; padding-top: 0.2em;"> | |
30 | <% if User.current.logged? %><small><%=l(:label_logged_as)%> <strong><%= User.current.login %></strong> -</small><% end %> |
|
30 | <% if User.current.logged? %><small><%=l(:label_logged_as)%> <strong><%= User.current.login %></strong> -</small><% end %> | |
31 | <small><%= toggle_link l(:label_search), 'quick-search-form', :focus => 'quick-search-input' %></small> |
|
31 | <small><%= toggle_link l(:label_search), 'quick-search-form', :focus => 'quick-search-input' %></small> | |
32 | <% form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get, :id => 'quick-search-form', :style => "display:none;" ) do %> |
|
32 | <% form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get, :id => 'quick-search-form', :style => "display:none;" ) do %> | |
33 | <%= text_field_tag 'q', @question, :size => 15, :class => 'small', :id => 'quick-search-input' %> |
|
33 | <%= text_field_tag 'q', @question, :size => 15, :class => 'small', :id => 'quick-search-input' %> | |
34 | <% end %> |
|
34 | <% end %> | |
35 | </div> |
|
35 | </div> | |
36 | </div> |
|
36 | </div> | |
37 |
|
37 | |||
38 | <div id="navigation"> |
|
38 | <div id="navigation"> | |
39 | <ul> |
|
39 | <ul> | |
40 | <li><%= link_to l(:label_home), { :controller => 'welcome' }, :class => "icon icon-home" %></li> |
|
40 | <li><%= link_to l(:label_home), { :controller => 'welcome' }, :class => "icon icon-home" %></li> | |
41 | <li><%= link_to l(:label_my_page), { :controller => 'my', :action => 'page'}, :class => "icon icon-mypage" %></li> |
|
41 | <li><%= link_to l(:label_my_page), { :controller => 'my', :action => 'page'}, :class => "icon icon-mypage" %></li> | |
42 |
|
42 | |||
43 | <% if User.current.memberships.any? %> |
|
43 | <% if User.current.memberships.any? %> | |
44 | <li class="submenu"><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "icon icon-projects", :onmouseover => "buttonMouseover(event, 'menuAllProjects');" %></li> |
|
44 | <li class="submenu"><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "icon icon-projects", :onmouseover => "buttonMouseover(event, 'menuAllProjects');" %></li> | |
45 | <% else %> |
|
45 | <% else %> | |
46 | <li><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "icon icon-projects" %></li> |
|
46 | <li><%= link_to l(:label_project_plural), { :controller => 'projects' }, :class => "icon icon-projects" %></li> | |
47 | <% end %> |
|
47 | <% end %> | |
48 |
|
48 | |||
49 | <% if User.current.logged? %> |
|
49 | <% if User.current.logged? %> | |
50 | <li><%= link_to l(:label_my_account), { :controller => 'my', :action => 'account' }, :class => "icon icon-user" %></li> |
|
50 | <li><%= link_to l(:label_my_account), { :controller => 'my', :action => 'account' }, :class => "icon icon-user" %></li> | |
51 | <% end %> |
|
51 | <% end %> | |
52 |
|
52 | |||
53 | <% if User.current.admin? %> |
|
53 | <% if User.current.admin? %> | |
54 | <li class="submenu"><%= link_to l(:label_administration), { :controller => 'admin' }, :class => "icon icon-admin", :onmouseover => "buttonMouseover(event, 'menuAdmin');" %></li> |
|
54 | <li class="submenu"><%= link_to l(:label_administration), { :controller => 'admin' }, :class => "icon icon-admin", :onmouseover => "buttonMouseover(event, 'menuAdmin');" %></li> | |
55 | <% end %> |
|
55 | <% end %> | |
56 |
|
56 | |||
57 | <li class="right"><%= link_to l(:label_help), { :controller => 'help', :ctrl => params[:controller], :page => params[:action] }, :onclick => "window.open(this.href); return false;", :class => "icon icon-help" %></li> |
|
57 | <li class="right"><%= link_to l(:label_help), { :controller => 'help', :ctrl => params[:controller], :page => params[:action] }, :onclick => "window.open(this.href); return false;", :class => "icon icon-help" %></li> | |
58 |
|
58 | |||
59 | <% if User.current.logged? %> |
|
59 | <% if User.current.logged? %> | |
60 | <li class="right"><%= link_to l(:label_logout), { :controller => 'account', :action => 'logout' }, :class => "icon icon-user" %></li> |
|
60 | <li class="right"><%= link_to l(:label_logout), { :controller => 'account', :action => 'logout' }, :class => "icon icon-user" %></li> | |
61 | <% else %> |
|
61 | <% else %> | |
62 | <li class="right"><%= link_to l(:label_login), { :controller => 'account', :action => 'login' }, :class => "icon icon-user" %></li> |
|
62 | <li class="right"><%= link_to l(:label_login), { :controller => 'account', :action => 'login' }, :class => "icon icon-user" %></li> | |
63 | <% end %> |
|
63 | <% end %> | |
64 | </ul> |
|
64 | </ul> | |
65 | </div> |
|
65 | </div> | |
66 |
|
66 | |||
67 | <% if User.current.admin? %> |
|
67 | <% if User.current.admin? %> | |
68 | <%= render :partial => 'admin/menu' %> |
|
68 | <%= render :partial => 'admin/menu' %> | |
69 | <% end %> |
|
69 | <% end %> | |
70 |
|
70 | |||
71 | <% if User.current.memberships.any? %> |
|
71 | <% if User.current.memberships.any? %> | |
72 | <div id="menuAllProjects" class="menu" onmouseover="menuMouseover(event)"> |
|
72 | <div id="menuAllProjects" class="menu" onmouseover="menuMouseover(event)"> | |
73 | <%= link_to l(:label_project_all), {:controller => 'projects' }, :class => "menuItem" %> |
|
73 | <%= link_to l(:label_project_all), {:controller => 'projects' }, :class => "menuItem" %> | |
74 | <% User.current.memberships.find(:all, :limit => 20).each do |membership| %> |
|
74 | <% User.current.memberships.find(:all, :limit => 20).each do |membership| %> | |
75 | <%= link_to membership.project.name, {:controller => 'projects',:action => 'show', :id => membership.project }, :class => "menuItem" %> |
|
75 | <%= link_to membership.project.name, {:controller => 'projects',:action => 'show', :id => membership.project }, :class => "menuItem" %> | |
76 | <% end %> |
|
76 | <% end %> | |
77 | </div> |
|
77 | </div> | |
78 | <% end %> |
|
78 | <% end %> | |
79 |
|
79 | |||
80 | <div id="subcontent"> |
|
80 | <div id="subcontent"> | |
81 | <% if @project && !@project.new_record? %> |
|
81 | <% if @project && !@project.new_record? %> | |
82 | <h2><%= @project.name %></h2> |
|
82 | <h2><%= @project.name %></h2> | |
83 | <ul class="menublock"> |
|
83 | <ul class="menublock"> | |
84 | <% Redmine::MenuManager.allowed_items(:project_menu, current_role).each do |item| %> |
|
84 | <% Redmine::MenuManager.allowed_items(:project_menu, current_role).each do |item| %> | |
85 | <% unless item.condition && !item.condition.call(@project) %> |
|
85 | <% unless item.condition && !item.condition.call(@project) %> | |
86 | <li><%= link_to l(item.name), {item.param => @project}.merge(item.url) %></li> |
|
86 | <li><%= link_to l(item.name), {item.param => @project}.merge(item.url) %></li> | |
87 | <% end %> |
|
87 | <% end %> | |
88 | <% end %> |
|
88 | <% end %> | |
89 | </ul> |
|
89 | </ul> | |
90 | <% end %> |
|
90 | <% end %> | |
91 | </div> |
|
91 | </div> | |
92 |
|
92 | |||
93 | <div id="content"> |
|
93 | <div id="content"> | |
94 | <div id="flash"> |
|
94 | <div id="flash"> | |
95 | <%= content_tag('div', flash[:error], :class => 'error') if flash[:error] %> |
|
95 | <%= content_tag('div', flash[:error], :class => 'error') if flash[:error] %> | |
96 | <%= content_tag('div', flash[:notice], :class => 'notice') if flash[:notice] %> |
|
96 | <%= content_tag('div', flash[:notice], :class => 'notice') if flash[:notice] %> | |
97 | </div> |
|
97 | </div> | |
98 | <%= yield %> |
|
98 | <%= yield %> | |
99 | </div> |
|
99 | </div> | |
100 |
|
100 | |||
101 | <div id="ajax-indicator" style="display:none;"> |
|
101 | <div id="ajax-indicator" style="display:none;"> | |
102 | <span><%= l(:label_loading) %></span> |
|
102 | <span><%= l(:label_loading) %></span> | |
103 | </div> |
|
103 | </div> | |
104 |
|
104 | |||
105 | <div id="footer"> |
|
105 | <div id="footer"> | |
106 |
<p>< |
|
106 | <p><%= link_to Redmine::Info.app_name, Redmine::Info.url %> <small><%= Redmine::VERSION %> © 2006-2007 Jean-Philippe Lang</small></p> | |
107 | </div> |
|
107 | </div> | |
108 |
|
108 | |||
109 | </div> |
|
109 | </div> | |
110 | </body> |
|
110 | </body> | |
111 | </html> |
|
111 | </html> |
@@ -1,88 +1,87 | |||||
1 | require 'redmine/version' |
|
|||
2 |
|
|
1 | require 'redmine/access_control' | |
3 | require 'redmine/menu_manager' |
|
2 | require 'redmine/menu_manager' | |
4 | require 'redmine/mime_type' |
|
3 | require 'redmine/mime_type' | |
5 | require 'redmine/acts_as_watchable/init' |
|
4 | require 'redmine/acts_as_watchable/init' | |
6 | require 'redmine/acts_as_event/init' |
|
5 | require 'redmine/acts_as_event/init' | |
7 |
|
6 | |||
8 | begin |
|
7 | begin | |
9 | require_library_or_gem 'rmagick' unless Object.const_defined?(:Magick) |
|
8 | require_library_or_gem 'rmagick' unless Object.const_defined?(:Magick) | |
10 | rescue LoadError |
|
9 | rescue LoadError | |
11 | # RMagick is not available |
|
10 | # RMagick is not available | |
12 | end |
|
11 | end | |
13 |
|
12 | |||
14 | REDMINE_SUPPORTED_SCM = %w( Subversion Darcs Mercurial Cvs ) |
|
13 | REDMINE_SUPPORTED_SCM = %w( Subversion Darcs Mercurial Cvs ) | |
15 |
|
14 | |||
16 | # Permissions |
|
15 | # Permissions | |
17 | Redmine::AccessControl.map do |map| |
|
16 | Redmine::AccessControl.map do |map| | |
18 | # Project |
|
17 | # Project | |
19 | map.permission :view_project, {:projects => [:show, :activity, :changelog, :roadmap, :feeds]}, :public => true |
|
18 | map.permission :view_project, {:projects => [:show, :activity, :changelog, :roadmap, :feeds]}, :public => true | |
20 | map.permission :search_project, {:search => :index}, :public => true |
|
19 | map.permission :search_project, {:search => :index}, :public => true | |
21 | map.permission :edit_project, {:projects => [:settings, :edit]}, :require => :member |
|
20 | map.permission :edit_project, {:projects => [:settings, :edit]}, :require => :member | |
22 | map.permission :manage_members, {:projects => [:settings, :add_member], :members => [:edit, :destroy]}, :require => :member |
|
21 | map.permission :manage_members, {:projects => [:settings, :add_member], :members => [:edit, :destroy]}, :require => :member | |
23 | map.permission :manage_versions, {:projects => [:settings, :add_version], :versions => [:edit, :destroy]}, :require => :member |
|
22 | map.permission :manage_versions, {:projects => [:settings, :add_version], :versions => [:edit, :destroy]}, :require => :member | |
24 | map.permission :manage_categories, {:projects => [:settings, :add_issue_category], :issue_categories => [:edit, :destroy]}, :require => :member |
|
23 | map.permission :manage_categories, {:projects => [:settings, :add_issue_category], :issue_categories => [:edit, :destroy]}, :require => :member | |
25 |
|
24 | |||
26 | # Issues |
|
25 | # Issues | |
27 | map.permission :view_issues, {:projects => [:list_issues, :export_issues_csv, :export_issues_pdf], |
|
26 | map.permission :view_issues, {:projects => [:list_issues, :export_issues_csv, :export_issues_pdf], | |
28 | :issues => [:show, :export_pdf], |
|
27 | :issues => [:show, :export_pdf], | |
29 | :queries => :index, |
|
28 | :queries => :index, | |
30 | :reports => :issue_report}, :public => true |
|
29 | :reports => :issue_report}, :public => true | |
31 | map.permission :add_issues, {:projects => :add_issue}, :require => :loggedin |
|
30 | map.permission :add_issues, {:projects => :add_issue}, :require => :loggedin | |
32 | map.permission :edit_issues, {:issues => [:edit, :destroy_attachment]}, :require => :loggedin |
|
31 | map.permission :edit_issues, {:issues => [:edit, :destroy_attachment]}, :require => :loggedin | |
33 | map.permission :manage_issue_relations, {:issue_relations => [:new, :destroy]}, :require => :loggedin |
|
32 | map.permission :manage_issue_relations, {:issue_relations => [:new, :destroy]}, :require => :loggedin | |
34 | map.permission :add_issue_notes, {:issues => :add_note}, :require => :loggedin |
|
33 | map.permission :add_issue_notes, {:issues => :add_note}, :require => :loggedin | |
35 | map.permission :change_issue_status, {:issues => :change_status}, :require => :loggedin |
|
34 | map.permission :change_issue_status, {:issues => :change_status}, :require => :loggedin | |
36 | map.permission :move_issues, {:projects => :move_issues}, :require => :loggedin |
|
35 | map.permission :move_issues, {:projects => :move_issues}, :require => :loggedin | |
37 | map.permission :delete_issues, {:issues => :destroy}, :require => :member |
|
36 | map.permission :delete_issues, {:issues => :destroy}, :require => :member | |
38 | # Queries |
|
37 | # Queries | |
39 | map.permission :manage_pulic_queries, {:queries => [:new, :edit, :destroy]}, :require => :member |
|
38 | map.permission :manage_pulic_queries, {:queries => [:new, :edit, :destroy]}, :require => :member | |
40 | map.permission :save_queries, {:queries => [:new, :edit, :destroy]}, :require => :loggedin |
|
39 | map.permission :save_queries, {:queries => [:new, :edit, :destroy]}, :require => :loggedin | |
41 | # Gantt & calendar |
|
40 | # Gantt & calendar | |
42 | map.permission :view_gantt, :projects => :gantt |
|
41 | map.permission :view_gantt, :projects => :gantt | |
43 | map.permission :view_calendar, :projects => :calendar |
|
42 | map.permission :view_calendar, :projects => :calendar | |
44 | # Time tracking |
|
43 | # Time tracking | |
45 | map.permission :log_time, {:timelog => :edit}, :require => :loggedin |
|
44 | map.permission :log_time, {:timelog => :edit}, :require => :loggedin | |
46 | map.permission :view_time_entries, :timelog => [:details, :report] |
|
45 | map.permission :view_time_entries, :timelog => [:details, :report] | |
47 | # News |
|
46 | # News | |
48 | map.permission :view_news, {:projects => :list_news, :news => :show}, :public => true |
|
47 | map.permission :view_news, {:projects => :list_news, :news => :show}, :public => true | |
49 | map.permission :manage_news, {:projects => :add_news, :news => [:edit, :destroy, :destroy_comment]}, :require => :member |
|
48 | map.permission :manage_news, {:projects => :add_news, :news => [:edit, :destroy, :destroy_comment]}, :require => :member | |
50 | map.permission :comment_news, {:news => :add_comment}, :require => :loggedin |
|
49 | map.permission :comment_news, {:news => :add_comment}, :require => :loggedin | |
51 | # Documents |
|
50 | # Documents | |
52 | map.permission :view_documents, :projects => :list_documents, :documents => [:show, :download] |
|
51 | map.permission :view_documents, :projects => :list_documents, :documents => [:show, :download] | |
53 | map.permission :manage_documents, {:projects => :add_document, :documents => [:edit, :destroy, :add_attachment, :destroy_attachment]}, :require => :loggedin |
|
52 | map.permission :manage_documents, {:projects => :add_document, :documents => [:edit, :destroy, :add_attachment, :destroy_attachment]}, :require => :loggedin | |
54 | # Wiki |
|
53 | # Wiki | |
55 | map.permission :view_wiki_pages, :wiki => [:index, :history, :diff, :special] |
|
54 | map.permission :view_wiki_pages, :wiki => [:index, :history, :diff, :special] | |
56 | map.permission :edit_wiki_pages, :wiki => [:edit, :preview, :add_attachment, :destroy_attachment] |
|
55 | map.permission :edit_wiki_pages, :wiki => [:edit, :preview, :add_attachment, :destroy_attachment] | |
57 | map.permission :delete_wiki_pages, {:wiki => :destroy}, :require => :member |
|
56 | map.permission :delete_wiki_pages, {:wiki => :destroy}, :require => :member | |
58 | # Message boards |
|
57 | # Message boards | |
59 | map.permission :view_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true |
|
58 | map.permission :view_messages, {:boards => [:index, :show], :messages => [:show]}, :public => true | |
60 | map.permission :add_messages, {:messages => [:new, :reply]}, :require => :loggedin |
|
59 | map.permission :add_messages, {:messages => [:new, :reply]}, :require => :loggedin | |
61 | map.permission :manage_boards, {:boards => [:new, :edit, :destroy]}, :require => :member |
|
60 | map.permission :manage_boards, {:boards => [:new, :edit, :destroy]}, :require => :member | |
62 | # Files |
|
61 | # Files | |
63 | map.permission :view_files, :projects => :list_files, :versions => :download |
|
62 | map.permission :view_files, :projects => :list_files, :versions => :download | |
64 | map.permission :manage_files, {:projects => :add_file, :versions => :destroy_file}, :require => :loggedin |
|
63 | map.permission :manage_files, {:projects => :add_file, :versions => :destroy_file}, :require => :loggedin | |
65 | # Repository |
|
64 | # Repository | |
66 | map.permission :browse_repository, :repositories => [:show, :browse, :entry, :changes, :diff, :stats, :graph] |
|
65 | map.permission :browse_repository, :repositories => [:show, :browse, :entry, :changes, :diff, :stats, :graph] | |
67 | map.permission :view_changesets, :repositories => [:show, :revisions, :revision] |
|
66 | map.permission :view_changesets, :repositories => [:show, :revisions, :revision] | |
68 | end |
|
67 | end | |
69 |
|
68 | |||
70 | # Project menu configuration |
|
69 | # Project menu configuration | |
71 | Redmine::MenuManager.map :project_menu do |menu| |
|
70 | Redmine::MenuManager.map :project_menu do |menu| | |
72 | menu.push :label_overview, :controller => 'projects', :action => 'show' |
|
71 | menu.push :label_overview, :controller => 'projects', :action => 'show' | |
73 | menu.push :label_calendar, :controller => 'projects', :action => 'calendar' |
|
72 | menu.push :label_calendar, :controller => 'projects', :action => 'calendar' | |
74 | menu.push :label_gantt, :controller => 'projects', :action => 'gantt' |
|
73 | menu.push :label_gantt, :controller => 'projects', :action => 'gantt' | |
75 | menu.push :label_issue_plural, :controller => 'projects', :action => 'list_issues' |
|
74 | menu.push :label_issue_plural, :controller => 'projects', :action => 'list_issues' | |
76 | menu.push :label_report_plural, :controller => 'reports', :action => 'issue_report' |
|
75 | menu.push :label_report_plural, :controller => 'reports', :action => 'issue_report' | |
77 | menu.push :label_activity, :controller => 'projects', :action => 'activity' |
|
76 | menu.push :label_activity, :controller => 'projects', :action => 'activity' | |
78 | menu.push :label_news_plural, :controller => 'projects', :action => 'list_news' |
|
77 | menu.push :label_news_plural, :controller => 'projects', :action => 'list_news' | |
79 | menu.push :label_change_log, :controller => 'projects', :action => 'changelog' |
|
78 | menu.push :label_change_log, :controller => 'projects', :action => 'changelog' | |
80 | menu.push :label_roadmap, :controller => 'projects', :action => 'roadmap' |
|
79 | menu.push :label_roadmap, :controller => 'projects', :action => 'roadmap' | |
81 | menu.push :label_document_plural, :controller => 'projects', :action => 'list_documents' |
|
80 | menu.push :label_document_plural, :controller => 'projects', :action => 'list_documents' | |
82 | menu.push :label_wiki, { :controller => 'wiki', :action => 'index', :page => nil }, :if => Proc.new { |p| p.wiki && !p.wiki.new_record? } |
|
81 | menu.push :label_wiki, { :controller => 'wiki', :action => 'index', :page => nil }, :if => Proc.new { |p| p.wiki && !p.wiki.new_record? } | |
83 | menu.push :label_board_plural, { :controller => 'boards', :action => 'index', :id => nil }, :param => :project_id, :if => Proc.new { |p| p.boards.any? } |
|
82 | menu.push :label_board_plural, { :controller => 'boards', :action => 'index', :id => nil }, :param => :project_id, :if => Proc.new { |p| p.boards.any? } | |
84 | menu.push :label_attachment_plural, :controller => 'projects', :action => 'list_files' |
|
83 | menu.push :label_attachment_plural, :controller => 'projects', :action => 'list_files' | |
85 | menu.push :label_search, :controller => 'search', :action => 'index' |
|
84 | menu.push :label_search, :controller => 'search', :action => 'index' | |
86 | menu.push :label_repository, { :controller => 'repositories', :action => 'show' }, :if => Proc.new { |p| p.repository && !p.repository.new_record? } |
|
85 | menu.push :label_repository, { :controller => 'repositories', :action => 'show' }, :if => Proc.new { |p| p.repository && !p.repository.new_record? } | |
87 | menu.push :label_settings, :controller => 'projects', :action => 'settings' |
|
86 | menu.push :label_settings, :controller => 'projects', :action => 'settings' | |
88 | end |
|
87 | end |
@@ -1,18 +1,11 | |||||
1 | module Redmine |
|
1 | module Redmine | |
2 | module VERSION #:nodoc: |
|
2 | module VERSION #:nodoc: | |
3 | MAJOR = 0 |
|
3 | MAJOR = 0 | |
4 | MINOR = 5 |
|
4 | MINOR = 5 | |
5 | TINY = 1 |
|
5 | TINY = 1 | |
6 |
|
6 | |||
7 | STRING= [MAJOR, MINOR, TINY].join('.') |
|
7 | STRING= [MAJOR, MINOR, TINY].join('.') | |
8 |
|
8 | |||
9 | def self.to_s; STRING end |
|
9 | def self.to_s; STRING end | |
10 | end |
|
10 | end | |
11 |
|
||||
12 | module Info |
|
|||
13 | class << self |
|
|||
14 | def name; 'Redmine' end |
|
|||
15 | def url; 'http://www.redmine.org/' end |
|
|||
16 | end |
|
|||
17 | end |
|
|||
18 | end |
|
11 | end |
General Comments 0
You need to be logged in to leave comments.
Login now