| |   |
| 17 | 17 | <% end -%> |
| 18 | 18 | |
| 19 | 19 | |
| 20 | | <% content_for :sidebar do -%> |
| 21 | | <ul class="links"> |
| 20 | <% content_for :submenu do -%> |
| 21 | <ul> |
| 22 | 22 | <li><%= link_to "+ Add SSH key", new_account_key_path -%></li> |
| 23 | 23 | <li><%= link_to "→ Edit details", edit_account_path -%></li> |
| 24 | 24 | </ul> |
| toggle raw diff |
--- a/app/views/accounts/show.html.erb
+++ b/app/views/accounts/show.html.erb
@@ -17,8 +17,8 @@
<% end -%>
-<% content_for :sidebar do -%>
- <ul class="links">
+<% content_for :submenu do -%>
+ <ul>
<li><%= link_to "+ Add SSH key", new_account_key_path -%></li>
<li><%= link_to "→ Edit details", edit_account_path -%></li>
</ul> |
| |   |
| 0 | | <% content_for :sidebar do -%> |
| 1 | | <ul class="links"> |
| 2 | | <li><%= link_to "← shortlog index", project_repository_browse_path(@project, @repository) -%></li> |
| 3 | | <li><%= link_to "← repository page", |
| 4 | | project_repository_path(@project, @repository) -%></li> |
| 5 | | <li><%= link_to "← project page", |
| 6 | | project_path(@project) -%></li> |
| 7 | | </ul> |
| 8 | | <% end -%> |
| toggle raw diff |
--- a/app/views/browse/_sidebar.html.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-<% content_for :sidebar do -%>
- <ul class="links">
- <li><%= link_to "← shortlog index", project_repository_browse_path(@project, @repository) -%></li>
- <li><%= link_to "← repository page",
- project_repository_path(@project, @repository) -%></li>
- <li><%= link_to "← project page",
- project_path(@project) -%></li>
- </ul>
-<% end -%>
\ No newline at end of file |
| |   |
| 1 | <% content_for :submenu do -%> |
| 2 | <ul> |
| 3 | <li><%= link_to "← shortlog index", project_repository_browse_path(@project, @repository) -%></li> |
| 4 | <li><%= link_to "← repository page", |
| 5 | project_repository_path(@project, @repository) -%></li> |
| 6 | <li><%= link_to "← project page", |
| 7 | project_path(@project) -%></li> |
| 8 | </ul> |
| 9 | <% end -%> |
| toggle raw diff |
--- /dev/null
+++ b/app/views/browse/_submenu.html.erb
@@ -0,0 +1,9 @@
+<% content_for :submenu do -%>
+ <ul>
+ <li><%= link_to "← shortlog index", project_repository_browse_path(@project, @repository) -%></li>
+ <li><%= link_to "← repository page",
+ project_repository_path(@project, @repository) -%></li>
+ <li><%= link_to "← project page",
+ project_path(@project) -%></li>
+ </ul>
+<% end -%>
\ No newline at end of file |
| |   |
| 27 | 27 | <% end -%> |
| 28 | 28 | </table> |
| 29 | 29 | |
| 30 | | <% content_for :sidebar do -%> |
| 31 | | <ul class="links"> |
| 32 | | <li><%= link_to "← Repository page", |
| 33 | | project_repository_path(@project, @repository) -%></li> |
| 34 | | <li><%= link_to "← Project page", |
| 35 | | project_path(@project) -%></li> |
| 36 | | </ul> |
| 37 | | |
| 30 | <% content_for :submenu do -%> |
| 31 | <ul> |
| 32 | <li><%= link_to "← Repository page", |
| 33 | project_repository_path(@project, @repository) -%></li> |
| 34 | <li><%= link_to "← Project page", |
| 35 | project_path(@project) -%></li> |
| 36 | </ul> |
| 37 | <% end -%> |
| 38 | |
| 39 | <% content_for :sidebar do -%> |
| 38 | 40 | <h5>Branches:</h5> |
| 39 | 41 | <ul class="links"> |
| 40 | 42 | <% @git.branches.each do |branch| -%> |
| toggle raw diff |
--- a/app/views/browse/index.html.erb
+++ b/app/views/browse/index.html.erb
@@ -27,14 +27,16 @@
<% end -%>
</table>
-<% content_for :sidebar do -%>
- <ul class="links">
- <li><%= link_to "← Repository page",
- project_repository_path(@project, @repository) -%></li>
- <li><%= link_to "← Project page",
- project_path(@project) -%></li>
- </ul>
-
+<% content_for :submenu do -%>
+<ul>
+ <li><%= link_to "← Repository page",
+ project_repository_path(@project, @repository) -%></li>
+ <li><%= link_to "← Project page",
+ project_path(@project) -%></li>
+</ul>
+<% end -%>
+
+<% content_for :sidebar do -%>
<h5>Branches:</h5>
<ul class="links">
<% @git.branches.each do |branch| -%> |
| |   |
| 10 | 10 | |
| 11 | 11 | <p><%= link_to "Add", new_account_key_path -%></p> |
| 12 | 12 | |
| 13 | | <% content_for :sidebar do -%> |
| 14 | | <ul class="links"> |
| 13 | <% content_for :submenu do -%> |
| 14 | <ul> |
| 15 | 15 | <li><%= link_to "Account", account_path -%></li> |
| 16 | 16 | </ul> |
| 17 | 17 | <% end -%> |
| toggle raw diff |
--- a/app/views/keys/index.html.erb
+++ b/app/views/keys/index.html.erb
@@ -10,8 +10,8 @@
<p><%= link_to "Add", new_account_key_path -%></p>
-<% content_for :sidebar do -%>
- <ul class="links">
+<% content_for :submenu do -%>
+ <ul>
<li><%= link_to "Account", account_path -%></li>
</ul>
<% end -%>
\ No newline at end of file |
| |   |
| 1 | 1 | <%= render :partial => "key", :locals => {:ssh_key => @ssh_key} -%> |
| 2 | 2 | |
| 3 | | <% content_for :sidebar do -%> |
| 4 | | <ul class="links"> |
| 3 | <% content_for :submenu do -%> |
| 4 | <ul> |
| 5 | 5 | <li><%= link_to "Account", account_path -%></li> |
| 6 | 6 | </ul> |
| 7 | 7 | <% end -%> |
| toggle raw diff |
--- a/app/views/keys/show.html.erb
+++ b/app/views/keys/show.html.erb
@@ -1,7 +1,7 @@
<%= render :partial => "key", :locals => {:ssh_key => @ssh_key} -%>
-<% content_for :sidebar do -%>
- <ul class="links">
+<% content_for :submenu do -%>
+ <ul>
<li><%= link_to "Account", account_path -%></li>
</ul>
<% end -%>
\ No newline at end of file |
| |   |
| 38 | 38 | <li><%= link_to "About", about_path -%></li> |
| 39 | 39 | </ul> |
| 40 | 40 | </div> |
| 41 | <div id="submenu"> |
| 42 | <%= yield :submenu -%> |
| 43 | </div> |
| 41 | 44 | </div> |
| 45 | <% unless @content_for_sidebar.blank? -%> |
| 42 | 46 | <div id="main"> |
| 47 | <% end -%> |
| 43 | 48 | <div id="content"> |
| 44 | 49 | <% if flash[:notice] -%> |
| 45 | 50 | <div class="flash_message notice"> |
| … | … | |
| 58 | 58 | <% end -%> |
| 59 | 59 | <%= yield -%> |
| 60 | 60 | </div> |
| 61 | <% unless @content_for_sidebar.blank? -%> |
| 61 | 62 | </div> |
| 62 | 63 | <div id="sidebar"> |
| 63 | 64 | <%= yield :sidebar -%> |
| 64 | 65 | </div> |
| 65 | 66 | <div class="clear"></div> |
| 67 | <% end -%> |
| 66 | 68 | <div id="footer"> |
| 67 | 69 | <ul> |
| 68 | 70 | <li><%= link_to "Home", root_path -%> | </li> |
| toggle raw diff |
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -38,8 +38,13 @@
<li><%= link_to "About", about_path -%></li>
</ul>
</div>
+ <div id="submenu">
+ <%= yield :submenu -%>
+ </div>
</div>
+ <% unless @content_for_sidebar.blank? -%>
<div id="main">
+ <% end -%>
<div id="content">
<% if flash[:notice] -%>
<div class="flash_message notice">
@@ -53,11 +58,13 @@
<% end -%>
<%= yield -%>
</div>
+ <% unless @content_for_sidebar.blank? -%>
</div>
<div id="sidebar">
<%= yield :sidebar -%>
</div>
<div class="clear"></div>
+ <% end -%>
<div id="footer">
<ul>
<li><%= link_to "Home", root_path -%> | </li> |
| |   |
| 11 | 11 | |
| 12 | 12 | <%= will_paginate @projects -%> |
| 13 | 13 | |
| 14 | | <% content_for :sidebar do -%> |
| 15 | | <ul class="links"> |
| 14 | <% content_for :submenu do -%> |
| 15 | <ul> |
| 16 | 16 | <li><%= link_to "+ New project", new_project_path -%></li> |
| 17 | 17 | </ul> |
| 18 | | |
| 18 | <% end -%> |
| 19 | |
| 20 | <% content_for :sidebar do -%> |
| 19 | 21 | <h4>Categories:</h4> |
| 20 | 22 | <ul class="tag_list"> |
| 21 | 23 | <% tag_cloud @tags, default_css_tag_sizes do |tag, css_class| %> |
| toggle raw diff |
--- a/app/views/projects/index.html.erb
+++ b/app/views/projects/index.html.erb
@@ -11,11 +11,13 @@
<%= will_paginate @projects -%>
-<% content_for :sidebar do -%>
- <ul class="links">
+<% content_for :submenu do -%>
+ <ul>
<li><%= link_to "+ New project", new_project_path -%></li>
</ul>
-
+<% end -%>
+
+<% content_for :sidebar do -%>
<h4>Categories:</h4>
<ul class="tag_list">
<% tag_cloud @tags, default_css_tag_sizes do |tag, css_class| %> |
| |   |
| 59 | 59 | <% end -%> |
| 60 | 60 | </table> |
| 61 | 61 | |
| 62 | | <% content_for :sidebar do -%> |
| 63 | | <ul class="links"> |
| 64 | | <% if @project.admin?(current_user) -%> |
| 65 | | <li><%= link_to "→ Edit project", edit_project_path(@project) -%></li> |
| 66 | | <% end -%> |
| 62 | <% content_for :submenu do -%> |
| 63 | <% if @project.admin?(current_user) -%> |
| 64 | <ul> |
| 65 | <li><%= link_to "→ Edit project", edit_project_path(@project) -%></li> |
| 67 | 66 | </ul> |
| 67 | <% end -%> |
| 68 | 68 | <% end -%> |
| toggle raw diff |
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -59,10 +59,10 @@
<% end -%>
</table>
-<% content_for :sidebar do -%>
- <ul class="links">
- <% if @project.admin?(current_user) -%>
- <li><%= link_to "→ Edit project", edit_project_path(@project) -%></li>
- <% end -%>
+<% content_for :submenu do -%>
+ <% if @project.admin?(current_user) -%>
+ <ul>
+ <li><%= link_to "→ Edit project", edit_project_path(@project) -%></li>
</ul>
+ <% end -%>
<% end -%>
\ No newline at end of file |
| |   |
| 0 | | <% content_for :sidebar do -%> |
| 1 | | <div class="user_list"> |
| 2 | | <ul class="links"> |
| 3 | | <% if @repository.ready? -%> |
| 4 | | <li><%= link_to "→ Browse repository", project_repository_browse_path(@project, @repository) -%></li> |
| 5 | | <li><%= link_to "+ Clone this repository", new_project_repository_path(@project, @repository) -%></li> |
| 6 | | <% end -%> |
| 7 | | <% if @repository.user == current_user -%> |
| 8 | | <li><%= link_to "+ Add committer", |
| 9 | | { :controller => "committers", :action => "new", :project_id => @project, |
| 10 | | :repository_id => @repository } -%></li> |
| 11 | | <% end -%> |
| 12 | | </ul> |
| 13 | | |
| 14 | | <h4>Committers</h4> |
| 15 | | <ul> |
| 16 | | <% @repository.committers.each do |user| -%> |
| 17 | | <li> |
| 18 | | <%= link_to h(user.login), user -%> |
| 19 | | <% if @repository.user == user -%> |
| 20 | | <small>(owner)</small> |
| 21 | | <% end -%> |
| 22 | | <% if @repository.user == current_user -%> |
| 23 | | <small> |
| 24 | | <%= link_to "Remove", |
| 25 | | { :controller => "committers", :action => "destroy", :id => user.id, |
| 26 | | :project_id => @project, :repository_id => @repository}, # FIXME: meh! |
| 27 | | :confirm => "Are you sure?", :method => :delete unless user == current_user -%> |
| 28 | | </small> |
| 29 | | <% end -%> |
| 30 | | </li> |
| 31 | | <% end -%> |
| 32 | | </ul> |
| 33 | | </div> |
| 34 | | <% end -%> |
| toggle raw diff |
--- a/app/views/repositories/_sidebar.html.erb
+++ /dev/null
@@ -1,35 +0,0 @@
-<% content_for :sidebar do -%>
- <div class="user_list">
- <ul class="links">
- <% if @repository.ready? -%>
- <li><%= link_to "→ Browse repository", project_repository_browse_path(@project, @repository) -%></li>
- <li><%= link_to "+ Clone this repository", new_project_repository_path(@project, @repository) -%></li>
- <% end -%>
- <% if @repository.user == current_user -%>
- <li><%= link_to "+ Add committer",
- { :controller => "committers", :action => "new", :project_id => @project,
- :repository_id => @repository } -%></li>
- <% end -%>
- </ul>
-
- <h4>Committers</h4>
- <ul>
- <% @repository.committers.each do |user| -%>
- <li>
- <%= link_to h(user.login), user -%>
- <% if @repository.user == user -%>
- <small>(owner)</small>
- <% end -%>
- <% if @repository.user == current_user -%>
- <small>
- <%= link_to "Remove",
- { :controller => "committers", :action => "destroy", :id => user.id,
- :project_id => @project, :repository_id => @repository}, # FIXME: meh!
- :confirm => "Are you sure?", :method => :delete unless user == current_user -%>
- </small>
- <% end -%>
- </li>
- <% end -%>
- </ul>
- </div>
-<% end -%>
\ No newline at end of file |
| |   |
| 1 | <% content_for :submenu do -%> |
| 2 | <ul> |
| 3 | <% if @repository.ready? -%> |
| 4 | <li><%= link_to "→ Browse repository", project_repository_browse_path(@project, @repository) -%></li> |
| 5 | <li><%= link_to "+ Clone this repository", new_project_repository_path(@project, @repository) -%></li> |
| 6 | <% end -%> |
| 7 | <% if @repository.user == current_user -%> |
| 8 | <li><%= link_to "+ Add committer", |
| 9 | { :controller => "committers", :action => "new", :project_id => @project, |
| 10 | :repository_id => @repository } -%></li> |
| 11 | <% end -%> |
| 12 | </ul> |
| 13 | <% end -%> |
| toggle raw diff |
--- /dev/null
+++ b/app/views/repositories/_submenu.html.erb
@@ -0,0 +1,13 @@
+<% content_for :submenu do -%>
+ <ul>
+ <% if @repository.ready? -%>
+ <li><%= link_to "→ Browse repository", project_repository_browse_path(@project, @repository) -%></li>
+ <li><%= link_to "+ Clone this repository", new_project_repository_path(@project, @repository) -%></li>
+ <% end -%>
+ <% if @repository.user == current_user -%>
+ <li><%= link_to "+ Add committer",
+ { :controller => "committers", :action => "new", :project_id => @project,
+ :repository_id => @repository } -%></li>
+ <% end -%>
+ </ul>
+<% end -%>
\ No newline at end of file |
| |   |
| 20 | 20 | the clone here until there's something to push.</em> |
| 21 | 21 | </p> |
| 22 | 22 | |
| 23 | | <% content_for :sidebar do -%> |
| 24 | | <ul class="links"> |
| 23 | <% content_for :submenu do -%> |
| 24 | <ul> |
| 25 | 25 | <li><%= link_to "← Repository page", |
| 26 | 26 | project_repository_path(@project, @repository_to_clone) -%></li> |
| 27 | 27 | <li><%= link_to "← Project page", |
| toggle raw diff |
--- a/app/views/repositories/new.html.erb
+++ b/app/views/repositories/new.html.erb
@@ -20,8 +20,8 @@
the clone here until there's something to push.</em>
</p>
-<% content_for :sidebar do -%>
- <ul class="links">
+<% content_for :submenu do -%>
+ <ul>
<li><%= link_to "← Repository page",
project_repository_path(@project, @repository_to_clone) -%></li>
<li><%= link_to "← Project page", |
| |   |
| 36 | 36 | |
| 37 | 37 | <% end -%> |
| 38 | 38 | |
| 39 | | <%= render :partial => "sidebar" -%> |
| 39 | <%= render :partial => "submenu" -%> |
| 40 | |
| 41 | <% content_for :sidebar do -%> |
| 42 | <div class="user_list"> |
| 43 | <h4>Committers</h4> |
| 44 | <ul> |
| 45 | <% @repository.committers.each do |user| -%> |
| 46 | <li> |
| 47 | <%= link_to h(user.login), user -%> |
| 48 | <% if @repository.user == user -%> |
| 49 | <small>(owner)</small> |
| 50 | <% end -%> |
| 51 | <% if @repository.user == current_user -%> |
| 52 | <small> |
| 53 | <%= link_to "Remove", |
| 54 | { :controller => "committers", :action => "destroy", :id => user.id, |
| 55 | :project_id => @project, :repository_id => @repository}, # FIXME: meh! |
| 56 | :confirm => "Are you sure?", :method => :delete unless user == current_user -%> |
| 57 | </small> |
| 58 | <% end -%> |
| 59 | </li> |
| 60 | <% end -%> |
| 61 | </ul> |
| 62 | </div> |
| 63 | <% end -%> |
| toggle raw diff |
--- a/app/views/repositories/show.html.erb
+++ b/app/views/repositories/show.html.erb
@@ -36,4 +36,28 @@
<% end -%>
-<%= render :partial => "sidebar" -%>
\ No newline at end of file
+<%= render :partial => "submenu" -%>
+
+<% content_for :sidebar do -%>
+ <div class="user_list">
+ <h4>Committers</h4>
+ <ul>
+ <% @repository.committers.each do |user| -%>
+ <li>
+ <%= link_to h(user.login), user -%>
+ <% if @repository.user == user -%>
+ <small>(owner)</small>
+ <% end -%>
+ <% if @repository.user == current_user -%>
+ <small>
+ <%= link_to "Remove",
+ { :controller => "committers", :action => "destroy", :id => user.id,
+ :project_id => @project, :repository_id => @repository}, # FIXME: meh!
+ :confirm => "Are you sure?", :method => :delete unless user == current_user -%>
+ </small>
+ <% end -%>
+ </li>
+ <% end -%>
+ </ul>
+ </div>
+<% end -%>
\ No newline at end of file |
| |   |
| 146 | 146 | float:left; |
| 147 | 147 | margin-right: -160px; |
| 148 | 148 | } |
| 149 | | #container #main #content { |
| 149 | #container #content { /* when there's no sidebar*/ |
| 150 | margin: 0 0 1em 2.5em; |
| 151 | } |
| 152 | #container #main #content { /* when there's sidebar contents */ |
| 153 | margin:0; |
| 150 | 154 | margin-right: 160px; |
| 151 | 155 | margin-top: 20px; |
| 152 | 156 | padding: 0 1em 1em 2em; |
| 153 | 157 | } |
| 154 | | |
| 155 | 158 | #container #sidebar { |
| 156 | 159 | margin-top: 20px; |
| 157 | 160 | padding-left: 5px; |
| … | … | |
| 235 | 235 | border-bottom: 3px solid #630; |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | /* submenu */ |
| 239 | #submenu { |
| 240 | margin-bottom: 0.5em; |
| 241 | border-bottom: 1px solid #ccc; |
| 242 | } |
| 243 | #submenu ul { |
| 244 | list-style: none; |
| 245 | padding: 2px 0 2px 0; |
| 246 | margin: 0 0 0 2em; |
| 247 | } |
| 248 | |
| 249 | #submenu ul li { |
| 250 | display: inline; |
| 251 | margin-right: 30px; |
| 252 | } |
| 253 | |
| 254 | #submenu ul li a { |
| 255 | /* font-size: 12px;*/ |
| 256 | } |
| 257 | |
| 258 | #submenu ul li a:hover { |
| 259 | text-decoration: none; |
| 260 | border-bottom: 2px solid #630; |
| 261 | } |
| 262 | |
| 238 | 263 | /* Forms */ |
| 239 | 264 | |
| 240 | 265 | textarea { |
| toggle raw diff |
--- a/public/stylesheets/base.css
+++ b/public/stylesheets/base.css
@@ -146,12 +146,15 @@ abbr {
float:left;
margin-right: -160px;
}
-#container #main #content {
+#container #content { /* when there's no sidebar*/
+ margin: 0 0 1em 2.5em;
+}
+#container #main #content { /* when there's sidebar contents */
+ margin:0;
margin-right: 160px;
margin-top: 20px;
padding: 0 1em 1em 2em;
}
-
#container #sidebar {
margin-top: 20px;
padding-left: 5px;
@@ -232,6 +235,31 @@ abbr {
border-bottom: 3px solid #630;
}
+/* submenu */
+#submenu {
+ margin-bottom: 0.5em;
+ border-bottom: 1px solid #ccc;
+}
+#submenu ul {
+ list-style: none;
+ padding: 2px 0 2px 0;
+ margin: 0 0 0 2em;
+}
+
+#submenu ul li {
+ display: inline;
+ margin-right: 30px;
+}
+
+#submenu ul li a {
+/* font-size: 12px;*/
+}
+
+#submenu ul li a:hover {
+ text-decoration: none;
+ border-bottom: 2px solid #630;
+}
+
/* Forms */
textarea { |