public
Description: Gitorious aims to provide a great way of doing distributed opensource code collaboration.
Homepage: http://gitorious.org/projects/gitorious
Clone URL: git://github.com/dysinger/gitorious.git
move sidebar menu into a submenu at the top
js (author)
Sat Jan 12 04:39:48 -0800 2008
commit  0abaf722ddd93ed085d37142ef7e925d811a37d0
tree    e2604f98ad843826db1b2ef8f8c0bf586b93eb79
parent  b8786588f608be72f41e7ba5739d91d4f4319b50
...
25
26
27
28
29
 
 
30
31
32
33
...
25
26
27
 
 
28
29
30
31
32
33
0
@@ -25,8 +25,8 @@
0
   <%= f.submit "Save" -%>
0
 <% end -%>
0
 
0
-<% content_for :sidebar do -%>
0
- <ul class="links">
0
+<% content_for :submenu do -%>
0
+ <ul>
0
     <li><%= link_to "&#x2190; My account", account_path -%></li>
0
   </ul>
0
 <% end -%>
0
\ No newline at end of file
...
17
18
19
20
21
 
 
22
23
24
...
17
18
19
 
 
20
21
22
23
24
0
@@ -17,8 +17,8 @@
0
 <% end -%>
0
 
0
 
0
-<% content_for :sidebar do -%>
0
- <ul class="links">
0
+<% content_for :submenu do -%>
0
+ <ul>
0
     <li><%= link_to "+ Add SSH key", new_account_key_path -%></li>
0
     <li><%= link_to "&#x2192; Edit details", edit_account_path -%></li>
0
   </ul>
...
4
5
6
7
 
...
4
5
6
 
7
0
@@ -4,4 +4,4 @@
0
 </h1>
0
 <pre><%=h @blob.contents -%></pre>
0
 
0
-<%= render :partial => "sidebar" -%>
0
+<%= render :partial => "submenu" -%>
...
24
25
26
27
28
 
29
...
24
25
26
 
27
28
29
0
@@ -24,4 +24,4 @@
0
   </div>
0
 <% end -%>
0
 
0
-<%= render :partial => "sidebar" -%>
0
\ No newline at end of file
0
+<%= render :partial => "submenu" -%>
0
\ No newline at end of file
...
10
11
12
13
14
 
15
...
10
11
12
 
13
14
15
0
@@ -10,4 +10,4 @@
0
   <p><pre><%=h file.patch -%></pre></p>
0
 <% end -%>
0
 
0
-<%= render :partial => "sidebar" -%>
0
\ No newline at end of file
0
+<%= render :partial => "submenu" -%>
0
\ No newline at end of file
...
27
28
29
30
31
32
33
34
35
36
37
 
 
 
 
 
 
 
 
 
 
38
39
40
...
27
28
29
 
 
 
 
 
 
 
 
30
31
32
33
34
35
36
37
38
39
40
41
42
0
@@ -27,14 +27,16 @@
0
   <% end -%>
0
 </table>
0
 
0
-<% content_for :sidebar do -%>
0
- <ul class="links">
0
- <li><%= link_to "&#x2190; Repository page",
0
- project_repository_path(@project, @repository) -%></li>
0
- <li><%= link_to "&#x2190; Project page",
0
- project_path(@project) -%></li>
0
- </ul>
0
-
0
+<% content_for :submenu do -%>
0
+<ul>
0
+ <li><%= link_to "&#x2190; Repository page",
0
+ project_repository_path(@project, @repository) -%></li>
0
+ <li><%= link_to "&#x2190; Project page",
0
+ project_path(@project) -%></li>
0
+</ul>
0
+<% end -%>
0
+
0
+<% content_for :sidebar do -%>
0
   <h5>Branches:</h5>
0
   <ul class="links">
0
     <% @git.branches.each do |branch| -%>
...
20
21
22
23
24
 
25
...
20
21
22
 
23
24
25
0
@@ -20,4 +20,4 @@
0
   <% end -%>
0
 </table>
0
 
0
-<%= render :partial => "sidebar" -%>
0
\ No newline at end of file
0
+<%= render :partial => "submenu" -%>
0
\ No newline at end of file
...
15
16
17
18
19
 
20
...
15
16
17
 
18
19
20
0
@@ -15,4 +15,4 @@
0
 
0
 <%= render :partial => "form", :locals => {:sha1 => @commit.sha} -%>
0
 
0
-<%= render :partial => "browse/sidebar" -%>
0
\ No newline at end of file
0
+<%= render :partial => "browse/submenu" -%>
0
\ No newline at end of file
...
21
22
23
24
25
 
26
...
21
22
23
 
24
25
26
0
@@ -21,4 +21,4 @@
0
 
0
 <%= render :partial => "form" -%>
0
 
0
-<%= render :partial => "repositories/sidebar" -%>
0
\ No newline at end of file
0
+<%= render :partial => "repositories/submenu" -%>
0
\ No newline at end of file
...
14
15
16
17
 
18
19
20
...
14
15
16
 
17
18
19
20
0
@@ -14,7 +14,7 @@
0
   </p>
