diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-01-02 22:41:53 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-01-02 22:41:53 +0000 |
commit | 3e0acc0b7e1fda93d8bdd9df7b7c8c9551fad864 (patch) | |
tree | a6c9bbd76bc54f0c1c7a41845e8831fa83053ff9 /app/views/repositories | |
parent | 636579b17ddd4b775b060cdb0ac3a94db5e4cb2b (diff) | |
download | redmine-3e0acc0b7e1fda93d8bdd9df7b7c8c9551fad864.tar.gz redmine-3e0acc0b7e1fda93d8bdd9df7b7c8c9551fad864.zip |
Slight improvements to the browser views.
ApplicationHelper#set_html_title replaced by html_title with arguments and can be called several times in views to append elements to the title.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1032 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/repositories')
-rw-r--r-- | app/views/repositories/_dir_list.rhtml | 4 | ||||
-rw-r--r-- | app/views/repositories/_dir_list_content.rhtml | 14 | ||||
-rw-r--r-- | app/views/repositories/_navigation.rhtml | 2 | ||||
-rw-r--r-- | app/views/repositories/_revisions.rhtml | 12 | ||||
-rw-r--r-- | app/views/repositories/annotate.rhtml | 2 | ||||
-rw-r--r-- | app/views/repositories/browse.rhtml | 2 | ||||
-rw-r--r-- | app/views/repositories/changes.rhtml | 2 | ||||
-rw-r--r-- | app/views/repositories/diff.rhtml | 2 | ||||
-rw-r--r-- | app/views/repositories/revision.rhtml | 2 | ||||
-rw-r--r-- | app/views/repositories/revisions.rhtml | 2 | ||||
-rw-r--r-- | app/views/repositories/show.rhtml | 2 | ||||
-rw-r--r-- | app/views/repositories/stats.rhtml | 4 |
12 files changed, 29 insertions, 21 deletions
diff --git a/app/views/repositories/_dir_list.rhtml b/app/views/repositories/_dir_list.rhtml index 1ed623ae8..5590652f5 100644 --- a/app/views/repositories/_dir_list.rhtml +++ b/app/views/repositories/_dir_list.rhtml @@ -1,10 +1,10 @@ -<table class="list" id="browser"> +<table class="list entries" id="browser"> <thead> <tr id="root"> <th><%= l(:field_name) %></th> <th><%= l(:field_filesize) %></th> <th><%= l(:label_revision) %></th> -<th><%= l(:label_date) %></th> +<th><%= l(:label_age) %></th> <th><%= l(:field_author) %></th> <th><%= l(:field_comments) %></th> </tr> diff --git a/app/views/repositories/_dir_list_content.rhtml b/app/views/repositories/_dir_list_content.rhtml index 0d84da387..352575259 100644 --- a/app/views/repositories/_dir_list_content.rhtml +++ b/app/views/repositories/_dir_list_content.rhtml @@ -1,8 +1,8 @@ <% @entries.each do |entry| %> <% tr_id = Digest::MD5.hexdigest(entry.path) depth = params[:depth].to_i %> -<tr id="<%= tr_id %>" class="<%= params[:parent_id] %>"> -<td> +<tr id="<%= tr_id %>" class="<%= params[:parent_id] %> entry"> +<td class="filename"> <%= if entry.is_dir? link_to_remote h(entry.name), {:url => {:action => 'browse', :id => @project, :path => entry.path, :rev => @rev, :depth => (depth + 1), :parent_id => tr_id}, @@ -22,11 +22,11 @@ else :style => "margin-left: #{18 * depth}px;" end %> </td> -<td align="right"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td> -<td align="right"><%= link_to(entry.lastrev.name, :action => 'revision', :id => @project, :rev => entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %></td> -<td align="center"><%= format_time(entry.lastrev.time) if entry.lastrev %></td> -<td align="center"><em><%=h(entry.lastrev.author) if entry.lastrev %></em></td> +<td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td> +<td class="revision"><%= link_to(entry.lastrev.name, :action => 'revision', :id => @project, :rev => entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %></td> +<td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td> +<td class="author"><%=h(entry.lastrev.author) if entry.lastrev %></td> <% changeset = @project.repository.changesets.find_by_revision(entry.lastrev.identifier) if entry.lastrev %> -<td><%=h truncate(changeset.comments, 50) unless changeset.nil? %></td> +<td class="comments"><%=h truncate(changeset.comments, 50) unless changeset.nil? %></td> </tr> <% end %> diff --git a/app/views/repositories/_navigation.rhtml b/app/views/repositories/_navigation.rhtml index 9f40e0abd..b7ac989bc 100644 --- a/app/views/repositories/_navigation.rhtml +++ b/app/views/repositories/_navigation.rhtml @@ -17,3 +17,5 @@ dirs.each do |dir| <% end %> <%= "@ #{revision}" if revision %> + +<% html_title(with_leading_slash(path)) -%> diff --git a/app/views/repositories/_revisions.rhtml b/app/views/repositories/_revisions.rhtml index d1ef83576..ea722329f 100644 --- a/app/views/repositories/_revisions.rhtml +++ b/app/views/repositories/_revisions.rhtml @@ -1,5 +1,5 @@ <% form_tag({:controller => 'repositories', :action => 'diff', :id => @project, :path => path}, :method => :get) do %> -<table class="list"> +<table class="list changesets"> <thead><tr> <th>#</th> <th></th> @@ -12,17 +12,17 @@ <% show_diff = entry && entry.is_file? && revisions.size > 1 %> <% line_num = 1 %> <% revisions.each do |changeset| %> -<tr class="<%= cycle 'odd', 'even' %>"> +<tr class="changeset <%= cycle 'odd', 'even' %>"> <td class="id"><%= link_to changeset.revision, :action => 'revision', :id => project, :rev => changeset.revision %></td> <td class="checkbox"><%= radio_button_tag('rev', changeset.revision, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %></td> <td class="checkbox"><%= radio_button_tag('rev_to', changeset.revision, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %></td> -<td align="center" style="width:15%"><%= format_time(changeset.committed_on) %></td> -<td align="center" style="width:15%"><em><%=h changeset.committer %></em></td> -<td align="left"><%= textilizable(changeset.comments) %></td> +<td class="committed_on"><%= format_time(changeset.committed_on) %></td> +<td class="author"><%=h changeset.committer %></td> +<td class="comments"><%= textilizable(changeset.comments) %></td> </tr> <% line_num += 1 %> <% end %> </tbody> </table> -<%= submit_tag(l(:label_view_diff), :class => 'small', :name => nil) if show_diff %> +<%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %> <% end %> diff --git a/app/views/repositories/annotate.rhtml b/app/views/repositories/annotate.rhtml index 9a3fc834b..3aa884104 100644 --- a/app/views/repositories/annotate.rhtml +++ b/app/views/repositories/annotate.rhtml @@ -21,6 +21,8 @@ </table> </div> +<% html_title(l(:button_annotate)) -%> + <% content_for :header_tags do %> <%= stylesheet_link_tag 'scm' %> <% end %> diff --git a/app/views/repositories/browse.rhtml b/app/views/repositories/browse.rhtml index 0ba24fd86..868388f11 100644 --- a/app/views/repositories/browse.rhtml +++ b/app/views/repositories/browse.rhtml @@ -10,4 +10,4 @@ <% content_for :header_tags do %> <%= stylesheet_link_tag "scm" %> -<% end %>
\ No newline at end of file +<% end %> diff --git a/app/views/repositories/changes.rhtml b/app/views/repositories/changes.rhtml index 218459128..55842a28b 100644 --- a/app/views/repositories/changes.rhtml +++ b/app/views/repositories/changes.rhtml @@ -17,4 +17,4 @@ <%= render :partial => 'revisions', :locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }%> -<% set_html_title(h(@entry.name)) -%> +<% html_title(l(:label_change_plural)) -%> diff --git a/app/views/repositories/diff.rhtml b/app/views/repositories/diff.rhtml index de6cdc50c..88c5f17a0 100644 --- a/app/views/repositories/diff.rhtml +++ b/app/views/repositories/diff.rhtml @@ -88,6 +88,8 @@ <% end %> <% end %> +<% html_title(with_leading_slash(@path), 'Diff') -%> + <% content_for :header_tags do %> <%= stylesheet_link_tag "scm" %> <% end %> diff --git a/app/views/repositories/revision.rhtml b/app/views/repositories/revision.rhtml index 265070e37..80cfdf2b7 100644 --- a/app/views/repositories/revision.rhtml +++ b/app/views/repositories/revision.rhtml @@ -62,4 +62,4 @@ <%= stylesheet_link_tag "scm" %> <% end %> -<% set_html_title("#{l(:label_revision)} #{@changeset.revision}") -%> +<% html_title("#{l(:label_revision)} #{@changeset.revision}") -%> diff --git a/app/views/repositories/revisions.rhtml b/app/views/repositories/revisions.rhtml index 99c3f7afd..ac5919dd6 100644 --- a/app/views/repositories/revisions.rhtml +++ b/app/views/repositories/revisions.rhtml @@ -16,4 +16,4 @@ <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %> <% end %> -<% set_html_title l(:label_revision_plural) -%> +<% html_title(l(:label_revision_plural)) -%> diff --git a/app/views/repositories/show.rhtml b/app/views/repositories/show.rhtml index 9fb45514d..469ac063e 100644 --- a/app/views/repositories/show.rhtml +++ b/app/views/repositories/show.rhtml @@ -22,4 +22,4 @@ <%= stylesheet_link_tag "scm" %> <% end %> -<% set_html_title l(:label_repository) -%> +<% html_title(l(:label_repository)) -%> diff --git a/app/views/repositories/stats.rhtml b/app/views/repositories/stats.rhtml index 7a9423f8c..76ce892d5 100644 --- a/app/views/repositories/stats.rhtml +++ b/app/views/repositories/stats.rhtml @@ -8,4 +8,6 @@ </td></tr>
</table>
<br />
-<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
\ No newline at end of file +<p><%= link_to l(:button_back), :action => 'show', :id => @project %></p>
+
+<% html_title(l(:label_repository), l(:label_statistics)) -%>
|