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 +6,7 @@ gem "sqlite3" | ||
6 | gem "devise", "1.5.0" | 6 | gem "devise", "1.5.0" |
7 | gem "stamp" | 7 | gem "stamp" |
8 | gem "kaminari" | 8 | gem "kaminari" |
9 | +gem "haml", "3.1.4" | ||
9 | gem "haml-rails" | 10 | gem "haml-rails" |
10 | gem "jquery-rails" | 11 | gem "jquery-rails" |
11 | gem "grit", :git => "https://github.com/gitlabhq/grit.git" | 12 | gem "grit", :git => "https://github.com/gitlabhq/grit.git" |
@@ -25,6 +26,7 @@ gem "drapper" | @@ -25,6 +26,7 @@ gem "drapper" | ||
25 | gem "resque" | 26 | gem "resque" |
26 | gem "httparty" | 27 | gem "httparty" |
27 | gem "charlock_holmes" | 28 | gem "charlock_holmes" |
29 | +gem "foreman" | ||
28 | 30 | ||
29 | group :assets do | 31 | group :assets do |
30 | gem "sass-rails", "~> 3.1.0" | 32 | gem "sass-rails", "~> 3.1.0" |
Gemfile.lock
@@ -104,8 +104,11 @@ GEM | @@ -104,8 +104,11 @@ GEM | ||
104 | faker (1.0.1) | 104 | faker (1.0.1) |
105 | i18n (~> 0.4) | 105 | i18n (~> 0.4) |
106 | ffi (1.0.11) | 106 | ffi (1.0.11) |
107 | + foreman (0.27.0) | ||
108 | + term-ansicolor (~> 1.0.5) | ||
109 | + thor (>= 0.13.6) | ||
107 | git (1.2.5) | 110 | git (1.2.5) |
108 | - haml (3.1.3) | 111 | + haml (3.1.4) |
109 | haml-rails (0.3.4) | 112 | haml-rails (0.3.4) |
110 | actionpack (~> 3.0) | 113 | actionpack (~> 3.0) |
111 | activesupport (~> 3.0) | 114 | activesupport (~> 3.0) |
@@ -246,6 +249,7 @@ GEM | @@ -246,6 +249,7 @@ GEM | ||
246 | tilt (~> 1.1, != 1.3.0) | 249 | tilt (~> 1.1, != 1.3.0) |
247 | sqlite3 (1.3.4) | 250 | sqlite3 (1.3.4) |
248 | stamp (0.1.6) | 251 | stamp (0.1.6) |
252 | + term-ansicolor (1.0.7) | ||
249 | therubyracer (0.9.9) | 253 | therubyracer (0.9.9) |
250 | libv8 (~> 3.3.10) | 254 | libv8 (~> 3.3.10) |
251 | thin (1.3.1) | 255 | thin (1.3.1) |
@@ -291,9 +295,11 @@ DEPENDENCIES | @@ -291,9 +295,11 @@ DEPENDENCIES | ||
291 | devise (= 1.5.0) | 295 | devise (= 1.5.0) |
292 | drapper | 296 | drapper |
293 | faker | 297 | faker |
298 | + foreman | ||
294 | git | 299 | git |
295 | gitolite! | 300 | gitolite! |
296 | grit! | 301 | grit! |
302 | + haml (= 3.1.4) | ||
297 | haml-rails | 303 | haml-rails |
298 | httparty | 304 | httparty |
299 | jquery-rails | 305 | jquery-rails |
288 Bytes
app/assets/javascripts/tree.js
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | var Tree = { | 5 | var Tree = { |
6 | init: | 6 | init: |
7 | function() { | 7 | function() { |
8 | - (new Image).src = "/assets/ajax-loader-tree.gif"; | 8 | + (new Image).src = "ajax-loader-facebook.gif"; |
9 | 9 | ||
10 | $('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live("click", function() { | 10 | $('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live("click", function() { |
11 | history.pushState({ path: this.path }, '', this.href) | 11 | history.pushState({ path: this.path }, '', this.href) |
@@ -20,8 +20,8 @@ var Tree = { | @@ -20,8 +20,8 @@ var Tree = { | ||
20 | }); | 20 | }); |
21 | 21 | ||
22 | $('#tree-slider td.tree-item-file-name a, #tree-breadcrumbs a').live({ | 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,3 +693,36 @@ a.project-update.titled { | ||
693 | top: 0; | 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,7 +3,7 @@ class DashboardController < ApplicationController | ||
3 | 3 | ||
4 | def index | 4 | def index |
5 | @projects = current_user.projects.all | 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 | respond_to do |format| | 8 | respond_to do |format| |
9 | format.html | 9 | format.html |
app/helpers/projects_helper.rb
@@ -28,10 +28,8 @@ module ProjectsHelper | @@ -28,10 +28,8 @@ module ProjectsHelper | ||
28 | end | 28 | end |
29 | 29 | ||
30 | def tree_tab_class | 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 | end | 33 | end |
36 | 34 | ||
37 | def repository_tab_class | 35 | def repository_tab_class |
app/views/hooks/index.html.haml
1 | = render "repositories/head" | 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 | - unless @hooks.empty? | 2 | - unless @hooks.empty? |
8 | %div.update-data.ui-box.ui-box-small | 3 | %div.update-data.ui-box.ui-box-small |
9 | .data | 4 | .data |
@@ -19,7 +14,7 @@ | @@ -19,7 +14,7 @@ | ||
19 | %h3 No hooks | 14 | %h3 No hooks |
20 | 15 | ||
21 | .clear | 16 | .clear |
22 | -%h3 Help | 17 | +%hr |
23 | %p | 18 | %p |
24 | Post receive hooks. For now only POST request allowed. We send some data with request. Example below | 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,4 +15,13 @@ | ||
15 | %span | 15 | %span |
16 | Snippets | 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
1 | -- if can? current_user, :admin_team_member, @project | ||
2 | - %div#new-member-holder | ||
3 | - .right= link_to "Add new", new_project_team_member_path(@project), :remote => true, :class => "grey-button" | ||
4 | - .clear | ||
5 | - %br | ||
6 | %table.round-borders#team-table | 1 | %table.round-borders#team-table |
7 | %thead | 2 | %thead |
8 | %th Name | 3 | %th Name |
app/views/projects/_top_menu.html.haml
@@ -1,29 +0,0 @@ | @@ -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 | #tree-breadcrumbs | 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 | .clear | 10 | .clear |
12 | #tree-content-holder | 11 | #tree-content-holder |
13 | - if tree.is_blob? | 12 | - if tree.is_blob? |
app/views/repositories/_head.html.haml
@@ -15,5 +15,9 @@ | @@ -15,5 +15,9 @@ | ||
15 | %span | 15 | %span |
16 | Deploy Keys | 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 | = render "projects/project_head" | 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 | - unless @snippets.fresh.empty? | 3 | - unless @snippets.fresh.empty? |
6 | %div{ :class => "update-data ui-box ui-box-small ui-box-big" } | 4 | %div{ :class => "update-data ui-box ui-box-small ui-box-big" } |
spec/requests/team_members_spec.rb
@@ -22,7 +22,7 @@ describe "TeamMembers" do | @@ -22,7 +22,7 @@ describe "TeamMembers" do | ||
22 | before do | 22 | before do |
23 | @user_1 = Factory :user | 23 | @user_1 = Factory :user |
24 | visit team_project_path(@project) | 24 | visit team_project_path(@project) |
25 | - click_link "Add new" | 25 | + click_link "New Team Member" |
26 | end | 26 | end |
27 | 27 | ||
28 | it "should open new team member popup" do | 28 | it "should open new team member popup" do |