0
 <% end -%>
0
 
0
-<% content_for :sidebar do -%>
0
+<% content_for :submenu do -%>
0
   <ul class="links">
0
     <li><%= link_to "&#x2190; " + h(@repository.project.title), @repository.project -%></li>
0
   </ul>
...
10
11
12
13
14
 
 
15
16
17
18
...
10
11
12
 
 
13
14
15
16
17
18
0
@@ -10,8 +10,8 @@
0
   <%= f.submit "Save" -%>
0
 <% end -%>
0
 
0
-<% content_for :sidebar do -%>
0
- <ul class="links">
0
+<% content_for :submenu do -%>
0
+ <ul>
0
     <li><%= link_to "Account", account_path -%></li>
0
   </ul>
0
 <% end -%>
0
\ No newline at end of file
...
10
11
12
13
14
 
 
15
16
17
18
...
10
11
12
 
 
13
14
15
16
17
18
0
@@ -10,8 +10,8 @@
0
 
0
 <p><%= link_to "Add", new_account_key_path -%></p>
0
 
0
-<% content_for :sidebar do -%>
0
- <ul class="links">
0
+<% content_for :submenu do -%>
0
+ <ul>
0
     <li><%= link_to "Account", account_path -%></li>
0
   </ul>
0
 <% end -%>
0
\ No newline at end of file
...
13
14
15
16
17
 
 
18
19
20
21
...
13
14
15
 
 
16
17
18
19
20
21
0
@@ -13,8 +13,8 @@
0
   <%= f.submit "Save" -%>
0
 <% end -%>
0
 
0
-<% content_for :sidebar do -%>
0
- <ul class="links">
0
+<% content_for :submenu do -%>
0
+ <ul>
0
     <li><%= link_to "&#x2190; My account", account_path -%></li>
0
   </ul>
0
 <% end -%>
0
\ No newline at end of file
...
1
2
3
4
 
 
5
6
7
8
...
1
2
 
 
3
4
5
6
7
8
0
@@ -1,7 +1,7 @@
0
 <%= render :partial => "key", :locals => {:ssh_key => @ssh_key} -%>
0
 
0
-<% content_for :sidebar do -%>
0
- <ul class="links">
0
+<% content_for :submenu do -%>
0
+ <ul>
0
     <li><%= link_to "Account", account_path -%></li>
0
   </ul>
0
 <% end -%>
0
\ No newline at end of file
...
38
39
40
 
 
 
41
 
42
 
43
44
45
...
53
54
55
 
56
57
58
59
60
 
61
62
63
...
38
39
40
41
42
43
44
45
46
47
48
49
50
...
58
59
60
61
62
63
64
65
66
67
68
69
70
0
@@ -38,8 +38,13 @@
0
           <li><%= link_to "About", about_path -%></li>
0
         </ul>
0
       </div>
0
+ <div id="submenu">
0
+ <%= yield :submenu -%>
0
+ </div>
0
     </div>
0
+ <% unless @content_for_sidebar.blank? -%>
0
     <div id="main">
0
+ <% end -%>
0
       <div id="content">
0
         <% if flash[:notice] -%>
0
           <div class="flash_message notice">
0
@@ -53,11 +58,13 @@
0
         <% end -%>
0
         <%= yield -%>
0
       </div>
0
+ <% unless @content_for_sidebar.blank? -%>
0
     </div>
0
     <div id="sidebar">
0
       <%= yield :sidebar -%>
0
     </div>
0
     <div class="clear"></div>
0
+ <% end -%>
0
     <div id="footer">
0
       <ul>
0
         <li><%= link_to "Home", root_path -%> | </li>
...
11
12
13
14
15
 
 
16
17
18
 
 
 
19
20
21
...
11
12
13
 
 
14
15
16
17
 
18
19
20
21
22
23
0
@@ -11,11 +11,13 @@
0
 
0
 <%= will_paginate @projects -%>
0
 
0
-<% content_for :sidebar do -%>
0
- <ul class="links">
0
+<% content_for :submenu do -%>
0
+ <ul>
0
     <li><%= link_to "+ New project", new_project_path -%></li>
0
   </ul>
0
-
0
+<% end -%>
0
+
0
+<% content_for :sidebar do -%>
0
   <h4>Categories:</h4>
0
   <ul class="tag_list">
0
     <% tag_cloud @tags, default_css_tag_sizes do |tag, css_class| %>
...
59
60
61
62
63
64
65
66
 
 
 
 
67
 
68
69
...
59
60
61
 
 
 
 
 
62
63
64
65
66
67
68
69
0
@@ -59,10 +59,10 @@
0
   <% end -%>
0
 </table>
0
 
0
-<% content_for :sidebar do -%>
0
- <ul class="links">
0
- <% if @project.admin?(current_user) -%>
0
- <li><%= link_to "&#x2192; Edit project", edit_project_path(@project) -%></li>
0
- <% end -%>
0
+<% content_for :submenu do -%>
0
+ <% if @project.admin?(current_user) -%>
0
+ <ul>
0
+ <li><%= link_to "&#x2192; Edit project", edit_project_path(@project) -%></li>
0
   </ul>
