Commit 8beb7c88 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Different UI colors for archive project and remove project

Since remove is more danger in compare to archive it good to have them
in different colors
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent c2c43e6a
...@@ -104,6 +104,22 @@ ...@@ -104,6 +104,22 @@
} }
} }
&.btn-warning {
color: #ffffff;
background-color: $bg_warning;
border-color: $border_warning;
&.hover,
&:hover,
&.disabled,
&[disabled] {
color: #ffffff;
background-color: #e38c02;
border-color: #e38c02;
}
}
&.btn-new { &.btn-new {
@extend .btn-success; @extend .btn-success;
} }
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
.js-toggle-content.hide .js-toggle-content.hide
- if can? current_user, :archive_project, @project - if can? current_user, :archive_project, @project
.panel.panel-default.panel.panel-danger .panel.panel-default.panel.panel-warning
.panel-heading .panel-heading
- if @project.archived? - if @project.archived?
Unarchive project Unarchive project
...@@ -132,10 +132,29 @@ ...@@ -132,10 +132,29 @@
%strong Archived projects cannot be committed to! %strong Archived projects cannot be committed to!
= link_to 'Archive', archive_project_path(@project), = link_to 'Archive', archive_project_path(@project),
data: { confirm: "Are you sure that you want to archive this project?\nAn archived project cannot be committed to." }, data: { confirm: "Are you sure that you want to archive this project?\nAn archived project cannot be committed to." },
method: :post, class: "btn btn-remove" method: :post, class: "btn btn-warning"
- else - else
.nothing-here-block Only the project owner can archive a project .nothing-here-block Only the project owner can archive a project
.panel.panel-default.panel.panel-warning
.panel-heading Rename repository
.errors-holder
.panel-body
= form_for(@project, html: { class: 'form-horizontal' }) do |f|
.form-group
= f.label :path, class: 'control-label' do
%span Path
.col-sm-9
.form-group
.input-group
= f.text_field :path, class: 'form-control'
%span.input-group-addon .git
%ul
%li Be careful. Renaming a project's repository can have unintended side effects.
%li You will need to update your local repositories to point to the new location.
.form-actions
= f.submit 'Rename', class: "btn btn-warning"
- if can?(current_user, :change_namespace, @project) - if can?(current_user, :change_namespace, @project)
.panel.panel-default.panel.panel-danger .panel.panel-default.panel.panel-danger
.panel-heading Transfer project .panel-heading Transfer project
...@@ -157,25 +176,6 @@ ...@@ -157,25 +176,6 @@
- else - else
.nothing-here-block Only the project owner can transfer a project .nothing-here-block Only the project owner can transfer a project
.panel.panel-default.panel.panel-danger
.panel-heading Rename repository
.errors-holder
.panel-body
= form_for(@project, html: { class: 'form-horizontal' }) do |f|
.form-group
= f.label :path, class: 'control-label' do
%span Path
.col-sm-9
.form-group
.input-group
= f.text_field :path, class: 'form-control'
%span.input-group-addon .git
%ul
%li Be careful. Renaming a project's repository can have unintended side effects.
%li You will need to update your local repositories to point to the new location.
.form-actions
= f.submit 'Rename', class: "btn btn-remove"
- if can?(current_user, :remove_project, @project) - if can?(current_user, :remove_project, @project)
.panel.panel-default.panel.panel-danger .panel.panel-default.panel.panel-danger
.panel-heading Remove project .panel-heading Remove project
......
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