summaryrefslogtreecommitdiffstats
path: root/app/views/blobs
diff options
context:
space:
mode:
authorJohan Sørensen <johan@johansorensen.com>2009-04-20 13:18:02 +0200
committerJohan Sørensen <johan@johansorensen.com>2009-04-22 15:18:39 +0200
commit005b4b5f880d662ff9ae88f38daf952fe464f11e (patch)
treef53795930926a5b8c07117f1dc0d0eb91e1c5023 /app/views/blobs
parentfeea346ed8ec1507c5fcb6b61da667bc261a6f22 (diff)
downloadgitorious-mainline-outdated-005b4b5f880d662ff9ae88f38daf952fe464f11e.zip
gitorious-mainline-outdated-005b4b5f880d662ff9ae88f38daf952fe464f11e.tar.gz
gitorious-mainline-outdated-005b4b5f880d662ff9ae88f38daf952fe464f11e.tar.bz2
Be able to see the history of a single blob
Diffstat (limited to 'app/views/blobs')
-rw-r--r--app/views/blobs/_menu.html.erb26
-rw-r--r--app/views/blobs/history.html.erb29
-rw-r--r--app/views/blobs/show.html.erb6
3 files changed, 56 insertions, 5 deletions
diff --git a/app/views/blobs/_menu.html.erb b/app/views/blobs/_menu.html.erb
new file mode 100644
index 0000000..423f0f4
--- /dev/null
+++ b/app/views/blobs/_menu.html.erb
@@ -0,0 +1,26 @@
+<%
+#--
+# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#++
+%>
+
+<div class="page-meta">
+ <ul class="page-actions">
+ <li><%= link_to_unless_current t("views.blobs.show"), blob_path(@ref, current_path) -%></li>
+ <li><%= link_to_unless_current t("views.blobs.history"), blob_history_path(@ref, current_path) -%></li>
+ <li><%= link_to t("views.blobs.raw"), raw_blob_path(@ref, current_path) -%></li>
+ </ul>
+</div> \ No newline at end of file
diff --git a/app/views/blobs/history.html.erb b/app/views/blobs/history.html.erb
new file mode 100644
index 0000000..c30b11f
--- /dev/null
+++ b/app/views/blobs/history.html.erb
@@ -0,0 +1,29 @@
+<%
+#--
+# Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#++
+%>
+
+<% @page_title = t("views.blobs.page_title", :path => current_path.join("/"), :repo => @repository.name, :title => @project.title) -%>
+<%= breadcrumbs_from(@root) -%>
+
+<h1><%= t("views.blobs.heading", :ref => h(desplat_path(@ref)), :path => h(desplat_path(@path))) -%></h1>
+
+<% cache([@project, @repository, :blob_history, @ref, @path], {:expires_in => 20.minutes}) do -%>
+ <%= render :partial => "commits/log", :locals => { :no_pagination => true } -%>
+<% end -%>
+
+<%= render "menu" -%>
diff --git a/app/views/blobs/show.html.erb b/app/views/blobs/show.html.erb
index e47508a..ad45c56 100644
--- a/app/views/blobs/show.html.erb
+++ b/app/views/blobs/show.html.erb
@@ -69,8 +69,4 @@
</p>
<% end -%>
-<div class="page-meta">
- <ul class="page-actions">
- <li><%= link_to t("views.blobs.raw"), raw_blob_path(@ref, current_path) -%></li>
- </ul>
-</div> \ No newline at end of file
+<%= render "menu" -%>