Commit 44209861 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Allow group path renaming. Dont show project transfer if no permissions. More danger messages :)

parent a8fbda94
......@@ -100,6 +100,12 @@ input[type='search'].search-text-input {
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; }
/** PAGINATION **/
......
%h3.page_title Rename Group
%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|
- if @group.errors.any?
.alert-message.block-message.error
......@@ -14,6 +10,19 @@
.input
= 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
= 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"
......@@ -33,12 +33,17 @@
= link_to "#", class: "btn btn-small change-owner-link" do
%i.icon-edit
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|
= f.select :owner_id, User.all.map { |user| [user.name, user.id] }, {}, {class: 'chosen'}
= f.submit 'Save', class: "btn btn-small save-btn"
= link_to "Cancel", "#", class: "btn btn-small change-owner-cancel-link"
%div
= f.submit 'Change Owner', class: "btn danger"
= link_to "Cancel", "#", class: "btn change-owner-cancel-link"
%fieldset
%legend Projects (#{@group.projects.count})
%table
......
......@@ -17,19 +17,6 @@
.controls
= 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?
.clearfix
......@@ -63,6 +50,22 @@
= f.check_box :wiki_enabled
%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
.actions
......
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