Index: lang/en.yml
===================================================================
--- lang/en.yml	(revision 1607)
+++ lang/en.yml	(working copy)
@@ -548,6 +548,7 @@
 button_annotate: Annotate
 button_update: Update
 button_configure: Configure
+button_history: History
 
 status_active: active
 status_registered: registered
Index: app/controllers/repositories_controller.rb
===================================================================
--- app/controllers/repositories_controller.rb	(revision 1607)
+++ app/controllers/repositories_controller.rb	(working copy)
@@ -47,7 +47,7 @@
     @repository.destroy
     redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'repository'
   end
-  
+
   def show
     # check if new revisions have been committed in the repository
     @repository.fetch_changesets if Setting.autofetch_changesets?
@@ -61,6 +61,7 @@
   end
   
   def browse
+    @changeset = @repository.changesets.find_by_revision(@rev)
     @entries = @repository.entries(@path, @rev)
     if request.xhr?
       @entries ? render(:partial => 'dir_list_content') : render(:nothing => true)
@@ -96,6 +97,7 @@
   end
   
   def entry
+    @changeset = @repository.changesets.find_by_revision(@rev)
     @entry = @repository.scm.entry(@path, @rev)
     show_error_not_found and return unless @entry
     
@@ -116,6 +118,7 @@
   end
   
   def annotate
+    @entry = @repository.scm.entry(@path, @rev)
     @annotate = @repository.scm.annotate(@path, @rev)
     render_error l(:error_scm_annotate) and return if @annotate.nil? || @annotate.empty?
   rescue Redmine::Scm::Adapters::CommandFailed => e
@@ -142,6 +145,7 @@
   end
   
   def diff
+    @entry = @repository.scm.entry(@path, @rev)
     @diff_type = params[:type] || User.current.pref[:diff_type] || 'inline'
     @diff_type = 'inline' unless %w(inline sbs).include?(@diff_type)
     
Index: app/views/repositories/_navigation.rhtml
===================================================================
--- app/views/repositories/_navigation.rhtml	(revision 1607)
+++ app/views/repositories/_navigation.rhtml	(working copy)
@@ -16,6 +16,7 @@
     / <%= link_to h(filename), :action => 'changes', :id => @project, :path => "#{link_path}/#{filename}", :rev => @rev %>
 <% end %>
 
-<%= "@ #{revision}" if revision %>
-
+<% if revision %>
+@ <%= link_to "#{revision}", :action => 'revision', :id => @project, :rev => @rev %>
+<% end %>
 <% html_title(with_leading_slash(path)) -%>
Index: app/views/repositories/revision.rhtml
===================================================================
--- app/views/repositories/revision.rhtml	(revision 1607)
+++ app/views/repositories/revision.rhtml	(working copy)
@@ -1,23 +1,4 @@
-<div class="contextual">
-  &#171;
-  <% unless @changeset.previous.nil? -%>
-    <%= link_to l(:label_previous), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.previous.revision %>
-  <% else -%>
-    <%= l(:label_previous) %>
-  <% end -%>
-|
-  <% unless @changeset.next.nil? -%>
-    <%= link_to l(:label_next), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.next.revision %>
-  <% else -%>
-    <%= l(:label_next) %>
-  <% end -%>
-  &#187;&nbsp;
-  
-  <% form_tag do %>
-    <%= text_field_tag 'rev', @rev, :size => 5 %>
-    <%= submit_tag 'OK' %>
-  <% end %>
-</div>
+<%= render :partial => 'changeset_nav', :locals => {:changeset => @changeset,:rev => @rev, :action => 'revision'} %>
 
 <h2><%= l(:label_revision) %> <%= format_revision(@changeset.revision) %></h2>
 
@@ -46,10 +27,12 @@
 <tbody>
 <% @changes.each do |change| %>
 <tr class="<%= cycle 'odd', 'even' %>">
-<td><div class="square action_<%= change.action %>"></div> <%= change.path %> <%= "(#{change.revision})" unless change.revision.blank?  %></td>
+<td><div class="square action_<%= change.action %>"></div> <%= link_to change.path, :action => 'entry', :id => @project, :path => without_leading_slash(change.relative_path) %> <%= "(#{change.revision})" unless change.revision.blank?  %></td>
 <td align="right">
 <% if change.action == "M" %>
 <%= link_to l(:label_view_diff), :action => 'diff', :id => @project, :path => without_leading_slash(change.relative_path), :rev => @changeset.revision %>
+| <%= link_to l(:button_history), :action => 'changes', :id => @project, :path => without_leading_slash(change.relative_path), :rev => @changeset.revision %>
+| <%= link_to l(:button_annotate), :action => 'annotate', :id => @project, :path => without_leading_slash(change.relative_path), :rev => @changeset.revision  %>
 <% end %>
 </td>
 </tr>
Index: app/views/repositories/browse.rhtml
===================================================================
--- app/views/repositories/browse.rhtml	(revision 1607)
+++ app/views/repositories/browse.rhtml	(working copy)
@@ -1,8 +1,4 @@
-<div class="contextual">
-<% form_tag do %>
-<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %>
-<% end %>
-</div>
+<%= render :partial => 'changeset_nav', :locals => {:changeset => @changeset,:rev => @rev, :project => @project, :action => 'browse'} %>
 
 <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'dir', :revision => @rev } %></h2>
 
