summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2016-12-16 09:46:24 -0600
committerAnnabel Dunstone Gray <annabel.dunstone@gmail.com>2016-12-17 13:22:19 -0600
commit2f87703cfff38a8c88f44310031c35dbe7f017ff (patch)
treece5195d18e2a3573c673f6ebc3b0e15ec7e1f9c2 /app/views
parent8c2297f00b96cafea2adf7918086b3ef5fd049fc (diff)
downloadgitlab-ce-2f87703cfff38a8c88f44310031c35dbe7f017ff.tar.gz
Move all project buttons to header
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/_home_panel.html.haml18
-rw-r--r--app/views/projects/buttons/_download.html.haml2
-rw-r--r--app/views/projects/buttons/_dropdown.html.haml2
-rw-r--r--app/views/projects/buttons/_koding.html.haml6
-rw-r--r--app/views/projects/show.html.haml13
-rw-r--r--app/views/shared/members/_access_request_buttons.html.haml2
-rw-r--r--app/views/shared/notifications/_button.html.haml2
7 files changed, 20 insertions, 25 deletions
diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml
index d13177f6776..b7e0c7f7128 100644
--- a/app/views/projects/_home_panel.html.haml
+++ b/app/views/projects/_home_panel.html.haml
@@ -18,14 +18,20 @@
= link_to project_path(forked_from_project) do
= forked_from_project.namespace.try(:name)
- .project-repo-buttons.project-action-buttons
+ .project-repo-buttons
.count-buttons
= render 'projects/buttons/star'
= render 'projects/buttons/fork'
- - if @project.feature_available?(:repository, current_user)
- .project-clone-holder
- = render "shared/clone_panel"
+ %span.hidden-xs
+ - if @project.feature_available?(:repository, current_user)
+ .project-clone-holder
+ = render "shared/clone_panel"
- - if current_user
- = render 'shared/members/access_request_buttons', source: @project
+ = render 'projects/buttons/download', project: @project, ref: @ref
+ = render 'projects/buttons/dropdown'
+ = render 'shared/notifications/button', notification_setting: @notification_setting
+
+ - if current_user
+ = render "projects/buttons/koding"
+ = render 'shared/members/access_request_buttons', source: @project
diff --git a/app/views/projects/buttons/_download.html.haml b/app/views/projects/buttons/_download.html.haml
index 40bfa01a45a..324a7f8cd3f 100644
--- a/app/views/projects/buttons/_download.html.haml
+++ b/app/views/projects/buttons/_download.html.haml
@@ -1,5 +1,5 @@
- if !project.empty_repo? && can?(current_user, :download_code, project)
- .dropdown.inline.download-button
+ .project-action-button.dropdown.inline
%button.btn{ 'data-toggle' => 'dropdown' }
= icon('download')
= icon("caret-down")
diff --git a/app/views/projects/buttons/_dropdown.html.haml b/app/views/projects/buttons/_dropdown.html.haml
index d3ccebbe290..f5659be25f0 100644
--- a/app/views/projects/buttons/_dropdown.html.haml
+++ b/app/views/projects/buttons/_dropdown.html.haml
@@ -1,5 +1,5 @@
- if current_user
- .dropdown.inline
+ .project-action-button.dropdown.inline
%a.btn.dropdown-toggle{href: '#', "data-toggle" => "dropdown"}
= icon('plus')
= icon("caret-down")
diff --git a/app/views/projects/buttons/_koding.html.haml b/app/views/projects/buttons/_koding.html.haml
index fdc80d44253..f8cad1605f6 100644
--- a/app/views/projects/buttons/_koding.html.haml
+++ b/app/views/projects/buttons/_koding.html.haml
@@ -1,7 +1,7 @@
- if koding_enabled? && current_user && can_push_branch?(@project, @project.default_branch)
- if @repository.koding_yml
- = link_to koding_project_url(@project), class: 'btn', target: '_blank' do
+ = link_to koding_project_url(@project), class: 'btn project-action-button inline', target: '_blank' do
Run in IDE (Koding)
- else
- = link_to add_koding_stack_path(@project), class: 'btn' do
- Set Up Koding
+ = link_to add_koding_stack_path(@project), class: 'btn project-action-button inline' do
+ Set up Koding
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index 20ea8600a40..5a60ea58a9e 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -64,19 +64,8 @@
- unless @repository.gitlab_ci_yml
%li.missing
= link_to add_special_file_path(@project, file_name: '.gitlab-ci.yml') do
- Set Up CI
+ Set up CI
- %li.project-repo-buttons.right
- .project-right-buttons
- - if current_user
- = render "projects/buttons/koding"
-
- .btn-group.project-repo-btn-group
- = render 'projects/buttons/download', project: @project, ref: @ref
- = render 'projects/buttons/dropdown'
-
- .pull-right
- = render 'shared/notifications/button', notification_setting: @notification_setting
- if @repository.commit
.project-last-commit{ class: container_class }
= render 'projects/last_commit', commit: @repository.commit, ref: current_ref, project: @project
diff --git a/app/views/shared/members/_access_request_buttons.html.haml b/app/views/shared/members/_access_request_buttons.html.haml
index e9b9ed554c1..fb795ad1c72 100644
--- a/app/views/shared/members/_access_request_buttons.html.haml
+++ b/app/views/shared/members/_access_request_buttons.html.haml
@@ -1,6 +1,6 @@
- model_name = source.model_name.to_s.downcase
-.access-button.inline.hidden-sm.hidden-xs
+.project-action-button.inline
- if can?(current_user, :"destroy_#{model_name}_member", source.members.find_by(user_id: current_user.id))
= link_to "Leave #{model_name}", polymorphic_path([:leave, source, :members]),
method: :delete,
diff --git a/app/views/shared/notifications/_button.html.haml b/app/views/shared/notifications/_button.html.haml
index fbad0d05de3..8e4fa5d48c3 100644
--- a/app/views/shared/notifications/_button.html.haml
+++ b/app/views/shared/notifications/_button.html.haml
@@ -1,5 +1,5 @@
- if notification_setting
- .dropdown.notification-dropdown
+ .project-action-button.dropdown.notification-dropdown.inline
= form_for notification_setting, remote: true, html: { class: "inline notification-form" } do |f|
= hidden_setting_source_input(notification_setting)
= f.hidden_field :level, class: "notification_setting_level"