0
+ <% end -%>
0
 <% end -%>
0
\ No newline at end of file
...
20
21
22
23
24
 
 
25
26
27
...
20
21
22
 
 
23
24
25
26
27
0
@@ -20,8 +20,8 @@
0
   the clone here until there's something to push.</em>
0
 </p>
0
 
0
-<% content_for :sidebar do -%>
0
- <ul class="links">
0
+<% content_for :submenu do -%>
0
+ <ul>
0
     <li><%= link_to "&#x2190; Repository page",
0
               project_repository_path(@project, @repository_to_clone) -%></li>
0
     <li><%= link_to "&#x2190; Project page",
...
36
37
38
39
40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
...
36
37
38
 
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
0
@@ -36,4 +36,28 @@
0
   
0
 <% end -%>
0
 
0
-<%= render :partial => "sidebar" -%>
0
\ No newline at end of file
0
+<%= render :partial => "submenu" -%>
0
+
0
+<% content_for :sidebar do -%>
0
+ <div class="user_list">
0
+ <h4>Committers</h4>
0
+ <ul>
0
+ <% @repository.committers.each do |user| -%>
0
+ <li>
0
+ <%= link_to h(user.login), user -%>
0
+ <% if @repository.user == user -%>
0
+ <small>(owner)</small>
0
+ <% end -%>
0
+ <% if @repository.user == current_user -%>
0
+ <small>
0
+ <%= link_to "Remove",
0
+ { :controller => "committers", :action => "destroy", :id => user.id,
0
+ :project_id => @project, :repository_id => @repository}, # FIXME: meh!
0
+ :confirm => "Are you sure?", :method => :delete unless user == current_user -%>
0
+ </small>
0
+ <% end -%>
0
+ </li>
0
+ <% end -%>
0
+ </ul>
0
+ </div>
0
+<% end -%>
0
\ No newline at end of file
...
20
21
22
23
24
 
 
25
26
27
28
...
20
21
22
 
 
23
24
25
26
27
28
0
@@ -20,8 +20,8 @@
0
   <p><%= submit_tag 'Log in' %></p>
0
 <% end -%>
0
 
0
-<% content_for(:sidebar) do -%>
0
- <ul class="links">
0
+<% content_for(:submenu) do -%>
0
+ <ul>
0
     <li><%= link_to "&#x2192; Register", new_user_path -%></li>
0
   </ul>
0
 <% end -%>
0
\ No newline at end of file
...
26
27
28
29
30
 
 
31
32
33
...
26
27
28
 
 
29
30
31
32
33
0
@@ -26,8 +26,8 @@
0
 </ul>
0
 
0
 <% if current_user && (current_user == @user) -%>
0
- <% content_for :sidebar do -%>
0
- <ul class="links">
0
+ <% content_for :submenu do -%>
0
+ <ul>
0
       <li><%= link_to "+ Edit your account", edit_account_url -%>
0
     </ul>
0
   <% end -%>
...
64
65
66
 
67
68
69
...
64
65
66
67
68
69
70
0
@@ -64,6 +64,7 @@ module AuthenticatedSystem
0
       respond_to do |accepts|
0
         accepts.html do
0
           store_location
0
+ flash[:error] = "Action requires login"
0
           redirect_to :controller => '/sessions', :action => 'new'
0
         end
0
         accepts.xml do
...
146
147
148
149
 
 
 
 
 
150
151
152
153
154
155
156
157
...
232
233
234
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
236
237
...
146
147
148
 
149
150
151
152
153
154
155
156
157
 
158
159
160
...
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
0
@@ -146,12 +146,15 @@ abbr {
0
   float:left;
0
   margin-right: -160px;
0
 }
0
-#container #main #content {
0
+#container #content { /* when there's no sidebar*/
0
+ margin: 0 0 1em 2.5em;
0
+}
0
+#container #main #content { /* when there's sidebar contents */
0
+ margin:0;
0
   margin-right: 160px;
0
   margin-top: 20px;
0
   padding: 0 1em 1em 2em;
0
 }
0
-
0
 #container #sidebar {
0
   margin-top: 20px;
0
   padding-left: 5px;
0
@@ -232,6 +235,31 @@ abbr {
0
   border-bottom: 3px solid #630;
0
 }
0
 
0
+/* submenu */
0
+#submenu {
0
+ margin-bottom: 0.5em;
0
+ border-bottom: 1px solid #ccc;
0
+}
0
+#submenu ul {
0
+ list-style: none;
0
+ padding: 2px 0 2px 0;
0
+ margin: 0 0 0 2em;
0
+}
0
+
0
+#submenu ul li {
0
+ display: inline;
0
+ margin-right: 30px;
0
+}
0
+
0
+#submenu ul li a {
0
+/* font-size: 12px;*/
0
+}
0
+
0
+#submenu ul li a:hover {
0
+ text-decoration: none;
0
+ border-bottom: 2px solid #630;
0
+}
0
+
0
 /* Forms */
0
 
0
 textarea {

Comments

    No one has commented yet.