Commit 311210962d6f212d17f1149da843d0afab0c6d74

Simplify a few repository pages, and use a custom theme for the graphs in the sidebar

Commit diff

TODO.txt

 
11new-ui:
2* create hooks symlinks on GitBackend.create+clone
32* Make the project tabs active styled depending on context
43* Fix menu bottom spacing issue in safari
54* Clone stats graph on repositories#index
toggle raw diff

app/views/comments/commit.html.erb

 
1313<%= render :partial => @comments -%>
1414
1515<%= render :partial => "form", :locals => {:sha1 => @commit.id} -%>
16
17<% content_for :submenu do -%>
18 <%= render :partial => "repositories/context_menu" -%>
19<% end -%>
toggle raw diff

app/views/comments/index.html.erb

 
33 Comments for &quot;<%= h(@repository.name) -%>&quot; repository in <%= h(@repository.project.title) -%>
44</h1>
55
6<%= render :partial => @comments -%>
7<%= render :partial => "form" -%>
8
69<% content_for :submenu do -%>
710 <%= render :partial => "repositories/context_menu" -%>
811<% end -%>
9
10<%= render :partial => "repositories/infobox" -%>
11
12<h3>Comments</h3>
13<%= render :partial => @comments -%>
14<%= render :partial => "form" -%>
toggle raw diff

app/views/committers/new.html.erb

 
3434 <%= f.submit "Add as committer" -%> or <%= link_to "cancel", [@repository.project, @repository] -%>
3535 </p>
3636<% end -%>
37
38<% content_for :submenu do -%>
39 <%= render :partial => "repositories/context_menu" -%>
40<% end -%>
toggle raw diff

app/views/logs/show.html.erb

 
3434 <% end -%>
3535 </ul>
3636 <% end -%>
37
37
3838 <%= commit_graph_by_author_tag(@repository, params[:id]) %>
39
4039<% end -%>
toggle raw diff

app/views/merge_requests/index.html.erb

 
33 Merge requests in <%=h @repository.name -%>
44</h1>
55
6<% content_for :submenu do -%>
7 <%= render :partial => "repositories/context_menu" -%>
8<% end -%>
9
10<%= render :partial => "repositories/infobox" -%>
11
126<p class="hint">
137 A "merge request" is a notification from one repository to another that
148 would like their changes to be merged upstream.
1515<% else -%>
1616 <%= render :partial => @merge_requests -%>
1717<% end -%>
18
19<% content_for :submenu do -%>
20 <%= render :partial => "repositories/context_menu" -%>
21<% end -%>
toggle raw diff

app/views/merge_requests/new.html.erb

 
66 <%= render :partial => "form", :locals => {:form => f} -%>
77
88 <%= 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

app/views/merge_requests/show.html.erb

 
3232 <div class="commit_message"><%= simple_format(h(commit.message)) -%></div></li>
3333 <% end -%>
3434</ul>
35<% end -%>
35<% end -%>
36
37<% content_for :submenu do -%>
38 <%= render :partial => "repositories/context_menu" -%>
39<% end -%>
toggle raw diff

app/views/repositories/new.html.erb

 
1919 with lots of empty repositories), so it's a good idea to wait with creating
2020 the clone here until there's something to push.</em>
2121</p>
22
23<% content_for :submenu do -%>
24 <li><%= link_to "Back to repository", [@project, @repository_to_clone] -%>
25<% end -%>
toggle raw diff

lib/gitorious/graphs/builder.rb

 
4242 }
4343 end
4444
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
4562 def write
4663 dest = File.join(self.class.graph_dir, construct_filename)
4764 @graph.write(dest)
toggle raw diff

lib/gitorious/graphs/commits_by_author_builder.rb

 
2020 @repository = repository
2121 @branch = branch
2222 @graph = Gruff::Mini::Pie.new(250)
23 @graph.theme_pastel
23 @graph.theme = self.class.sidebar_pastel_theme
2424 @graph.marker_font_size = 32
2525 @graph.legend_font_size = 32
2626 @graph.top_margin = 1
toggle raw diff

public/stylesheets/base.css

 
10681068 margin-bottom: 20px;
10691069}
10701070
1071.commits_by_author_graph img {
1071.commits_by_author_graph {
10721072 float: right;
1073 margin: 0 0 10px 10px;
1073 margin: 40px 0 10px 10px;
10741074}
10751075
10761076.commit_graph {
toggle raw diff

tmp/graph_generator/.gitignore

 
1*.status
toggle raw diff