Commit 2f87703c authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Move all project buttons to header

parent 8c2297f0
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
} }
// Display Star and Fork buttons without counters on mobile. // Display Star and Fork buttons without counters on mobile.
.project-action-buttons { .project-repo-buttons {
display: block; display: block;
.count-buttons .btn { .count-buttons .btn {
......
...@@ -143,10 +143,12 @@ ...@@ -143,10 +143,12 @@
margin-top: 0; margin-top: 0;
} }
.project-repo-buttons,
.group-buttons { .group-buttons {
margin-top: 15px; margin-top: 15px;
}
.project-repo-buttons,
.group-buttons {
.btn { .btn {
@include btn-gray; @include btn-gray;
padding: 3px 10px; padding: 3px 10px;
...@@ -175,12 +177,8 @@ ...@@ -175,12 +177,8 @@
} }
} }
.download-button, .project-action-button {
.dropdown-toggle, margin: 15px 5px 0 5px;
.notification-dropdown,
.project-dropdown,
.access-button {
margin-left: 10px;
vertical-align: top; vertical-align: top;
} }
...@@ -197,10 +195,12 @@ ...@@ -197,10 +195,12 @@
.count-buttons { .count-buttons {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
margin-top: 15px;
} }
.project-clone-holder { .project-clone-holder {
display: inline-block; display: inline-block;
margin: 15px 5px 0 0;
input { input {
height: 28px; height: 28px;
...@@ -494,6 +494,7 @@ a.deploy-project-label { ...@@ -494,6 +494,7 @@ a.deploy-project-label {
.project-stats { .project-stats {
font-size: 0; font-size: 0;
text-align: center;
border-bottom: 1px solid $border-color; border-bottom: 1px solid $border-color;
.nav { .nav {
......
...@@ -18,14 +18,20 @@ ...@@ -18,14 +18,20 @@
= link_to project_path(forked_from_project) do = link_to project_path(forked_from_project) do
= forked_from_project.namespace.try(:name) = forked_from_project.namespace.try(:name)
.project-repo-buttons.project-action-buttons .project-repo-buttons
.count-buttons .count-buttons
= render 'projects/buttons/star' = render 'projects/buttons/star'
= render 'projects/buttons/fork' = render 'projects/buttons/fork'
%span.hidden-xs
- if @project.feature_available?(:repository, current_user) - if @project.feature_available?(:repository, current_user)
.project-clone-holder .project-clone-holder
= render "shared/clone_panel" = render "shared/clone_panel"
= render 'projects/buttons/download', project: @project, ref: @ref
= render 'projects/buttons/dropdown'
= render 'shared/notifications/button', notification_setting: @notification_setting
- if current_user - if current_user
= render "projects/buttons/koding"
= render 'shared/members/access_request_buttons', source: @project = render 'shared/members/access_request_buttons', source: @project
- if !project.empty_repo? && can?(current_user, :download_code, project) - if !project.empty_repo? && can?(current_user, :download_code, project)
.dropdown.inline.download-button .project-action-button.dropdown.inline
%button.btn{ 'data-toggle' => 'dropdown' } %button.btn{ 'data-toggle' => 'dropdown' }
= icon('download') = icon('download')
= icon("caret-down") = icon("caret-down")
......
- if current_user - if current_user
.dropdown.inline .project-action-button.dropdown.inline
%a.btn.dropdown-toggle{href: '#', "data-toggle" => "dropdown"} %a.btn.dropdown-toggle{href: '#', "data-toggle" => "dropdown"}
= icon('plus') = icon('plus')
= icon("caret-down") = icon("caret-down")
......
- if koding_enabled? && current_user && can_push_branch?(@project, @project.default_branch) - if koding_enabled? && current_user && can_push_branch?(@project, @project.default_branch)
- if @repository.koding_yml - 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) Run in IDE (Koding)
- else - else
= link_to add_koding_stack_path(@project), class: 'btn' do = link_to add_koding_stack_path(@project), class: 'btn project-action-button inline' do
Set Up Koding Set up Koding
...@@ -64,19 +64,8 @@ ...@@ -64,19 +64,8 @@
- unless @repository.gitlab_ci_yml - unless @repository.gitlab_ci_yml
%li.missing %li.missing
= link_to add_special_file_path(@project, file_name: '.gitlab-ci.yml') do = 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 - if @repository.commit
.project-last-commit{ class: container_class } .project-last-commit{ class: container_class }
= render 'projects/last_commit', commit: @repository.commit, ref: current_ref, project: @project = render 'projects/last_commit', commit: @repository.commit, ref: current_ref, project: @project
......
- model_name = source.model_name.to_s.downcase - 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)) - 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]), = link_to "Leave #{model_name}", polymorphic_path([:leave, source, :members]),
method: :delete, method: :delete,
......
- if notification_setting - 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| = form_for notification_setting, remote: true, html: { class: "inline notification-form" } do |f|
= hidden_setting_source_input(notification_setting) = hidden_setting_source_input(notification_setting)
= f.hidden_field :level, class: "notification_setting_level" = f.hidden_field :level, class: "notification_setting_level"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment