add ability to change namespace from project edit page
This commit is contained in:
parent
f997947664
commit
f37fa968b2
9 changed files with 64 additions and 26 deletions
|
@ -3,6 +3,11 @@
|
|||
Projects
|
||||
%small
|
||||
(#{projects.count})
|
||||
- if can? current_user, :manage_group, @group
|
||||
%span.right
|
||||
= link_to new_project_path(namespace_id: @group.id), class: "btn very_small info" do
|
||||
%i.icon-plus
|
||||
New Project
|
||||
%ul.unstyled
|
||||
- projects.each do |project|
|
||||
%li.wll
|
||||
|
|
|
@ -9,41 +9,45 @@
|
|||
Project name is
|
||||
.input
|
||||
= f.text_field :name, placeholder: "Example Project", class: "xxlarge"
|
||||
|
||||
%fieldset
|
||||
%legend Advanced settings:
|
||||
.clearfix
|
||||
.control-group
|
||||
= f.label :path do
|
||||
Path
|
||||
.input
|
||||
.input-prepend
|
||||
%strong
|
||||
= text_field_tag :ppath, @project.path_to_repo, class: "xlarge", disabled: true
|
||||
.controls
|
||||
= text_field_tag :ppath, @project.path_to_repo, class: "xlarge", disabled: true
|
||||
|
||||
- unless @project.new_record? || @project.heads.empty?
|
||||
.control-group
|
||||
= f.label :namespace_id do
|
||||
%span Namespace
|
||||
.controls
|
||||
= f.select :namespace_id, namespaces_options(@project.namespace_id), {}, {class: 'chosen'}
|
||||
|
||||
%span.cred Be careful. Changing project namespace can have unintended side effects
|
||||
|
||||
- unless @project.heads.empty?
|
||||
.clearfix
|
||||
= f.label :default_branch, "Default Branch"
|
||||
.input= f.select(:default_branch, @project.heads.map(&:name), {}, style: "width:210px;")
|
||||
|
||||
- unless @project.new_record?
|
||||
%fieldset
|
||||
%legend Features:
|
||||
%fieldset
|
||||
%legend Features:
|
||||
|
||||
.clearfix
|
||||
= f.label :issues_enabled, "Issues"
|
||||
.input= f.check_box :issues_enabled
|
||||
.clearfix
|
||||
= f.label :issues_enabled, "Issues"
|
||||
.input= f.check_box :issues_enabled
|
||||
|
||||
.clearfix
|
||||
= f.label :merge_requests_enabled, "Merge Requests"
|
||||
.input= f.check_box :merge_requests_enabled
|
||||
.clearfix
|
||||
= f.label :merge_requests_enabled, "Merge Requests"
|
||||
.input= f.check_box :merge_requests_enabled
|
||||
|
||||
.clearfix
|
||||
= f.label :wall_enabled, "Wall"
|
||||
.input= f.check_box :wall_enabled
|
||||
.clearfix
|
||||
= f.label :wall_enabled, "Wall"
|
||||
.input= f.check_box :wall_enabled
|
||||
|
||||
.clearfix
|
||||
= f.label :wiki_enabled, "Wiki"
|
||||
.input= f.check_box :wiki_enabled
|
||||
.clearfix
|
||||
= f.label :wiki_enabled, "Wiki"
|
||||
.input= f.check_box :wiki_enabled
|
||||
|
||||
%br
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
= f.label :namespace_id do
|
||||
%span.cgray Namespace
|
||||
.input
|
||||
= f.select :namespace_id, namespaces_options, {}, {class: 'chosen'}
|
||||
= f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'chosen'}
|
||||
%hr
|
||||
%p.padded
|
||||
All created project are private. You choose who can see project and commit to repository.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- if @project.valid?
|
||||
:plain
|
||||
location.href = "#{edit_project_path(@project, notice: 'Project was successfully updated.')}";
|
||||
location.href = "#{edit_project_path(@project)}";
|
||||
- else
|
||||
:plain
|
||||
$('.project_edit_holder').show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue