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