Commit 311210962d6f212d17f1149da843d0afab0c6d74
- Date: Sun Apr 27 21:12:41 +0000 2008
- Committer: Johan Sørensen (johan@johansorensen.com)
- Author: Johan Sørensen (johan@johansorensen.com)
- Commit SHA1: 311210962d6f212d17f1149da843d0afab0c6d74
- Tree SHA1: e5db329019840918a1bbf8f80b6255b1b645d8f0
Simplify a few repository pages, and use a custom theme for the graphs in the sidebar
Commit diff
| |   |
| 1 | 1 | new-ui: |
| 2 | | * create hooks symlinks on GitBackend.create+clone |
| 3 | 2 | * Make the project tabs active styled depending on context |
| 4 | 3 | * Fix menu bottom spacing issue in safari |
| 5 | 4 | * Clone stats graph on repositories#index |
| toggle raw diff |
--- a/TODO.txt
+++ b/TODO.txt
@@ -1,5 +1,4 @@
new-ui:
-* create hooks symlinks on GitBackend.create+clone
* Make the project tabs active styled depending on context
* Fix menu bottom spacing issue in safari
* Clone stats graph on repositories#index |
| |   |
| 13 | 13 | <%= render :partial => @comments -%> |
| 14 | 14 | |
| 15 | 15 | <%= render :partial => "form", :locals => {:sha1 => @commit.id} -%> |
| 16 | |
| 17 | <% content_for :submenu do -%> |
| 18 | <%= render :partial => "repositories/context_menu" -%> |
| 19 | <% end -%> |
| toggle raw diff |
--- a/app/views/comments/commit.html.erb
+++ b/app/views/comments/commit.html.erb
@@ -13,3 +13,7 @@
<%= render :partial => @comments -%>
<%= render :partial => "form", :locals => {:sha1 => @commit.id} -%>
+
+<% content_for :submenu do -%>
+ <%= render :partial => "repositories/context_menu" -%>
+<% end -%> |
| |   |
| 3 | 3 | Comments for "<%= h(@repository.name) -%>" repository in <%= h(@repository.project.title) -%> |
| 4 | 4 | </h1> |
| 5 | 5 | |
| 6 | <%= render :partial => @comments -%> |
| 7 | <%= render :partial => "form" -%> |
| 8 | |
| 6 | 9 | <% content_for :submenu do -%> |
| 7 | 10 | <%= render :partial => "repositories/context_menu" -%> |
| 8 | 11 | <% end -%> |
| 9 | | |
| 10 | | <%= render :partial => "repositories/infobox" -%> |
| 11 | | |
| 12 | | <h3>Comments</h3> |
| 13 | | <%= render :partial => @comments -%> |
| 14 | | <%= render :partial => "form" -%> |
| toggle raw diff |
--- a/app/views/comments/index.html.erb
+++ b/app/views/comments/index.html.erb
@@ -3,12 +3,9 @@
Comments for "<%= h(@repository.name) -%>" repository in <%= h(@repository.project.title) -%>
</h1>
+<%= render :partial => @comments -%>
+<%= render :partial => "form" -%>
+
<% content_for :submenu do -%>
<%= render :partial => "repositories/context_menu" -%>
<% end -%>
-
-<%= render :partial => "repositories/infobox" -%>
-
-<h3>Comments</h3>
-<%= render :partial => @comments -%>
-<%= render :partial => "form" -%>
\ No newline at end of file |
| |   |
| 34 | 34 | <%= f.submit "Add as committer" -%> or <%= link_to "cancel", [@repository.project, @repository] -%> |
| 35 | 35 | </p> |
| 36 | 36 | <% end -%> |
| 37 | |
| 38 | <% content_for :submenu do -%> |
| 39 | <%= render :partial => "repositories/context_menu" -%> |
| 40 | <% end -%> |
| toggle raw diff |
--- a/app/views/committers/new.html.erb
+++ b/app/views/committers/new.html.erb
@@ -34,3 +34,7 @@
<%= f.submit "Add as committer" -%> or <%= link_to "cancel", [@repository.project, @repository] -%>
</p>
<% end -%>
+
+<% content_for :submenu do -%>
+ <%= render :partial => "repositories/context_menu" -%>
+<% end -%> |
| |   |
| 34 | 34 | <% end -%> |
| 35 | 35 | </ul> |
| 36 | 36 | <% end -%> |
| 37 | | |
| 37 | |
| 38 | 38 | <%= commit_graph_by_author_tag(@repository, params[:id]) %> |
| 39 | | |
| 40 | 39 | <% end -%> |
| toggle raw diff |
--- a/app/views/logs/show.html.erb
+++ b/app/views/logs/show.html.erb
@@ -34,7 +34,6 @@
<% end -%>
</ul>
<% end -%>
-
+
<%= commit_graph_by_author_tag(@repository, params[:id]) %>
-
<% end -%> |
| |   |
| 3 | 3 | Merge requests in <%=h @repository.name -%> |
| 4 | 4 | </h1> |
| 5 | 5 | |
| 6 | | <% content_for :submenu do -%> |
| 7 | | <%= render :partial => "repositories/context_menu" -%> |
| 8 | | <% end -%> |
| 9 | | |
| 10 | | <%= render :partial => "repositories/infobox" -%> |
| 11 | | |
| 12 | 6 | <p class="hint"> |
| 13 | 7 | A "merge request" is a notification from one repository to another that |
| 14 | 8 | would like their changes to be merged upstream. |
| … | … | |
| 15 | 15 | <% else -%> |
| 16 | 16 | <%= render :partial => @merge_requests -%> |
| 17 | 17 | <% end -%> |
| 18 | |
| 19 | <% content_for :submenu do -%> |
| 20 | <%= render :partial => "repositories/context_menu" -%> |
| 21 | <% end -%> |
| toggle raw diff |
--- a/app/views/merge_requests/index.html.erb
+++ b/app/views/merge_requests/index.html.erb
@@ -3,12 +3,6 @@
Merge requests in <%=h @repository.name -%>
</h1>
-<% content_for :submenu do -%>
- <%= render :partial => "repositories/context_menu" -%>
-<% end -%>
-
-<%= render :partial => "repositories/infobox" -%>
-
<p class="hint">
A "merge request" is a notification from one repository to another that
would like their changes to be merged upstream.
@@ -21,3 +15,7 @@
<% else -%>
<%= render :partial => @merge_requests -%>
<% end -%>
+
+<% content_for :submenu do -%>
+ <%= render :partial => "repositories/context_menu" -%>
+<% end -%> |
| |   |
| 6 | 6 | <%= render :partial => "form", :locals => {:form => f} -%> |
| 7 | 7 | |
| 8 | 8 | <%= f.submit "Create merge request" -%> |
| 9 | | <% end -%> |
| 9 | <% end -%> |
| 10 | |
| 11 | <% content_for :submenu do -%> |
| 12 | <%= render :partial => "repositories/context_menu" -%> |
| 13 | <% end -%> |
| toggle raw diff |
--- a/app/views/merge_requests/new.html.erb
+++ b/app/views/merge_requests/new.html.erb
@@ -6,4 +6,8 @@
<%= render :partial => "form", :locals => {:form => f} -%>
<%= f.submit "Create merge request" -%>
-<% end -%>
\ No newline at end of file
+<% end -%>
+
+<% content_for :submenu do -%>
+ <%= render :partial => "repositories/context_menu" -%>
+<% end -%> |
| |   |
| 32 | 32 | <div class="commit_message"><%= simple_format(h(commit.message)) -%></div></li> |
| 33 | 33 | <% end -%> |
| 34 | 34 | </ul> |
| 35 | | <% end -%> |
| 35 | <% end -%> |
| 36 | |
| 37 | <% content_for :submenu do -%> |
| 38 | <%= render :partial => "repositories/context_menu" -%> |
| 39 | <% end -%> |
| toggle raw diff |
--- a/app/views/merge_requests/show.html.erb
+++ b/app/views/merge_requests/show.html.erb
@@ -32,4 +32,8 @@
<div class="commit_message"><%= simple_format(h(commit.message)) -%></div></li>
<% end -%>
</ul>
-<% end -%>
\ No newline at end of file
+<% end -%>
+
+<% content_for :submenu do -%>
+ <%= render :partial => "repositories/context_menu" -%>
+<% end -%> |
| |   |
| 19 | 19 | with lots of empty repositories), so it's a good idea to wait with creating |
| 20 | 20 | the clone here until there's something to push.</em> |
| 21 | 21 | </p> |
| 22 | |
| 23 | <% content_for :submenu do -%> |
| 24 | <li><%= link_to "Back to repository", [@project, @repository_to_clone] -%> |
| 25 | <% end -%> |
| toggle raw diff |
--- a/app/views/repositories/new.html.erb
+++ b/app/views/repositories/new.html.erb
@@ -19,3 +19,7 @@
with lots of empty repositories), so it's a good idea to wait with creating
the clone here until there's something to push.</em>
</p>
+
+<% content_for :submenu do -%>
+ <li><%= link_to "Back to repository", [@project, @repository_to_clone] -%>
+<% end -%> |
| |   |
| 42 | 42 | } |
| 43 | 43 | end |
| 44 | 44 | |
| 45 | def self.sidebar_pastel_theme |
| 46 | { |
| 47 | :colors => [ |
| 48 | '#a9dada', # blue |
| 49 | '#aedaa9', # green |
| 50 | '#daaea9', # peach |
| 51 | '#dadaa9', # yellow |
| 52 | '#a9a9da', # dk purple |
| 53 | '#daaeda', # purple |
| 54 | '#dadada' # grey |
| 55 | ], |
| 56 | :marker_color => '#aea9a9', # Grey |
| 57 | :font_color => 'black', |
| 58 | :background_colors => '#EEF2F5' |
| 59 | } |
| 60 | end |
| 61 | |
| 45 | 62 | def write |
| 46 | 63 | dest = File.join(self.class.graph_dir, construct_filename) |
| 47 | 64 | @graph.write(dest) |
| toggle raw diff |
--- a/lib/gitorious/graphs/builder.rb
+++ b/lib/gitorious/graphs/builder.rb
@@ -42,6 +42,23 @@ module Gitorious
}
end
+ def self.sidebar_pastel_theme
+ {
+ :colors => [
+ '#a9dada', # blue
+ '#aedaa9', # green
+ '#daaea9', # peach
+ '#dadaa9', # yellow
+ '#a9a9da', # dk purple
+ '#daaeda', # purple
+ '#dadada' # grey
+ ],
+ :marker_color => '#aea9a9', # Grey
+ :font_color => 'black',
+ :background_colors => '#EEF2F5'
+ }
+ end
+
def write
dest = File.join(self.class.graph_dir, construct_filename)
@graph.write(dest) |
| |   |
| 20 | 20 | @repository = repository |
| 21 | 21 | @branch = branch |
| 22 | 22 | @graph = Gruff::Mini::Pie.new(250) |
| 23 | | @graph.theme_pastel |
| 23 | @graph.theme = self.class.sidebar_pastel_theme |
| 24 | 24 | @graph.marker_font_size = 32 |
| 25 | 25 | @graph.legend_font_size = 32 |
| 26 | 26 | @graph.top_margin = 1 |
| toggle raw diff |
--- a/lib/gitorious/graphs/commits_by_author_builder.rb
+++ b/lib/gitorious/graphs/commits_by_author_builder.rb
@@ -20,7 +20,7 @@ module Gitorious
@repository = repository
@branch = branch
@graph = Gruff::Mini::Pie.new(250)
- @graph.theme_pastel
+ @graph.theme = self.class.sidebar_pastel_theme
@graph.marker_font_size = 32
@graph.legend_font_size = 32
@graph.top_margin = 1 |
| |   |
| 1068 | 1068 | margin-bottom: 20px; |
| 1069 | 1069 | } |
| 1070 | 1070 | |
| 1071 | | .commits_by_author_graph img { |
| 1071 | .commits_by_author_graph { |
| 1072 | 1072 | float: right; |
| 1073 | | margin: 0 0 10px 10px; |
| 1073 | margin: 40px 0 10px 10px; |
| 1074 | 1074 | } |
| 1075 | 1075 | |
| 1076 | 1076 | .commit_graph { |
| toggle raw diff |
--- a/public/stylesheets/base.css
+++ b/public/stylesheets/base.css
@@ -1068,9 +1068,9 @@ ul.diff_stats small.deletions { color: #DC0000; }
margin-bottom: 20px;
}
-.commits_by_author_graph img {
+.commits_by_author_graph {
float: right;
- margin: 0 0 10px 10px;
+ margin: 40px 0 10px 10px;
}
.commit_graph { |
| |   |
| 1 | *.status |
| toggle raw diff |
--- /dev/null
+++ b/tmp/graph_generator/.gitignore
@@ -0,0 +1 @@
+*.status |