Index: app/views/repositories/entry.rhtml
===================================================================
--- app/views/repositories/entry.rhtml	(revision 1607)
+++ app/views/repositories/entry.rhtml	(working copy)
@@ -1,5 +1,13 @@
+<div class="contextual">
+<% form_tag do %>
+<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %>
+<% end %>
+</div>
+
 <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
 
+<%= render :partial => 'entry_nav', :locals => {:entry => @entry,:current_view => 'view'} %>
+
 <div class="autoscroll">
 <table class="filecontent CodeRay">
 <tbody>
Index: app/views/repositories/_entry_nav.rhtml
===================================================================
--- app/views/repositories/_entry_nav.rhtml	(revision 0)
+++ app/views/repositories/_entry_nav.rhtml	(revision 0)
@@ -0,0 +1,19 @@
+<h3><%=h @entry.name %></h3>
+
+<p>
+<% if current_view != 'history' %><%= link_to l(:button_history), {:action => 'changes', :id => @project, :path => @path, :rev => @rev } %> |<%end%>
+<% if current_view != 'view' %>
+ <% if @repository.supports_cat? %>
+     <%= link_to l(:button_view), {:action => 'entry', :id => @project, :path => @path, :rev => @rev } %> |
+ <% end %>
+<% end %>
+
+<% if current_view != 'annotate' %>
+ <% if @repository.supports_annotate? %>
+     <%= link_to l(:button_annotate), {:action => 'annotate', :id => @project, :path => @path, :rev => @rev } %> |
+ <% end %>
+<% end %>
+<%= link_to(l(:button_download), {:action => 'entry', :id => @project, :path => @path, :rev => @rev, :format => 'raw' }) if @repository.supports_cat? %>
+<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
+</p>
+
Index: app/views/repositories/_changeset_nav.rhtml
===================================================================
--- app/views/repositories/_changeset_nav.rhtml	(revision 0)
+++ app/views/repositories/_changeset_nav.rhtml	(revision 0)
@@ -0,0 +1,20 @@
+<div class="contextual">
+<% if @changeset %>  &#171;
+  <% unless @changeset.previous.nil? -%>
+    <%= link_to l(:label_previous), :controller => 'repositories', :action => action, :id => @project, :rev => @changeset.previous.revision %>
+  <% else -%>
+    <%= l(:label_previous) %>
+  <% end -%>
+|
+  <% unless @changeset.next.nil? -%>
+    <%= link_to l(:label_next), :controller => 'repositories', :action => action, :id => @project, :rev => @changeset.next.revision %>
+  <% else -%>
+    <%= l(:label_next) %>
+  <% end -%>
+  &#187;&nbsp;
+<% end %>
+  <% form_tag do %>
+    <%= text_field_tag 'rev', @rev, :size => 5 %>
+    <%= submit_tag 'OK' %>
+  <% end %>
+</div>
Index: app/views/repositories/changes.rhtml
===================================================================
--- app/views/repositories/changes.rhtml	(revision 1607)
+++ app/views/repositories/changes.rhtml	(working copy)
@@ -1,18 +1,13 @@
+<div class="contextual">
+<% form_tag do %>
+<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %>
+<% end %>
+</div>
+
 <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => (@entry ? @entry.kind : nil), :revision => @rev } %></h2>
 
-<h3><%=h @entry.name %></h3>
+<%= render :partial => 'entry_nav', :locals => {:entry => @entry,:current_view => 'history'} %>
 
-<p>
-<% if @repository.supports_cat? %>
-    <%= link_to l(:button_view), {:action => 'entry', :id => @project, :path => @path, :rev => @rev } %> |
-<% end %>
-<% if @repository.supports_annotate? %>
-    <%= link_to l(:button_annotate), {:action => 'annotate', :id => @project, :path => @path, :rev => @rev } %> |
-<% end %>
-<%= link_to(l(:button_download), {:action => 'entry', :id => @project, :path => @path, :rev => @rev, :format => 'raw' }) if @repository.supports_cat? %>
-<%= "(#{number_to_human_size(@entry.size)})" if @entry.size %>
-</p>
-
 <%= render(:partial => 'revisions', 
            :locals => {:project => @project, :path => @path, :revisions => @changesets, :entry => @entry }) unless @changesets.empty? %>
 
Index: app/views/repositories/diff.rhtml
===================================================================
--- app/views/repositories/diff.rhtml	(revision 1607)
+++ app/views/repositories/diff.rhtml	(working copy)
@@ -1,5 +1,15 @@
-<h2><%= l(:label_revision) %> <%= format_revision(@rev) %> <%= @path.gsub(/^.*\//, '') %></h2>
+<div class="contextual">
+<% form_tag do %>
+<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %>
+<% end %>
+</div>
 
+
+<h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => (@entry ? @entry.kind : nil), :revision => @rev } %></h2>
+
+<%= render :partial => 'entry_nav', :locals => {:entry => @entry} %>
+
+
 <!-- Choose view type -->
 <% form_tag({ :controller => 'repositories', :action => 'diff'}, :method => 'get') do %>
   <% params.each do |k, p| %>
Index: app/views/repositories/annotate.rhtml
===================================================================
--- app/views/repositories/annotate.rhtml	(revision 1607)
+++ app/views/repositories/annotate.rhtml	(working copy)
@@ -1,5 +1,13 @@
+<div class="contextual">
+<% form_tag do %>
+<%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 5 %>
+<% end %>
+</div>
+
 <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2>
 
+<%= render :partial => 'entry_nav', :locals => {:entry => @entry,:current_view => 'annotate'} %>
+
 <% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %>
 
 <div class="autoscroll">
