##// END OF EJS Templates
Don't generate urls with params....
Jean-Philippe Lang -
r15250:f4e7765e0101
parent child
Show More
@@ -1,81 +1,89
1 # encoding: utf-8
1 # encoding: utf-8
2 #
2 #
3 # Redmine - project management software
3 # Redmine - project management software
4 # Copyright (C) 2006-2016 Jean-Philippe Lang
4 # Copyright (C) 2006-2016 Jean-Philippe Lang
5 #
5 #
6 # This program is free software; you can redistribute it and/or
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License
7 # modify it under the terms of the GNU General Public License
8 # as published by the Free Software Foundation; either version 2
8 # as published by the Free Software Foundation; either version 2
9 # of the License, or (at your option) any later version.
9 # of the License, or (at your option) any later version.
10 #
10 #
11 # This program is distributed in the hope that it will be useful,
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
14 # GNU General Public License for more details.
15 #
15 #
16 # You should have received a copy of the GNU General Public License
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
19
20 module RoutesHelper
20 module RoutesHelper
21
21
22 # Returns the path to project issues or to the cross-project
22 # Returns the path to project issues or to the cross-project
23 # issue list if project is nil
23 # issue list if project is nil
24 def _project_issues_path(project, *args)
24 def _project_issues_path(project, *args)
25 if project
25 if project
26 project_issues_path(project, *args)
26 project_issues_path(project, *args)
27 else
27 else
28 issues_path(*args)
28 issues_path(*args)
29 end
29 end
30 end
30 end
31
31
32 def _project_news_path(project, *args)
33 if project
34 project_news_index_path(project, *args)
35 else
36 news_index_path(*args)
37 end
38 end
39
32 def _new_project_issue_path(project, *args)
40 def _new_project_issue_path(project, *args)
33 if project
41 if project
34 new_project_issue_path(project, *args)
42 new_project_issue_path(project, *args)
35 else
43 else
36 new_issue_path(*args)
44 new_issue_path(*args)
37 end
45 end
38 end
46 end
39
47
40 def _project_calendar_path(project, *args)
48 def _project_calendar_path(project, *args)
41 project ? project_calendar_path(project, *args) : issues_calendar_path(*args)
49 project ? project_calendar_path(project, *args) : issues_calendar_path(*args)
42 end
50 end
43
51
44 def _project_gantt_path(project, *args)
52 def _project_gantt_path(project, *args)
45 project ? project_gantt_path(project, *args) : issues_gantt_path(*args)
53 project ? project_gantt_path(project, *args) : issues_gantt_path(*args)
46 end
54 end
47
55
48 def _time_entries_path(project, issue, *args)
56 def _time_entries_path(project, issue, *args)
49 if issue
57 if issue
50 issue_time_entries_path(issue, *args)
58 issue_time_entries_path(issue, *args)
51 elsif project
59 elsif project
52 project_time_entries_path(project, *args)
60 project_time_entries_path(project, *args)
53 else
61 else
54 time_entries_path(*args)
62 time_entries_path(*args)
55 end
63 end
56 end
64 end
57
65
58 def _report_time_entries_path(project, issue, *args)
66 def _report_time_entries_path(project, issue, *args)
59 if issue
67 if issue
60 report_issue_time_entries_path(issue, *args)
68 report_issue_time_entries_path(issue, *args)
61 elsif project
69 elsif project
62 report_project_time_entries_path(project, *args)
70 report_project_time_entries_path(project, *args)
63 else
71 else
64 report_time_entries_path(*args)
72 report_time_entries_path(*args)
65 end
73 end
66 end
74 end
67
75
68 def _new_time_entry_path(project, issue, *args)
76 def _new_time_entry_path(project, issue, *args)
69 if issue
77 if issue
70 new_issue_time_entry_path(issue, *args)
78 new_issue_time_entry_path(issue, *args)
71 elsif project
79 elsif project
72 new_project_time_entry_path(project, *args)
80 new_project_time_entry_path(project, *args)
73 else
81 else
74 new_time_entry_path(*args)
82 new_time_entry_path(*args)
75 end
83 end
76 end
84 end
77
85
78 def board_path(board, *args)
86 def board_path(board, *args)
79 project_board_path(board.project, board, *args)
87 project_board_path(board.project, board, *args)
80 end
88 end
81 end
89 end
@@ -1,72 +1,72
1 <h2><%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)).html_safe %></h2>
1 <h2><%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)).html_safe %></h2>
2 <p class="subtitle"><%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %></p>
2 <p class="subtitle"><%= l(:label_date_from_to, :start => format_date(@date_to - @days), :end => format_date(@date_to-1)) %></p>
3
3
4 <div id="activity">
4 <div id="activity">
5 <% @events_by_day.keys.sort.reverse.each do |day| %>
5 <% @events_by_day.keys.sort.reverse.each do |day| %>
6 <h3><%= format_activity_day(day) %></h3>
6 <h3><%= format_activity_day(day) %></h3>
7 <dl>
7 <dl>
8 <% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
8 <% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
9 <dt class="<%= e.event_type %> <%= "grouped" if in_group %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
9 <dt class="<%= e.event_type %> <%= "grouped" if in_group %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
10 <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %>
10 <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %>
11 <span class="time"><%= format_time(e.event_datetime, false) %></span>
11 <span class="time"><%= format_time(e.event_datetime, false) %></span>
12 <%= content_tag('span', e.project, :class => 'project') if @project.nil? || @project != e.project %>
12 <%= content_tag('span', e.project, :class => 'project') if @project.nil? || @project != e.project %>
13 <%= link_to format_activity_title(e.event_title), e.event_url %>
13 <%= link_to format_activity_title(e.event_title), e.event_url %>
14 </dt>
14 </dt>
15 <dd class="<%= "grouped" if in_group %>"><span class="description"><%= format_activity_description(e.event_description) %></span>
15 <dd class="<%= "grouped" if in_group %>"><span class="description"><%= format_activity_description(e.event_description) %></span>
16 <span class="author"><%= link_to_user(e.event_author) if e.respond_to?(:event_author) %></span></dd>
16 <span class="author"><%= link_to_user(e.event_author) if e.respond_to?(:event_author) %></span></dd>
17 <% end -%>
17 <% end -%>
18 </dl>
18 </dl>
19 <% end -%>
19 <% end -%>
20 </div>
20 </div>
21
21
22 <%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %>
22 <%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %>
23
23
24 <span class="pagination">
24 <span class="pagination">
25 <ul class="pages">
25 <ul class="pages">
26 <li class="previous page">
26 <li class="previous page">
27 <%= link_to("\xc2\xab " + l(:label_previous),
27 <%= link_to("\xc2\xab " + l(:label_previous),
28 {:params => request.query_parameters.merge(:from => @date_to - @days - 1)},
28 {:params => request.query_parameters.merge(:from => @date_to - @days - 1)},
29 :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1)),
29 :title => l(:label_date_from_to, :start => format_date(@date_to - 2*@days), :end => format_date(@date_to - @days - 1)),
30 :accesskey => accesskey(:previous)) %>
30 :accesskey => accesskey(:previous)) %>
31 </li><% unless @date_to >= User.current.today %><li class="next page">
31 </li><% unless @date_to >= User.current.today %><li class="next page">
32 <%= link_to(l(:label_next) + " \xc2\xbb",
32 <%= link_to(l(:label_next) + " \xc2\xbb",
33 {:params => request.query_parameters.merge(:from => @date_to + @days - 1)},
33 {:params => request.query_parameters.merge(:from => @date_to + @days - 1)},
34 :title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1)),
34 :title => l(:label_date_from_to, :start => format_date(@date_to), :end => format_date(@date_to + @days - 1)),
35 :accesskey => accesskey(:next)) %><% end %>
35 :accesskey => accesskey(:next)) %><% end %>
36 </li>
36 </li>
37 </ul>
37 </ul>
38 </span>
38 </span>
39 &nbsp;
39 &nbsp;
40 <% other_formats_links do |f| %>
40 <% other_formats_links do |f| %>
41 <%= f.link_to_with_query_parameters 'Atom', 'from' => nil, :key => User.current.rss_key %>
41 <%= f.link_to_with_query_parameters 'Atom', 'from' => nil, :key => User.current.rss_key %>
42 <% end %>
42 <% end %>
43
43
44 <% content_for :header_tags do %>
44 <% content_for :header_tags do %>
45 <%= auto_discovery_link_tag(:atom, params.merge(:format => 'atom', :from => nil, :key => User.current.rss_key)) %>
45 <%= auto_discovery_link_tag(:atom, :params => request.query_parameters.merge(:from => nil, :key => User.current.rss_key), :format => 'atom') %>
46 <% end %>
46 <% end %>
47
47
48 <% content_for :sidebar do %>
48 <% content_for :sidebar do %>
49 <%= form_tag({}, :method => :get) do %>
49 <%= form_tag({}, :method => :get) do %>
50 <h3><%= l(:label_activity) %></h3>
50 <h3><%= l(:label_activity) %></h3>
51 <ul>
51 <ul>
52 <% @activity.event_types.each do |t| %>
52 <% @activity.event_types.each do |t| %>
53 <li>
53 <li>
54 <%= check_box_tag "show_#{t}", 1, @activity.scope.include?(t) %>
54 <%= check_box_tag "show_#{t}", 1, @activity.scope.include?(t) %>
55 <label for="show_<%=t%>">
55 <label for="show_<%=t%>">
56 <%= link_to(l("label_#{t.singularize}_plural"),
56 <%= link_to(l("label_#{t.singularize}_plural"),
57 {"show_#{t}" => 1, :user_id => params[:user_id], :from => params[:from]})%>
57 {"show_#{t}" => 1, :user_id => params[:user_id], :from => params[:from]})%>
58 </label>
58 </label>
59 </li>
59 </li>
60 <% end %>
60 <% end %>
61 </ul>
61 </ul>
62 <% if @project && @project.descendants.active.any? %>
62 <% if @project && @project.descendants.active.any? %>
63 <%= hidden_field_tag 'with_subprojects', 0, :id => nil %>
63 <%= hidden_field_tag 'with_subprojects', 0, :id => nil %>
64 <p><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label></p>
64 <p><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label></p>
65 <% end %>
65 <% end %>
66 <%= hidden_field_tag('user_id', params[:user_id]) unless params[:user_id].blank? %>
66 <%= hidden_field_tag('user_id', params[:user_id]) unless params[:user_id].blank? %>
67 <%= hidden_field_tag('from', params[:from]) unless params[:from].blank? %>
67 <%= hidden_field_tag('from', params[:from]) unless params[:from].blank? %>
68 <p><%= submit_tag l(:button_apply), :class => 'button-small', :name => 'submit' %></p>
68 <p><%= submit_tag l(:button_apply), :class => 'button-small', :name => 'submit' %></p>
69 <% end %>
69 <% end %>
70 <% end %>
70 <% end %>
71
71
72 <% html_title(l(:label_activity), @author) -%>
72 <% html_title(l(:label_activity), @author) -%>
@@ -1,32 +1,32
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 truncate_single_line_raw(@title, 100)
3 xml.title truncate_single_line_raw(@title, 100)
4 xml.link "rel" => "self", "href" => url_for(params.merge(:only_path => false))
4 xml.link "rel" => "self", "href" => url_for(:params => request.query_parameters, :only_path => false, :format => 'atom')
5 xml.link "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil))
5 xml.link "rel" => "alternate", "href" => url_for(:params => request.query_parameters.merge(:format => nil, :key => nil), :only_path => false)
6 xml.id home_url
6 xml.id home_url
7 xml.icon favicon_url
7 xml.icon favicon_url
8 xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
8 xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
9 xml.author { xml.name "#{Setting.app_title}" }
9 xml.author { xml.name "#{Setting.app_title}" }
10 xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; }
10 xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; }
11 @items.each do |item|
11 @items.each do |item|
12 xml.entry do
12 xml.entry do
13 url = url_for(item.event_url(:only_path => false))
13 url = url_for(item.event_url(:only_path => false))
14 if @project
14 if @project
15 xml.title truncate_single_line_raw(item.event_title, 100)
15 xml.title truncate_single_line_raw(item.event_title, 100)
16 else
16 else
17 xml.title truncate_single_line_raw("#{item.project} - #{item.event_title}", 100)
17 xml.title truncate_single_line_raw("#{item.project} - #{item.event_title}", 100)
18 end
18 end
19 xml.link "rel" => "alternate", "href" => url
19 xml.link "rel" => "alternate", "href" => url
20 xml.id url
20 xml.id url
21 xml.updated item.event_datetime.xmlschema
21 xml.updated item.event_datetime.xmlschema
22 author = item.event_author if item.respond_to?(:event_author)
22 author = item.event_author if item.respond_to?(:event_author)
23 xml.author do
23 xml.author do
24 xml.name(author)
24 xml.name(author)
25 xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail
25 xml.email(author.mail) if author.is_a?(User) && !author.mail.blank? && !author.pref.hide_mail
26 end if author
26 end if author
27 xml.content "type" => "html" do
27 xml.content "type" => "html" do
28 xml.text! textilizable(item, :event_description, :only_path => false)
28 xml.text! textilizable(item, :event_description, :only_path => false)
29 end
29 end
30 end
30 end
31 end
31 end
32 end
32 end
@@ -1,51 +1,51
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to(l(:label_news_new),
2 <%= link_to(l(:label_news_new),
3 new_project_news_path(@project),
3 new_project_news_path(@project),
4 :class => 'icon icon-add',
4 :class => 'icon icon-add',
5 :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
5 :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
6 <%= watcher_link(@project.enabled_module('news'), User.current) if @project && User.current.logged? %>
6 <%= watcher_link(@project.enabled_module('news'), User.current) if @project && User.current.logged? %>
7 </div>
7 </div>
8
8
9 <div id="add-news" style="display:none;">
9 <div id="add-news" style="display:none;">
10 <h2><%=l(:label_news_new)%></h2>
10 <h2><%=l(:label_news_new)%></h2>
11 <%= labelled_form_for @news, :url => project_news_index_path(@project),
11 <%= labelled_form_for @news, :url => project_news_index_path(@project),
12 :html => { :id => 'news-form', :multipart => true } do |f| %>
12 :html => { :id => 'news-form', :multipart => true } do |f| %>
13 <%= render :partial => 'news/form', :locals => { :f => f } %>
13 <%= render :partial => 'news/form', :locals => { :f => f } %>
14 <%= submit_tag l(:button_create) %>
14 <%= submit_tag l(:button_create) %>
15 <%= preview_link preview_news_path(:project_id => @project), 'news-form' %> |
15 <%= preview_link preview_news_path(:project_id => @project), 'news-form' %> |
16 <%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' %>
16 <%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' %>
17 <% end if @project %>
17 <% end if @project %>
18 <div id="preview" class="wiki"></div>
18 <div id="preview" class="wiki"></div>
19 </div>
19 </div>
20
20
21 <h2><%=l(:label_news_plural)%></h2>
21 <h2><%=l(:label_news_plural)%></h2>
22
22
23 <% if @newss.empty? %>
23 <% if @newss.empty? %>
24 <p class="nodata"><%= l(:label_no_data) %></p>
24 <p class="nodata"><%= l(:label_no_data) %></p>
25 <% else %>
25 <% else %>
26 <% @newss.each do |news| %>
26 <% @newss.each do |news| %>
27 <article class="news-article">
27 <article class="news-article">
28 <header>
28 <header>
29 <h3><%= avatar(news.author, :size => "24") %><%= link_to_project(news.project) + ': ' unless news.project == @project %>
29 <h3><%= avatar(news.author, :size => "24") %><%= link_to_project(news.project) + ': ' unless news.project == @project %>
30 <%= link_to h(news.title), news_path(news) %>
30 <%= link_to h(news.title), news_path(news) %>
31 <%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></h3>
31 <%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></h3>
32 <p class="author"><%= authoring news.created_on, news.author %></p>
32 <p class="author"><%= authoring news.created_on, news.author %></p>
33 </header>
33 </header>
34 <div class="wiki">
34 <div class="wiki">
35 <%= textilizable(news, :description) %>
35 <%= textilizable(news, :description) %>
36 </div>
36 </div>
37 </article>
37 </article>
38 <% end %>
38 <% end %>
39 <% end %>
39 <% end %>
40 <span class="pagination"><%= pagination_links_full @news_pages %></span>
40 <span class="pagination"><%= pagination_links_full @news_pages %></span>
41
41
42 <% other_formats_links do |f| %>
42 <% other_formats_links do |f| %>
43 <%= f.link_to 'Atom', :url => {:project_id => @project, :key => User.current.rss_key} %>
43 <%= f.link_to 'Atom', :url => {:project_id => @project, :key => User.current.rss_key} %>
44 <% end %>
44 <% end %>
45
45
46 <% content_for :header_tags do %>
46 <% content_for :header_tags do %>
47 <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
47 <%= auto_discovery_link_tag(:atom, _project_news_path(@project, :key => User.current.rss_key, :format => 'atom')) %>
48 <%= stylesheet_link_tag 'scm' %>
48 <%= stylesheet_link_tag 'scm' %>
49 <% end %>
49 <% end %>
50
50
51 <% html_title(l(:label_news_plural)) -%>
51 <% html_title(l(:label_news_plural)) -%>
@@ -1,21 +1,25
1 <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
1 <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
2
2
3 <div class="contextual">
3 <div class="contextual">
4 <%= render :partial => 'navigation' %>
4 <%= render :partial => 'navigation' %>
5 </div>
5 </div>
6
6
7 <h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
7 <h2><%= render :partial => 'breadcrumbs', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
8
8
9 <%= render :partial => 'link_to_functions' %>
9 <%= render :partial => 'link_to_functions' %>
10
10
11 <% if Redmine::MimeType.is_type?('image', @path) %>
11 <% if Redmine::MimeType.is_type?('image', @path) %>
12 <%= render :partial => 'common/image', :locals => {:path => url_for(params.merge(:action => 'raw')), :alt => @path} %>
12 <%= render :partial => 'common/image', :locals => {:path => url_for(:action => 'raw',
13 :id => @project,
14 :repository_id => @repository.identifier_param,
15 :path => @path,
16 :rev => @rev), :alt => @path} %>
13 <% elsif @content %>
17 <% elsif @content %>
14 <%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
18 <%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content} %>
15 <% else %>
19 <% else %>
16 <%= render :partial => 'common/other' %>
20 <%= render :partial => 'common/other' %>
17 <% end %>
21 <% end %>
18
22
19 <% content_for :header_tags do %>
23 <% content_for :header_tags do %>
20 <%= stylesheet_link_tag "scm" %>
24 <%= stylesheet_link_tag "scm" %>
21 <% end %>
25 <% end %>
@@ -1,34 +1,34
1 <div class="contextual">
1 <div class="contextual">
2 <%= form_tag(
2 <%= form_tag(
3 {:controller => 'repositories', :action => 'revision', :id => @project,
3 {:controller => 'repositories', :action => 'revision', :id => @project,
4 :repository_id => @repository.identifier_param},
4 :repository_id => @repository.identifier_param},
5 :method => :get
5 :method => :get
6 ) do %>
6 ) do %>
7 <%= l(:label_revision) %>: <%= text_field_tag 'rev', nil, :size => 8 %>
7 <%= l(:label_revision) %>: <%= text_field_tag 'rev', nil, :size => 8 %>
8 <%= submit_tag 'OK' %>
8 <%= submit_tag 'OK' %>
9 <% end %>
9 <% end %>
10 </div>
10 </div>
11
11
12 <h2><%= l(:label_revision_plural) %></h2>
12 <h2><%= l(:label_revision_plural) %></h2>
13
13
14 <%= render :partial => 'revisions',
14 <%= render :partial => 'revisions',
15 :locals => {:project => @project,
15 :locals => {:project => @project,
16 :path => '',
16 :path => '',
17 :revisions => @changesets,
17 :revisions => @changesets,
18 :entry => nil } %>
18 :entry => nil } %>
19
19
20 <span class="pagination"><%= pagination_links_full @changeset_pages,@changeset_count %></span>
20 <span class="pagination"><%= pagination_links_full @changeset_pages,@changeset_count %></span>
21
21
22 <% content_for :header_tags do %>
22 <% content_for :header_tags do %>
23 <%= stylesheet_link_tag "scm" %>
23 <%= stylesheet_link_tag "scm" %>
24 <%= auto_discovery_link_tag(
24 <%= auto_discovery_link_tag(
25 :atom,
25 :atom,
26 params.merge(
26 :params => request.query_parameters.merge(:page => nil, :key => User.current.rss_key),
27 {:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
27 :format => 'atom') %>
28 <% end %>
28 <% end %>
29
29
30 <% other_formats_links do |f| %>
30 <% other_formats_links do |f| %>
31 <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
31 <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
32 <% end %>
32 <% end %>
33
33
34 <% html_title(l(:label_revision_plural)) -%>
34 <% html_title(l(:label_revision_plural)) -%>
@@ -1,77 +1,78
1 <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
1 <%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
2
2
3 <div class="contextual">
3 <div class="contextual">
4 <%= render :partial => 'navigation' %>
4 <%= render :partial => 'navigation' %>
5 </div>
5 </div>
6
6
7 <h2><%= render :partial => 'breadcrumbs',
7 <h2><%= render :partial => 'breadcrumbs',
8 :locals => { :path => @path, :kind => 'dir', :revision => @rev } %></h2>
8 :locals => { :path => @path, :kind => 'dir', :revision => @rev } %></h2>
9
9
10 <% if !@entries.nil? && authorize_for('repositories', 'browse') %>
10 <% if !@entries.nil? && authorize_for('repositories', 'browse') %>
11 <%= render :partial => 'dir_list' %>
11 <%= render :partial => 'dir_list' %>
12 <% end %>
12 <% end %>
13
13
14 <%= render_properties(@properties) %>
14 <%= render_properties(@properties) %>
15
15
16 <% if authorize_for('repositories', 'revisions') %>
16 <% if authorize_for('repositories', 'revisions') %>
17 <% if @changesets && !@changesets.empty? %>
17 <% if @changesets && !@changesets.empty? %>
18 <h3><%= l(:label_latest_revision_plural) %></h3>
18 <h3><%= l(:label_latest_revision_plural) %></h3>
19 <%= render :partial => 'revisions',
19 <%= render :partial => 'revisions',
20 :locals => {:project => @project, :path => @path,
20 :locals => {:project => @project, :path => @path,
21 :revisions => @changesets, :entry => nil }%>
21 :revisions => @changesets, :entry => nil }%>
22 <% end %>
22 <% end %>
23 <p>
23 <p>
24 <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0)
24 <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0)
25 sep = '' %>
25 sep = '' %>
26 <% if @repository.supports_all_revisions? && @path.blank? %>
26 <% if @repository.supports_all_revisions? && @path.blank? %>
27 <%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project,
27 <%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project,
28 :repository_id => @repository.identifier_param %>
28 :repository_id => @repository.identifier_param %>
29 <% sep = '|' %>
29 <% sep = '|' %>
30 <% end %>
30 <% end %>
31 <% if @repository.supports_directory_revisions? &&
31 <% if @repository.supports_directory_revisions? &&
32 ( has_branches || !@path.blank? || !@rev.blank? ) %>
32 ( has_branches || !@path.blank? || !@rev.blank? ) %>
33 <%= sep %>
33 <%= sep %>
34 <%= link_to l(:label_view_revisions),
34 <%= link_to l(:label_view_revisions),
35 :action => 'changes',
35 :action => 'changes',
36 :path => to_path_param(@path),
36 :path => to_path_param(@path),
37 :id => @project,
37 :id => @project,
38 :repository_id => @repository.identifier_param,
38 :repository_id => @repository.identifier_param,
39 :rev => @rev %>
39 :rev => @rev %>
40 <% end %>
40 <% end %>
41 </p>
41 </p>
42 <% if @repository.supports_all_revisions? %>
42 <% if @repository.supports_all_revisions? %>
43 <% content_for :header_tags do %>
43 <% content_for :header_tags do %>
44 <%= auto_discovery_link_tag(
44 <%= auto_discovery_link_tag(
45 :atom, params.merge(
45 :atom,
46 {:format => 'atom', :action => 'revisions',
46 :action => 'revisions', :id => @project,
47 :id => @project, :page => nil, :key => User.current.rss_key})) %>
47 :repository_id => @repository.identifier_param,
48 :key => User.current.rss_key) %>
48 <% end %>
49 <% end %>
49
50
50 <% other_formats_links do |f| %>
51 <% other_formats_links do |f| %>
51 <%= f.link_to 'Atom',
52 <%= f.link_to 'Atom',
52 :url => {:action => 'revisions', :id => @project,
53 :url => {:action => 'revisions', :id => @project,
53 :repository_id => @repository.identifier_param,
54 :repository_id => @repository.identifier_param,
54 :key => User.current.rss_key} %>
55 :key => User.current.rss_key} %>
55 <% end %>
56 <% end %>
56 <% end %>
57 <% end %>
57 <% end %>
58 <% end %>
58
59
59 <% if @repositories.size > 1 %>
60 <% if @repositories.size > 1 %>
60 <% content_for :sidebar do %>
61 <% content_for :sidebar do %>
61 <h3><%= l(:label_repository_plural) %></h3>
62 <h3><%= l(:label_repository_plural) %></h3>
62 <p>
63 <p>
63 <%= @repositories.sort.collect {|repo|
64 <%= @repositories.sort.collect {|repo|
64 link_to repo.name,
65 link_to repo.name,
65 {:controller => 'repositories', :action => 'show',
66 {:controller => 'repositories', :action => 'show',
66 :id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil},
67 :id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil},
67 :class => 'repository' + (repo == @repository ? ' selected' : '')
68 :class => 'repository' + (repo == @repository ? ' selected' : '')
68 }.join('<br />').html_safe %>
69 }.join('<br />').html_safe %>
69 </p>
70 </p>
70 <% end %>
71 <% end %>
71 <% end %>
72 <% end %>
72
73
73 <% content_for :header_tags do %>
74 <% content_for :header_tags do %>
74 <%= stylesheet_link_tag "scm" %>
75 <%= stylesheet_link_tag "scm" %>
75 <% end %>
76 <% end %>
76
77
77 <% html_title(l(:label_repository)) -%>
78 <% html_title(l(:label_repository)) -%>
General Comments 0
You need to be logged in to leave comments. Login now