Commit 3fa6ed8eb2b0f0b7e63bc5ac3d3b893fb827d0f6
Exists in
master
and in
4 other branches
Merge branch 'master' into stable
Showing
25 changed files
with
177 additions
and
31 deletions
Show diff stats
CHANGELOG
VERSION
app/assets/stylesheets/gitlab_bootstrap/buttons.scss
| ... | ... | @@ -24,6 +24,22 @@ |
| 24 | 24 | } |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | + &.btn-info { | |
| 28 | + background:#5aB9C3; | |
| 29 | + border-color: $blue_link; | |
| 30 | + color:#fff; | |
| 31 | + text-shadow: 0 1px 1px #268; | |
| 32 | + &:hover { | |
| 33 | + background:$blue_link; | |
| 34 | + color:#fff; | |
| 35 | + } | |
| 36 | + | |
| 37 | + &.disabled { | |
| 38 | + color:#fff; | |
| 39 | + background:#29B; | |
| 40 | + } | |
| 41 | + } | |
| 42 | + | |
| 27 | 43 | &.success { |
| 28 | 44 | @extend .btn-success; |
| 29 | 45 | ... | ... |
app/assets/stylesheets/gitlab_bootstrap/tables.scss
| ... | ... | @@ -5,6 +5,12 @@ table { |
| 5 | 5 | border:1px solid #bbb; |
| 6 | 6 | width:100%; |
| 7 | 7 | |
| 8 | + &.low { | |
| 9 | + td { | |
| 10 | + line-height:18px; | |
| 11 | + } | |
| 12 | + } | |
| 13 | + | |
| 8 | 14 | th { |
| 9 | 15 | font-weight: bold; |
| 10 | 16 | vertical-align: middle; |
| ... | ... | @@ -26,6 +32,8 @@ table { |
| 26 | 32 | |
| 27 | 33 | td { |
| 28 | 34 | border-color:#f1f1f1; |
| 35 | + line-height:28px; | |
| 36 | + | |
| 29 | 37 | &:first-child { |
| 30 | 38 | border-left:1px solid #bbb; |
| 31 | 39 | } | ... | ... |
app/assets/stylesheets/sections/commits.scss
app/assets/stylesheets/sections/events.scss
| ... | ... | @@ -97,14 +97,21 @@ |
| 97 | 97 | * |
| 98 | 98 | */ |
| 99 | 99 | .event_lp { |
| 100 | - @extend .ui-box; | |
| 101 | 100 | color:#777; |
| 102 | - margin-bottom:20px; | |
| 103 | - padding:8px; | |
| 104 | - @include border-radius(4px); | |
| 101 | + padding:10px; | |
| 105 | 102 | min-height:22px; |
| 103 | + border-left: 5px solid #5AB9C3; | |
| 104 | + margin-bottom:20px; | |
| 105 | + background:#f9f9f9; | |
| 106 | 106 | |
| 107 | 107 | .avatar { |
| 108 | 108 | width:24px; |
| 109 | 109 | } |
| 110 | + | |
| 111 | + .btn-new-mr { | |
| 112 | + @extend .btn-info; | |
| 113 | + @extend .small; | |
| 114 | + @extend .right; | |
| 115 | + margin: -3px; | |
| 116 | + } | |
| 110 | 117 | } | ... | ... |
app/assets/stylesheets/sections/tree.scss
app/controllers/admin/groups_controller.rb
| ... | ... | @@ -64,7 +64,7 @@ class Admin::GroupsController < AdminController |
| 64 | 64 | def destroy |
| 65 | 65 | @group.destroy |
| 66 | 66 | |
| 67 | - redirect_to groups_url, notice: 'Group was successfully deleted.' | |
| 67 | + redirect_to admin_groups_path, notice: 'Group was successfully deleted.' | |
| 68 | 68 | end |
| 69 | 69 | |
| 70 | 70 | private | ... | ... |
app/roles/repository.rb
app/views/admin/groups/index.html.haml
| 1 | 1 | = render 'admin/shared/projects_head' |
| 2 | 2 | %h3.page_title |
| 3 | 3 | Groups |
| 4 | + %small | |
| 5 | + allows you to keep projects organized. | |
| 6 | + Use groups for uniting related projects. | |
| 7 | + | |
| 4 | 8 | = link_to 'New Group', new_admin_group_path, class: "btn small right" |
| 5 | 9 | %br |
| 6 | 10 | = form_tag admin_groups_path, method: :get, class: 'form-inline' do | ... | ... |
app/views/admin/projects/show.html.haml
app/views/dashboard/index.html.haml
| 1 | 1 | - if @projects.any? |
| 2 | 2 | .projects |
| 3 | 3 | .activities.span8 |
| 4 | + = render "events/event_last_push", event: @last_push | |
| 4 | 5 | = render 'shared/no_ssh' |
| 5 | 6 | - if @events.any? |
| 6 | 7 | .content_list= render @events |
| ... | ... | @@ -8,7 +9,6 @@ |
| 8 | 9 | %h4.nothing_here_message Projects activity will be displayed here |
| 9 | 10 | .loading.hide |
| 10 | 11 | .side |
| 11 | - = render "events/event_last_push", event: @last_push | |
| 12 | 12 | - if @groups.present? |
| 13 | 13 | = render "groups", groups: @groups |
| 14 | 14 | = render "projects", projects: @projects | ... | ... |
app/views/events/_event_last_push.html.haml
| 1 | 1 | - if show_last_push_widget?(event) |
| 2 | 2 | .event_lp |
| 3 | - %div | |
| 4 | - = image_tag gravatar_icon(event.author_email), class: "avatar" | |
| 5 | - %span You pushed to | |
| 6 | - = event.ref_type | |
| 7 | - = link_to project_commits_path(event.project, event.ref_name) do | |
| 8 | - %strong= truncate(event.ref_name, length: 28) | |
| 9 | - at | |
| 10 | - %strong= link_to event.project.name, event.project | |
| 3 | + = image_tag "event_push.png" | |
| 4 | + | |
| 5 | + %span You pushed to | |
| 6 | + = link_to project_commits_path(event.project, event.ref_name) do | |
| 7 | + %strong= truncate(event.ref_name, length: 28) | |
| 8 | + at | |
| 9 | + %strong= link_to event.project.name, event.project | |
| 10 | + %span | |
| 11 | + = time_ago_in_words(event.created_at) | |
| 12 | + ago. | |
| 11 | 13 | |
| 12 | - = link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn very_small" do | |
| 13 | - Create Merge Request | |
| 14 | + = link_to new_mr_path_from_push_event(event), title: "New Merge Request", class: "btn btn-new-mr" do | |
| 15 | + Create Merge Request | ... | ... |
app/views/groups/show.html.haml
| 1 | 1 | .projects |
| 2 | 2 | .activities.span8 |
| 3 | + = render "events/event_last_push", event: @last_push | |
| 3 | 4 | = link_to dashboard_path, class: 'btn very_small' do |
| 4 | 5 | ← To dashboard |
| 5 | 6 | |
| ... | ... | @@ -12,7 +13,6 @@ |
| 12 | 13 | %h4.nothing_here_message Projects activity will be displayed here |
| 13 | 14 | .loading.hide |
| 14 | 15 | .side |
| 15 | - = render "events/event_last_push", event: @last_push | |
| 16 | 16 | = render "projects", projects: @projects |
| 17 | 17 | %div |
| 18 | 18 | %span.rss-icon | ... | ... |
app/views/keys/_show.html.haml
app/views/projects/files.html.haml
| ... | ... | @@ -4,14 +4,13 @@ |
| 4 | 4 | %thead |
| 5 | 5 | %tr |
| 6 | 6 | %th File name |
| 7 | - %th | |
| 7 | + %th | |
| 8 | 8 | |
| 9 | 9 | - @notes.each do |note| |
| 10 | 10 | %tr |
| 11 | 11 | %td |
| 12 | 12 | %a{href: note.attachment.url} |
| 13 | - = image_tag gravatar_icon(note.author_email), class: "left", width: 16 | |
| 14 | - | |
| 13 | + = image_tag gravatar_icon(note.author_email), class: "avatar s24" | |
| 15 | 14 | = note.attachment_identifier |
| 16 | 15 | %td |
| 17 | 16 | Added | ... | ... |
app/views/team_members/_team.html.haml
db/schema.rb
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | # |
| 12 | 12 | # It's strongly recommended to check this file into your version control system. |
| 13 | 13 | |
| 14 | -ActiveRecord::Schema.define(:version => 20121002151033) do | |
| 14 | +ActiveRecord::Schema.define(:version => 20121009205010) do | |
| 15 | 15 | |
| 16 | 16 | create_table "events", :force => true do |t| |
| 17 | 17 | t.string "target_type" | ... | ... |
doc/installation.md
| ... | ... | @@ -157,6 +157,10 @@ Add your user to the `git` group: |
| 157 | 157 | |
| 158 | 158 | sudo usermod -a -G git gitlab |
| 159 | 159 | |
| 160 | +Add `git` user to `gitlab` group: | |
| 161 | + | |
| 162 | + sudo usermod -a -G gitlab git | |
| 163 | + | |
| 160 | 164 | Generate key: |
| 161 | 165 | |
| 162 | 166 | sudo -H -u gitlab ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa | ... | ... |
| ... | ... | @@ -0,0 +1,10 @@ |
| 1 | +Feature: Admin Groups | |
| 2 | + Background: | |
| 3 | + Given I sign in as an admin | |
| 4 | + And I visit admin groups page | |
| 5 | + | |
| 6 | + Scenario: Create a group | |
| 7 | + When I click new group link | |
| 8 | + And submit form with new group info | |
| 9 | + Then I should be redirected to group page | |
| 10 | + And I should see newly created group | ... | ... |
features/group/group.feature
| ... | ... | @@ -7,3 +7,13 @@ Feature: Groups |
| 7 | 7 | When I visit group page |
| 8 | 8 | Then I should see projects list |
| 9 | 9 | And I should see projects activity feed |
| 10 | + | |
| 11 | + Scenario: I should see group issues list | |
| 12 | + Given project from group has issues assigned to me | |
| 13 | + When I visit group issues page | |
| 14 | + Then I should see issues from this group assigned to me | |
| 15 | + | |
| 16 | + Scenario: I should see group merge requests list | |
| 17 | + Given project from group has merge requests assigned to me | |
| 18 | + When I visit group merge requests page | |
| 19 | + Then I should see merge requests from this group assigned to me | ... | ... |
| ... | ... | @@ -0,0 +1,24 @@ |
| 1 | +class AdminGroups < Spinach::FeatureSteps | |
| 2 | + include SharedAuthentication | |
| 3 | + include SharedPaths | |
| 4 | + include SharedActiveTab | |
| 5 | + | |
| 6 | + When 'I click new group link' do | |
| 7 | + click_link "New Group" | |
| 8 | + end | |
| 9 | + | |
| 10 | + And 'submit form with new group info' do | |
| 11 | + fill_in 'group_name', :with => 'gitlab' | |
| 12 | + fill_in 'group_code', :with => 'gitlab' | |
| 13 | + click_button "Save group" | |
| 14 | + end | |
| 15 | + | |
| 16 | + Then 'I should see newly created group' do | |
| 17 | + page.should have_content "Group: gitlab" | |
| 18 | + end | |
| 19 | + | |
| 20 | + Then 'I should be redirected to group page' do | |
| 21 | + current_path.should == admin_group_path(Group.last) | |
| 22 | + end | |
| 23 | +end | |
| 24 | + | ... | ... |
features/steps/dashboard/dashboard.rb
| ... | ... | @@ -16,7 +16,7 @@ class Dashboard < Spinach::FeatureSteps |
| 16 | 16 | end |
| 17 | 17 | |
| 18 | 18 | Then 'I should see last push widget' do |
| 19 | - page.should have_content "You pushed to branch new_design" | |
| 19 | + page.should have_content "You pushed to new_design" | |
| 20 | 20 | page.should have_link "Create Merge Request" |
| 21 | 21 | end |
| 22 | 22 | ... | ... |
features/steps/group/group.rb
| ... | ... | @@ -2,10 +2,6 @@ class Groups < Spinach::FeatureSteps |
| 2 | 2 | include SharedAuthentication |
| 3 | 3 | include SharedPaths |
| 4 | 4 | |
| 5 | - When 'I visit group page' do | |
| 6 | - visit group_path(current_group) | |
| 7 | - end | |
| 8 | - | |
| 9 | 5 | Then 'I should see projects list' do |
| 10 | 6 | current_user.projects.each do |project| |
| 11 | 7 | page.should have_link project.name |
| ... | ... | @@ -24,9 +20,43 @@ class Groups < Spinach::FeatureSteps |
| 24 | 20 | page.should have_content 'closed issue' |
| 25 | 21 | end |
| 26 | 22 | |
| 23 | + Then 'I should see issues from this group assigned to me' do | |
| 24 | + assigned_to_me(:issues).each do |issue| | |
| 25 | + page.should have_content issue.title | |
| 26 | + end | |
| 27 | + end | |
| 28 | + | |
| 29 | + Then 'I should see merge requests from this group assigned to me' do | |
| 30 | + assigned_to_me(:merge_requests).each do |issue| | |
| 31 | + page.should have_content issue.title | |
| 32 | + end | |
| 33 | + end | |
| 34 | + | |
| 35 | + Given 'project from group has issues assigned to me' do | |
| 36 | + create :issue, | |
| 37 | + project: project, | |
| 38 | + assignee: current_user, | |
| 39 | + author: current_user | |
| 40 | + end | |
| 41 | + | |
| 42 | + Given 'project from group has merge requests assigned to me' do | |
| 43 | + create :merge_request, | |
| 44 | + project: project, | |
| 45 | + assignee: current_user, | |
| 46 | + author: current_user | |
| 47 | + end | |
| 48 | + | |
| 27 | 49 | protected |
| 28 | 50 | |
| 29 | 51 | def current_group |
| 30 | 52 | @group ||= Group.first |
| 31 | 53 | end |
| 54 | + | |
| 55 | + def project | |
| 56 | + current_group.projects.first | |
| 57 | + end | |
| 58 | + | |
| 59 | + def assigned_to_me key | |
| 60 | + project.send(key).where(assignee_id: current_user.id) | |
| 61 | + end | |
| 32 | 62 | end | ... | ... |
features/steps/shared/paths.rb
| ... | ... | @@ -6,6 +6,22 @@ module SharedPaths |
| 6 | 6 | end |
| 7 | 7 | |
| 8 | 8 | # ---------------------------------------- |
| 9 | + # Group | |
| 10 | + # ---------------------------------------- | |
| 11 | + | |
| 12 | + When 'I visit group page' do | |
| 13 | + visit group_path(current_group) | |
| 14 | + end | |
| 15 | + | |
| 16 | + When 'I visit group issues page' do | |
| 17 | + visit issues_group_path(current_group) | |
| 18 | + end | |
| 19 | + | |
| 20 | + When 'I visit group merge requests page' do | |
| 21 | + visit merge_requests_group_path(current_group) | |
| 22 | + end | |
| 23 | + | |
| 24 | + # ---------------------------------------- | |
| 9 | 25 | # Dashboard |
| 10 | 26 | # ---------------------------------------- |
| 11 | 27 | |
| ... | ... | @@ -85,6 +101,10 @@ module SharedPaths |
| 85 | 101 | visit admin_resque_path |
| 86 | 102 | end |
| 87 | 103 | |
| 104 | + And 'I visit admin groups page' do | |
| 105 | + visit admin_groups_path | |
| 106 | + end | |
| 107 | + | |
| 88 | 108 | # ---------------------------------------- |
| 89 | 109 | # Generic Project |
| 90 | 110 | # ---------------------------------------- | ... | ... |