Refactor project creation. Added logout link to profile page
This commit is contained in:
parent
c7c1a97c2f
commit
232d61d598
19 changed files with 126 additions and 116 deletions
|
@ -9,6 +9,6 @@
|
|||
|
||||
%hr
|
||||
.gitlab-promo
|
||||
= link_to "Homepage", "http://gitlabhq.com"
|
||||
= link_to "Blog", "http://blog.gitlabhq.com"
|
||||
= link_to "Homepage", "http://gitlab.org"
|
||||
= link_to "Blog", "http://blog.gitlab.org"
|
||||
= link_to "@gitlabhq", "https://twitter.com/gitlabhq"
|
||||
|
|
|
@ -6,6 +6,11 @@
|
|||
%small
|
||||
= @user.email
|
||||
|
||||
.right
|
||||
= link_to destroy_user_session_path, class: "logout", method: :delete do
|
||||
%small
|
||||
%i.icon-signout
|
||||
Logout
|
||||
%hr
|
||||
|
||||
= form_for @user, url: profile_path, method: :put, html: { class: "edit_user form-horizontal" } do |f|
|
||||
|
|
|
@ -9,20 +9,12 @@
|
|||
Project name is
|
||||
.input
|
||||
= f.text_field :name, placeholder: "Example Project", class: "xxlarge"
|
||||
%fieldset
|
||||
%legend Advanced settings:
|
||||
.control-group
|
||||
= f.label :path do
|
||||
Repository
|
||||
.controls
|
||||
= text_field_tag :ppath, @repository.path_to_repo, class: "xxlarge", readonly: true
|
||||
- unless @repository.heads.empty?
|
||||
.clearfix
|
||||
= f.label :default_branch, "Default Branch"
|
||||
.input= f.select(:default_branch, @repository.heads.map(&:name), {}, style: "width:210px;")
|
||||
|
||||
|
||||
- unless @repository.heads.empty?
|
||||
.clearfix
|
||||
= f.label :default_branch, "Default Branch"
|
||||
.input= f.select(:default_branch, @repository.heads.map(&:name), {}, style: "width:210px;")
|
||||
|
||||
%fieldset.features
|
||||
%legend Features:
|
||||
|
||||
|
@ -87,4 +79,4 @@
|
|||
- unless @project.new_record?
|
||||
- if can?(current_user, :remove_project, @project)
|
||||
.right
|
||||
= link_to 'Remove', @project, confirm: 'Removed project can not be restored! Are you sure?', method: :delete, class: "btn danger"
|
||||
= link_to 'Remove Project', @project, confirm: 'Removed project can not be restored! Are you sure?', method: :delete, class: "btn danger"
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
= f.text_field :name, placeholder: "Example Project", class: "xxlarge"
|
||||
= f.submit 'Create project', class: "btn success project-submit"
|
||||
|
||||
- if current_user.several_namespaces?
|
||||
- if current_user.can_select_namespace?
|
||||
.clearfix
|
||||
= f.label :namespace_id do
|
||||
%span.cgray Namespace
|
||||
%span Namespace
|
||||
.input
|
||||
= f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'chosen'}
|
||||
%hr
|
||||
|
|
|
@ -2,11 +2,9 @@
|
|||
:plain
|
||||
location.href = "#{project_path(@project)}";
|
||||
- else
|
||||
- if @project.git_error?
|
||||
location.href = "#{errors_githost_path}";
|
||||
-else
|
||||
:plain
|
||||
$('.project_new_holder').show();
|
||||
$("#new_project").replaceWith("#{escape_javascript(render('new_form'))}");
|
||||
$('.save-project-loader').hide();
|
||||
new Projects();
|
||||
$('select.chosen').chosen()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue