Merged 0.6 branch into trunk.
Permissions management was rewritten. Some permissions can now be specifically defined for non member and anonymous users. This migration: * is irreversible (please, don't forget to *backup* your database before upgrading) * resets role's permissions (go to "Admin -> Roles & Permissions" to set them after upgrading) git-svn-id: http://redmine.rubyforge.org/svn/trunk@674 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
8da5bad295
commit
603e11d7a5
93 files changed
+1120
-1235
No files matched your search
@@ -4,7 +4,7 @@
|
||||
<!--[form:project]-->
|
||||
<p><%= f.text_field :name, :required => true %><br /><em><%= l(:text_caracters_maximum, 30) %></em></p>
|
||||
|
||||
<% if admin_loggedin? and !@root_projects.empty? %>
|
||||
<% if User.current.admin? and !@root_projects.empty? %>
|
||||
<p><%= f.select :parent_id, (@root_projects.collect {|p| [p.name, p.id]}), { :include_blank => true } %></p>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<%= error_messages_for 'member' %>
|
||||
<% roles = Role.find(:all, :order => 'position') %>
|
||||
<% roles = Role.find_all_givable %>
|
||||
<% users = User.find_active(:all) - @project.users %>
|
||||
|
||||
<table class="list">
|
||||
|
||||
@@ -5,14 +5,11 @@
|
||||
<% form_tag do %>
|
||||
<p><%= select_month(@month, :prefix => "month", :discard_type => true) %>
|
||||
<%= select_year(@year, :prefix => "year", :discard_type => true) %></p>
|
||||
<p>
|
||||
<%= check_box_tag 'show_issues', 1, @show_issues %><%= hidden_field_tag 'show_issues', 0, :id => nil %> <%=l(:label_issue_plural)%><br />
|
||||
<% if @project.repository %><%= check_box_tag 'show_changesets', 1, @show_changesets %><%= hidden_field_tag 'show_changesets', 0, :id => nil %> <%=l(:label_revision_plural)%><br /><% end %>
|
||||
<%= check_box_tag 'show_news', 1, @show_news %><%= hidden_field_tag 'show_news', 0, :id => nil %> <%=l(:label_news_plural)%><br />
|
||||
<%= check_box_tag 'show_files', 1, @show_files %><%= hidden_field_tag 'show_files', 0, :id => nil %> <%=l(:label_attachment_plural)%><br />
|
||||
<%= check_box_tag 'show_documents', 1, @show_documents %><%= hidden_field_tag 'show_documents', 0, :id => nil %> <%=l(:label_document_plural)%><br />
|
||||
<% if @project.wiki %><%= check_box_tag 'show_wiki_edits', 1, @show_wiki_edits %><%= hidden_field_tag 'show_wiki_edits', 0, :id => nil %> <%=l(:label_wiki_edit_plural)%><% end %>
|
||||
</p>
|
||||
|
||||
<p><% @event_types.each do |t| %>
|
||||
<%= check_box_tag "show_#{t}", 1, @scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%><br />
|
||||
<% end %></p>
|
||||
|
||||
<p class="textcenter"><%= submit_tag l(:button_apply), :class => 'button-small' %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -20,33 +17,33 @@
|
||||
<% @events_by_day.keys.sort {|x,y| y <=> x }.each do |day| %>
|
||||
<h3><%= day_name(day.cwday) %> <%= day.day %></h3>
|
||||
<ul>
|
||||
<% @events_by_day[day].sort {|x,y| y.created_on <=> x.created_on }.each do |e| %>
|
||||
<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| %>
|
||||
<li><p>
|
||||
<% if e.is_a? Issue %>
|
||||
<%= e.created_on.strftime("%H:%M") %> <%= link_to_issue e %>: <%=h e.subject %><br />
|
||||
<%= e.event_datetime.strftime("%H:%M") %> <%= link_to_issue e %>: <%=h e.subject %><br />
|
||||
<i><%= e.author.name %></i>
|
||||
<% elsif e.is_a? Journal %>
|
||||
<%= e.created_on.strftime("%H:%M") %> <%= link_to_issue e.journalized %>
|
||||
(<%=h (status = IssueStatus.find_by_id(e.details.first.value)) ? status.name : '?' %>): <%=h e.journalized.subject %><br />
|
||||
<em><%=h e.user.name %><%=h ": #{truncate(e.notes, 500)}" unless e.notes.blank? %></em>
|
||||
<% elsif e.is_a? News %>
|
||||
<%= e.created_on.strftime("%H:%M") %> <%=l(:label_news)%>: <%= link_to h(e.title), :controller => 'news', :action => 'show', :id => e %><br />
|
||||
<%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_news)%>: <%= link_to h(e.title), :controller => 'news', :action => 'show', :id => e %><br />
|
||||
<% unless e.summary.empty? %><%=h e.summary %><br /><% end %>
|
||||
<i><%= e.author.name %></i>
|
||||
<% elsif (e.is_a? Attachment) and (e.container.is_a? Version) %>
|
||||
<%= e.created_on.strftime("%H:%M") %> <%=l(:label_attachment)%> (<%=h e.container.name %>): <%= link_to e.filename, :controller => 'projects', :action => 'list_files', :id => @project %><br />
|
||||
<%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_attachment)%> (<%=h e.container.name %>): <%= link_to e.filename, :controller => 'projects', :action => 'list_files', :id => @project %><br />
|
||||
<i><%= e.author.name %></i>
|
||||
<% elsif (e.is_a? Attachment) and (e.container.is_a? Document) %>
|
||||
<%= e.created_on.strftime("%H:%M") %> <%=l(:label_attachment)%>: <%= e.filename %> (<%= link_to h(e.container.title), :controller => 'documents', :action => 'show', :id => e.container %>)<br />
|
||||
<%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_attachment)%>: <%= e.filename %> (<%= link_to h(e.container.title), :controller => 'documents', :action => 'show', :id => e.container %>)<br />
|
||||
<i><%= e.author.name %></i>
|
||||
<% elsif e.is_a? Document %>
|
||||
<%= e.created_on.strftime("%H:%M") %> <%=l(:label_document)%>: <%= link_to h(e.title), :controller => 'documents', :action => 'show', :id => e %><br />
|
||||
<%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_document)%>: <%= link_to h(e.title), :controller => 'documents', :action => 'show', :id => e %><br />
|
||||
<% elsif e.is_a? WikiContent.versioned_class %>
|
||||
<%= e.created_on.strftime("%H:%M") %> <%=l(:label_wiki_edit)%>: <%= link_to h(WikiPage.pretty_title(e.title)), :controller => 'wiki', :page => e.title %>
|
||||
<%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_wiki_edit)%>: <%= link_to h(WikiPage.pretty_title(e.title)), :controller => 'wiki', :page => e.title %>
|
||||
(<%= link_to '#' + e.version.to_s, :controller => 'wiki', :page => e.title, :version => e.version %><%= ', ' + link_to('diff', :controller => 'wiki', :action => 'diff', :page => e.title, :version => e.version) if e.version > 1 %>)<br />
|
||||
<% unless e.comments.blank? %><em><%=h e.comments %></em><% end %>
|
||||
<% elsif e.is_a? Changeset %>
|
||||
<%= e.created_on.strftime("%H:%M") %> <%=l(:label_revision)%> <%= link_to h(e.revision), :controller => 'repositories', :action => 'revision', :id => @project, :rev => e.revision %><br />
|
||||
<%= e.event_datetime.strftime("%H:%M") %> <%=l(:label_revision)%> <%= link_to h(e.revision), :controller => 'repositories', :action => 'revision', :id => @project, :rev => e.revision %><br />
|
||||
<em><%=h e.committer.blank? ? "anonymous" : e.committer %><%= h(": #{truncate(e.comments, 500)}") unless e.comments.blank? %></em>
|
||||
<% end %>
|
||||
</p></li>
|
||||
@@ -69,3 +66,7 @@
|
||||
</div>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :year => nil, :month => nil, :key => User.current.rss_key})) %>
|
||||
<% end %>
|
||||
@@ -10,7 +10,7 @@
|
||||
<% for project in @projects %>
|
||||
<tr class="<%= cycle("odd", "even") %>">
|
||||
<td>
|
||||
<%= link_to project.name, {:action => 'show', :id => project}, :class => (@logged_in_user && @logged_in_user.role_for_project(project) ? "icon icon-fav" : "") %><br />
|
||||
<%= link_to project.name, {:action => 'show', :id => project}, :class => (User.current.member_of?(project) ? "icon icon-fav" : "") %><br />
|
||||
<%= textilizable project.description, :project => project %>
|
||||
</td>
|
||||
<td><%= link_to(project.parent.name, :action => 'show', :id => project.parent) unless project.parent.nil? %></td>
|
||||
@@ -20,7 +20,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<% if @logged_in_user %>
|
||||
<% if User.current.logged? %>
|
||||
<div class="contextual">
|
||||
<span class="icon icon-fav"><%= l(:label_my_projects) %></span>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<% if @query.new_record? %>
|
||||
<div class="contextual">
|
||||
<%= link_to l(:label_query_plural), :controller => 'queries', :project_id => @project %>
|
||||
<% if authorize_for('projects', 'add_issues') %>| <%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %>
|
||||
</div>
|
||||
<h2><%=l(:label_issue_plural)%></h2>
|
||||
|
||||
@@ -19,7 +20,7 @@
|
||||
:update => "content",
|
||||
}, :class => 'icon icon-reload' %>
|
||||
|
||||
<% if loggedin? %>
|
||||
<% if current_role.allowed_to?(:save_queries) %>
|
||||
<%= link_to_remote l(:button_save),
|
||||
{ :url => { :controller => 'queries', :action => 'new', :project_id => @project },
|
||||
:method => 'get',
|
||||
@@ -33,6 +34,7 @@
|
||||
<div class="contextual">
|
||||
<%= link_to l(:label_query_plural), {:controller => 'queries', :project_id => @project} %> |
|
||||
<%= link_to l(:label_issue_view_all), {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1} %>
|
||||
<% if authorize_for('projects', 'add_issues') %>| <%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %>
|
||||
</div>
|
||||
<h2><%= @query.name %></h2>
|
||||
<% end %>
|
||||
@@ -81,4 +83,4 @@
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -7,3 +7,7 @@
|
||||
<% if @news.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
|
||||
<%= render :partial => 'news/news', :collection => @news %>
|
||||
<%= pagination_links_full @news_pages %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
|
||||
<% end %>
|
||||
@@ -20,6 +20,7 @@
|
||||
</ul>
|
||||
|
||||
<div class="box">
|
||||
<div class="contextual"><% if authorize_for('projects', 'add_issues') %><%= l(:label_issue_new) %>: <%= new_issue_selector %><% end %></div>
|
||||
<h3 class="icon22 icon22-tracker"><%=l(:label_issue_tracking)%></h3>
|
||||
<ul>
|
||||
<% for tracker in @trackers %>
|
||||
@@ -49,7 +50,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @news.any? %>
|
||||
<% if @news.any? && authorize_for('projects', 'list_news') %>
|
||||
<div class="box">
|
||||
<h3><%=l(:label_news_latest)%></h3>
|
||||
<%= render :partial => 'news/news', :collection => @news %>
|
||||
|
||||
Reference in new issue
Block a user