Commit c8b955a44b1897394d6dda349af2f183a820cc28
1 parent
c66bc99f
Exists in
master
and in
4 other branches
lil restyle
Showing
15 changed files
with
71 additions
and
61 deletions
Show diff stats
Gemfile
... | ... | @@ -6,6 +6,7 @@ gem "sqlite3" |
6 | 6 | gem "devise", "1.5.0" |
7 | 7 | gem "stamp" |
8 | 8 | gem "kaminari" |
9 | +gem "haml", "3.1.4" | |
9 | 10 | gem "haml-rails" |
10 | 11 | gem "jquery-rails" |
11 | 12 | gem "grit", :git => "https://github.com/gitlabhq/grit.git" |
... | ... | @@ -25,6 +26,7 @@ gem "drapper" |
25 | 26 | gem "resque" |
26 | 27 | gem "httparty" |
27 | 28 | gem "charlock_holmes" |
29 | +gem "foreman" | |
28 | 30 | |
29 | 31 | group :assets do |
30 | 32 | gem "sass-rails", "~> 3.1.0" | ... | ... |
Gemfile.lock
... | ... | @@ -104,8 +104,11 @@ GEM |
104 | 104 | faker (1.0.1) |
105 | 105 | i18n (~> 0.4) |
106 | 106 | ffi (1.0.11) |
107 | + foreman (0.27.0) | |
108 | + term-ansicolor (~> 1.0.5) | |
109 | + thor (>= 0.13.6) | |
107 | 110 | git (1.2.5) |
108 | - haml (3.1.3) | |
111 | + haml (3.1.4) | |
109 | 112 | haml-rails (0.3.4) |
110 | 113 | actionpack (~> 3.0) |
111 | 114 | activesupport (~> 3.0) |
... | ... | @@ -246,6 +249,7 @@ GEM |
246 | 249 | tilt (~> 1.1, != 1.3.0) |
247 | 250 | sqlite3 (1.3.4) |
248 | 251 | stamp (0.1.6) |
252 | + term-ansicolor (1.0.7) | |
249 | 253 | therubyracer (0.9.9) |
250 | 254 | libv8 (~> 3.3.10) |
251 | 255 | thin (1.3.1) |
... | ... | @@ -291,9 +295,11 @@ DEPENDENCIES |
291 | 295 | devise (= 1.5.0) |
292 | 296 | drapper |
293 | 297 | faker |
298 | + foreman | |
294 | 299 | git |
295 | 300 | gitolite! |
296 | 301 | grit! |
302 | + haml (= 3.1.4) | |
297 | 303 | haml-rails |
298 | 304 | httparty |
299 | 305 | jquery-rails | ... | ... |
288 Bytes
app/assets/javascripts/tree.js
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | var Tree = { |
6 | 6 | init: |
7 | 7 | function() { |
8 | - (new Image).src = "/assets/ajax-loader-tree.gif"; | |
8 | + (new Image).src = "ajax-loader-facebook.gif"; | |
9 | 9 | |
10 | 10 | $('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live("click", function() { |
11 | 11 | history.pushState({ path: this.path }, '', this.href) |
... | ... | @@ -20,8 +20,8 @@ var Tree = { |
20 | 20 | }); |
21 | 21 | |
22 | 22 | $('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live({ |
23 | - "ajax:beforeSend": function() { $('h2.icon').addClass("loading") }, | |
24 | - "ajax:complete": function() { $('h2.icon').removeClass("loading")} | |
23 | + "ajax:beforeSend": function() { $('.tree_progress').addClass("loading"); }, | |
24 | + "ajax:complete": function() { $('.tree_progress').removeClass("loading"); } | |
25 | 25 | }); |
26 | 26 | } |
27 | 27 | } | ... | ... |
app/assets/stylesheets/projects.css.scss
... | ... | @@ -693,3 +693,36 @@ a.project-update.titled { |
693 | 693 | top: 0; |
694 | 694 | } |
695 | 695 | } |
696 | + | |
697 | +.add_new { | |
698 | + float:right; | |
699 | + padding: 5px 12px; | |
700 | + border: 1px solid #CCC; | |
701 | + | |
702 | + &:hover { | |
703 | + background:#eee; | |
704 | + } | |
705 | + | |
706 | + &:active { | |
707 | + background:#ddd; | |
708 | + } | |
709 | +} | |
710 | + | |
711 | +.tree_progress { | |
712 | + float:left; | |
713 | + width:16px; | |
714 | + height:16px; | |
715 | + margin:6px; | |
716 | + &.loading { | |
717 | + background-position: 0px 0px; | |
718 | + background: url("ajax-loader-facebook.gif") no-repeat; | |
719 | + } | |
720 | +} | |
721 | + | |
722 | +#tree-breadcrumbs { | |
723 | + h2 { | |
724 | + margin:0; | |
725 | + margin-bottom:20px; | |
726 | + float:left; | |
727 | + } | |
728 | +} | ... | ... |
app/controllers/dashboard_controller.rb
... | ... | @@ -3,7 +3,7 @@ class DashboardController < ApplicationController |
3 | 3 | |
4 | 4 | def index |
5 | 5 | @projects = current_user.projects.all |
6 | - @active_projects = @projects.select(&:last_activity_date_cached).sort_by(&:last_activity_date_cached).reverse | |
6 | + @active_projects = @projects.select(&:repo_exists?).select(&:last_activity_date_cached).sort_by(&:last_activity_date_cached).reverse | |
7 | 7 | |
8 | 8 | respond_to do |format| |
9 | 9 | format.html | ... | ... |
app/helpers/projects_helper.rb
... | ... | @@ -28,10 +28,8 @@ module ProjectsHelper |
28 | 28 | end |
29 | 29 | |
30 | 30 | def tree_tab_class |
31 | - current_page?(:controller => "refs", | |
32 | - :action => "tree", | |
33 | - :project_id => @project, | |
34 | - :id => @ref || @project.root_ref ) ? "current" : nil | |
31 | + controller.controller_name == "refs" ? | |
32 | + "current" : nil | |
35 | 33 | end |
36 | 34 | |
37 | 35 | def repository_tab_class | ... | ... |
app/views/hooks/index.html.haml
1 | 1 | = render "repositories/head" |
2 | - | |
3 | - | |
4 | - | |
5 | - | |
6 | -.right= link_to "Add new", new_project_hook_path(@project), :class => "grey-button append-bottom-10" | |
7 | 2 | - unless @hooks.empty? |
8 | 3 | %div.update-data.ui-box.ui-box-small |
9 | 4 | .data |
... | ... | @@ -19,7 +14,7 @@ |
19 | 14 | %h3 No hooks |
20 | 15 | |
21 | 16 | .clear |
22 | -%h3 Help | |
17 | +%hr | |
23 | 18 | %p |
24 | 19 | Post receive hooks. For now only POST request allowed. We send some data with request. Example below |
25 | 20 | ... | ... |
app/views/projects/_project_head.html.haml
... | ... | @@ -15,4 +15,13 @@ |
15 | 15 | %span |
16 | 16 | Snippets |
17 | 17 | |
18 | + - if current_page?(project_snippets_path(@project)) | |
19 | + - if can? current_user, :write_snippet, @project | |
20 | + = link_to new_project_snippet_path(@project), :class => "add_new", :title => "New Snippet" do | |
21 | + = image_tag "add_new.png", :width => 14 | |
18 | 22 | |
23 | + | |
24 | + - if current_page?(team_project_path(@project)) | |
25 | + - if can? current_user, :admin_team_member, @project | |
26 | + = link_to new_project_team_member_path(@project), :class => "add_new", :title => "New Team Member", :remote => true do | |
27 | + = image_tag "add_new.png", :width => 14 | ... | ... |
app/views/projects/_team.html.haml
app/views/projects/_top_menu.html.haml
... | ... | @@ -1,29 +0,0 @@ |
1 | -%div.top_project_menu | |
2 | - - if @project.repo_exists? | |
3 | - %span= link_to image_tag("home.png", :width => 20), project_path(@project), :class => current_page?(:controller => "projects", :action => "show", :id => @project) ? "current" : nil | |
4 | - %span= link_to "Tree", tree_project_path(@project), :class => current_page?(:controller => "projects", :action => "tree", :id => @project) ? "current" : nil | |
5 | - %span= link_to "Commits", project_commits_path(@project), :class => current_page?(:controller => "commits", :action => "index", :project_id => @project) ? "current" : nil | |
6 | - %span | |
7 | - = link_to team_project_path(@project), :class => (current_page?(:controller => "projects", :action => "team", :id => @project) || controller.controller_name == "team_members") ? "current" : nil do | |
8 | - Team | |
9 | - - if @project.users_projects.count > 0 | |
10 | - %span{ :class => "top_menu_count" }= @project.users_projects.count | |
11 | - %span | |
12 | - = link_to project_issues_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do | |
13 | - Issues | |
14 | - - if @project.issues.opened.count > 0 | |
15 | - %span{ :class => "top_menu_count" }= @project.issues.opened.count | |
16 | - %span | |
17 | - = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do | |
18 | - Wall | |
19 | - - if @project.common_notes.count > 0 | |
20 | - %span{ :class => "top_menu_count" }= @project.common_notes.count | |
21 | - %span | |
22 | - = link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do | |
23 | - Snippets | |
24 | - - if @project.snippets.count > 0 | |
25 | - %span{ :class => "top_menu_count" }= @project.snippets.non_expired.count | |
26 | - | |
27 | - - if @commit | |
28 | - %span= link_to truncate(commit_name(@project,@commit), :length => 15), project_commit_path(@project, :id => @commit.id), :class => current_page?(:controller => "commits", :action => "show", :project_id => @project, :id => @commit.id) ? "current" : nil | |
29 | - |
app/views/refs/_tree.html.haml
1 | 1 | #tree-breadcrumbs |
2 | - %h2.icon | |
3 | - %span | |
4 | - %d | |
5 | - = link_to tree_project_ref_path(@project, @ref, :path => nil), :remote => true do | |
6 | - = @project.code | |
7 | - - tree.breadcrumbs(3) do |link| | |
8 | - \/ | |
9 | - = link | |
10 | - | |
2 | + %h2 | |
3 | + = link_to tree_project_ref_path(@project, @ref, :path => nil), :remote => true do | |
4 | + = @project.code | |
5 | + - tree.breadcrumbs(4) do |link| | |
6 | + \/ | |
7 | + = link | |
8 | + | |
9 | + %span.tree_progress | |
11 | 10 | .clear |
12 | 11 | #tree-content-holder |
13 | 12 | - if tree.is_blob? | ... | ... |
app/views/repositories/_head.html.haml
... | ... | @@ -15,5 +15,9 @@ |
15 | 15 | %span |
16 | 16 | Deploy Keys |
17 | 17 | |
18 | + - if current_page?(project_hooks_path(@project)) | |
19 | + - if can? current_user, :admin_project, @project | |
20 | + = link_to new_project_hook_path(@project), :class => "add_new", :title => "New Web Hook" do | |
21 | + = image_tag "add_new.png", :width => 14 | |
18 | 22 | |
19 | 23 | ... | ... |
app/views/snippets/index.html.haml
1 | 1 | = render "projects/project_head" |
2 | -- if can? current_user, :write_snippet, @project | |
3 | - .right= link_to 'New Snippet', new_project_snippet_path(@project), :class => "grey-button append-bottom-10" | |
4 | 2 | |
5 | 3 | - unless @snippets.fresh.empty? |
6 | 4 | %div{ :class => "update-data ui-box ui-box-small ui-box-big" } | ... | ... |
spec/requests/team_members_spec.rb