Skip to content

Commit

Permalink
Simplify a few repository pages, and use a custom theme for the graph…
Browse files Browse the repository at this point in the history
…s in the sidebar
  • Loading branch information
js committed Apr 27, 2008
1 parent ceafcfd commit 3112109
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 20 deletions.
1 change: 0 additions & 1 deletion 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
Expand Down
4 changes: 4 additions & 0 deletions app/views/comments/commit.html.erb
Expand Up @@ -13,3 +13,7 @@
<%= render :partial => @comments -%>
<%= render :partial => "form", :locals => {:sha1 => @commit.id} -%>
<% content_for :submenu do -%>
<%= render :partial => "repositories/context_menu" -%>
<% end -%>
9 changes: 3 additions & 6 deletions app/views/comments/index.html.erb
Expand Up @@ -3,12 +3,9 @@
Comments for &quot;<%= h(@repository.name) -%>&quot; 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" -%>
4 changes: 4 additions & 0 deletions app/views/committers/new.html.erb
Expand Up @@ -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 -%>
3 changes: 1 addition & 2 deletions app/views/logs/show.html.erb
Expand Up @@ -34,7 +34,6 @@
<% end -%>
</ul>
<% end -%>
<%= commit_graph_by_author_tag(@repository, params[:id]) %>
<% end -%>
10 changes: 4 additions & 6 deletions app/views/merge_requests/index.html.erb
Expand Up @@ -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.
Expand All @@ -21,3 +15,7 @@
<% else -%>
<%= render :partial => @merge_requests -%>
<% end -%>
<% content_for :submenu do -%>
<%= render :partial => "repositories/context_menu" -%>
<% end -%>
6 changes: 5 additions & 1 deletion app/views/merge_requests/new.html.erb
Expand Up @@ -6,4 +6,8 @@
<%= render :partial => "form", :locals => {:form => f} -%>
<%= f.submit "Create merge request" -%>
<% end -%>
<% end -%>
<% content_for :submenu do -%>
<%= render :partial => "repositories/context_menu" -%>
<% end -%>
6 changes: 5 additions & 1 deletion app/views/merge_requests/show.html.erb
Expand Up @@ -32,4 +32,8 @@
<div class="commit_message"><%= simple_format(h(commit.message)) -%></div></li>
<% end -%>
</ul>
<% end -%>
<% end -%>
<% content_for :submenu do -%>
<%= render :partial => "repositories/context_menu" -%>
<% end -%>
4 changes: 4 additions & 0 deletions app/views/repositories/new.html.erb
Expand Up @@ -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 -%>
17 changes: 17 additions & 0 deletions lib/gitorious/graphs/builder.rb
Expand Up @@ -42,6 +42,23 @@ def self.default_theme
}
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)
Expand Down
2 changes: 1 addition & 1 deletion lib/gitorious/graphs/commits_by_author_builder.rb
Expand Up @@ -20,7 +20,7 @@ def initialize(repository, branch)
@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
Expand Down
4 changes: 2 additions & 2 deletions public/stylesheets/base.css
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions tmp/graph_generator/.gitignore
@@ -0,0 +1 @@
*.status

0 comments on commit 3112109

Please sign in to comment.