Allow group path renaming. Dont show project transfer if no permissions. More danger messages :)
This commit is contained in:
parent
a8fbda945e
commit
44209861e8
4 changed files with 46 additions and 23 deletions
|
@ -100,6 +100,12 @@ input[type='search'].search-text-input {
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type='text'].danger {
|
||||||
|
background: #F2DEDE!important;
|
||||||
|
border-color: #D66;
|
||||||
|
text-shadow: 0 1px 1px #fff
|
||||||
|
}
|
||||||
|
|
||||||
fieldset legend { font-size: 17px; }
|
fieldset legend { font-size: 17px; }
|
||||||
|
|
||||||
/** PAGINATION **/
|
/** PAGINATION **/
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
%h3.page_title Rename Group
|
%h3.page_title Rename Group
|
||||||
%hr
|
%hr
|
||||||
.alert
|
|
||||||
Renaming group can have unintended side effects.
|
|
||||||
%br
|
|
||||||
Renaming group will rename directory for all related projects
|
|
||||||
= form_for [:admin, @group] do |f|
|
= form_for [:admin, @group] do |f|
|
||||||
- if @group.errors.any?
|
- if @group.errors.any?
|
||||||
.alert-message.block-message.error
|
.alert-message.block-message.error
|
||||||
|
@ -14,6 +10,19 @@
|
||||||
.input
|
.input
|
||||||
= f.text_field :name, placeholder: "Example Group", class: "xxlarge"
|
= f.text_field :name, placeholder: "Example Group", class: "xxlarge"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.clearfix.group_name_holder
|
||||||
|
= f.label :path do
|
||||||
|
%span.cred Group path is
|
||||||
|
.input
|
||||||
|
= f.text_field :path, placeholder: "example-group", class: "xxlarge danger"
|
||||||
|
%ul.cred
|
||||||
|
%li Changing group path can have unintended side effects.
|
||||||
|
%li Renaming group path will rename directory for all related projects
|
||||||
|
%li It will change web url for access group and group projects.
|
||||||
|
%li It will change the git path to repositories under this group.
|
||||||
|
|
||||||
.form-actions
|
.form-actions
|
||||||
= f.submit 'Rename group', class: "btn save-btn"
|
= f.submit 'Rename group', class: "btn danger"
|
||||||
= link_to 'Cancel', admin_groups_path, class: "btn cancel-btn"
|
= link_to 'Cancel', admin_groups_path, class: "btn cancel-btn"
|
||||||
|
|
|
@ -33,12 +33,17 @@
|
||||||
= link_to "#", class: "btn btn-small change-owner-link" do
|
= link_to "#", class: "btn btn-small change-owner-link" do
|
||||||
%i.icon-edit
|
%i.icon-edit
|
||||||
Change owner
|
Change owner
|
||||||
.change-owner-holder.hide
|
|
||||||
|
%tr.change-owner-holder.hide
|
||||||
|
%td.bgred
|
||||||
|
%b.cred
|
||||||
|
New Owner:
|
||||||
|
%td.bgred
|
||||||
= form_for [:admin, @group] do |f|
|
= form_for [:admin, @group] do |f|
|
||||||
= f.select :owner_id, User.all.map { |user| [user.name, user.id] }, {}, {class: 'chosen'}
|
= f.select :owner_id, User.all.map { |user| [user.name, user.id] }, {}, {class: 'chosen'}
|
||||||
= f.submit 'Save', class: "btn btn-small save-btn"
|
%div
|
||||||
= link_to "Cancel", "#", class: "btn btn-small change-owner-cancel-link"
|
= f.submit 'Change Owner', class: "btn danger"
|
||||||
|
= link_to "Cancel", "#", class: "btn change-owner-cancel-link"
|
||||||
%fieldset
|
%fieldset
|
||||||
%legend Projects (#{@group.projects.count})
|
%legend Projects (#{@group.projects.count})
|
||||||
%table
|
%table
|
||||||
|
|
|
@ -17,19 +17,6 @@
|
||||||
.controls
|
.controls
|
||||||
= text_field_tag :ppath, @project.path_to_repo, class: "xxlarge", readonly: true
|
= text_field_tag :ppath, @project.path_to_repo, class: "xxlarge", readonly: true
|
||||||
|
|
||||||
.control-group
|
|
||||||
= f.label :namespace_id do
|
|
||||||
%span Namespace
|
|
||||||
.controls
|
|
||||||
- if can? current_user, :change_namespace, @project
|
|
||||||
= f.select :namespace_id, namespaces_options(@project.namespace_id || Namespace::global_id), {prompt: 'Choose a project namespace'}, {class: 'chosen'}
|
|
||||||
|
|
||||||
%span.cred Be careful. Changing project namespace can have unintended side effects
|
|
||||||
- else
|
|
||||||
%a.btn.disabled= @project.namespace.try(:human_name) || "/"
|
|
||||||
|
|
||||||
%span.cred Only owner can change project namespace.
|
|
||||||
|
|
||||||
|
|
||||||
- unless @project.heads.empty?
|
- unless @project.heads.empty?
|
||||||
.clearfix
|
.clearfix
|
||||||
|
@ -63,6 +50,22 @@
|
||||||
= f.check_box :wiki_enabled
|
= f.check_box :wiki_enabled
|
||||||
%span.descr Pages for project documentation
|
%span.descr Pages for project documentation
|
||||||
|
|
||||||
|
|
||||||
|
- if can? current_user, :change_namespace, @project
|
||||||
|
%fieldset.features
|
||||||
|
%legend Transfer:
|
||||||
|
.control-group
|
||||||
|
= f.label :namespace_id do
|
||||||
|
%span Namespace
|
||||||
|
.controls
|
||||||
|
= f.select :namespace_id, namespaces_options(@project.namespace_id || Namespace::global_id), {prompt: 'Choose a project namespace'}, {class: 'chosen'}
|
||||||
|
%br
|
||||||
|
%ul.prepend-top-10.cred
|
||||||
|
%li Be careful. Changing project namespace can have unintended side effects
|
||||||
|
%li You can transfer project only to namespaces you can manage
|
||||||
|
%li You will need to update your local repositories to point to the new location.
|
||||||
|
|
||||||
|
|
||||||
%br
|
%br
|
||||||
|
|
||||||
.actions
|
.actions
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue