diff options
author | randx <dmitriy.zaporozhets@gmail.com> | 2012-07-28 00:42:44 +0300 |
---|---|---|
committer | randx <dmitriy.zaporozhets@gmail.com> | 2012-07-28 00:42:44 +0300 |
commit | 69e41250d1b1eea609ae63f2702d5888396cba9a (patch) | |
tree | dae91d9751e7a219cc09735c8741d4bb7cdf4524 /app | |
parent | 217810433b332a55b9620fcfe016735f33f8637d (diff) | |
download | gitlab-ce-69e41250d1b1eea609ae63f2702d5888396cba9a.tar.gz |
Styled New/Edit Project for admin area
Diffstat (limited to 'app')
-rw-r--r-- | app/views/admin/projects/_form.html.haml | 83 | ||||
-rw-r--r-- | app/views/admin/projects/edit.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/projects/new.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/projects/show.html.haml | 4 |
4 files changed, 52 insertions, 43 deletions
diff --git a/app/views/admin/projects/_form.html.haml b/app/views/admin/projects/_form.html.haml index 41c620a0218..4217defb82b 100644 --- a/app/views/admin/projects/_form.html.haml +++ b/app/views/admin/projects/_form.html.haml @@ -1,40 +1,49 @@ -= form_for [:admin, @admin_project] do |f| - -if @admin_project.errors.any? += form_for [:admin, project] do |f| + -if project.errors.any? .alert-message.block-message.error %ul - - @admin_project.errors.full_messages.each do |msg| + - project.errors.full_messages.each do |msg| %li= msg - .clearfix - = f.label :name - .input= f.text_field :name - .clearfix - = f.label :path do - Path + .clearfix.project_name_holder + = f.label :name do + Project name is .input - .input-prepend - %span.add-on= Gitlab.config.ssh_path - = f.text_field :path, :placeholder => "example_project", :disabled => !@admin_project.new_record? - .clearfix - = f.label :code do - Code - .input - .input-prepend - %span.add-on= web_app_url - = f.text_field :code, :placeholder => "example" + = f.text_field :name, :placeholder => "Example Project", :class => "xxlarge" + = f.submit project.new_record? ? 'Create project' : 'Save Project', :class => "btn primary" - - unless @admin_project.new_record? + %hr + .alert.alert-info + %h5 Advanced settings: + .clearfix + = f.label :path do + Git Clone + .input + .input-prepend + %span.add-on= Gitlab.config.ssh_path + = f.text_field :path, :placeholder => "example_project", :disabled => !!project.id + %span.add-on= ".git" .clearfix - = f.label :owner_id - .input= f.select :owner_id, User.all.map { |user| [user.name, user.id] } + = f.label :code do + URL + .input + .input-prepend + %span.add-on= web_app_url + = f.text_field :code, :placeholder => "example" - - if @admin_project.repo_exists? + - unless project.new_record? .clearfix - = f.label :default_branch, "Default Branch" - .input= f.select(:default_branch, @admin_project.heads.map(&:name), {}, :style => "width:210px;") + = f.label :owner_id + .input= f.select :owner_id, User.all.map { |user| [user.name, user.id] } - .well - %h5 Features + - if project.repo_exists? + .clearfix + = f.label :default_branch, "Default Branch" + .input= f.select(:default_branch, project.heads.map(&:name), {}, :style => "width:210px;") + + - unless project.new_record? + .alert.alert-info + %h5 Features: .clearfix = f.label :issues_enabled, "Issues" @@ -48,19 +57,19 @@ = f.label :wall_enabled, "Wall" .input= f.check_box :wall_enabled - .clearfix - = f.label :description - .input= f.text_area :description, :class => "xxlarge" - .clear - %br - .actions - = f.submit 'Save', :class => "btn primary" - = link_to 'Cancel', [:admin, @admin_project], :class => "btn" - - unless @admin_project.new_record? - = link_to 'Destroy', [:admin, @admin_project], :confirm => 'Are you sure?', :method => :delete, :class => "btn danger right" + .clearfix + = f.label :wiki_enabled, "Wiki" + .input= f.check_box :wiki_enabled + + - unless project.new_record? + .actions + = f.submit 'Save Project', :class => "btn primary" + + :javascript $(function(){ $('#project_owner_id').chosen(); new Projects(); }) + diff --git a/app/views/admin/projects/edit.html.haml b/app/views/admin/projects/edit.html.haml index b8d6f6899cb..826615f3455 100644 --- a/app/views/admin/projects/edit.html.haml +++ b/app/views/admin/projects/edit.html.haml @@ -1,3 +1,3 @@ -%h3= @admin_project.name +%h3.page_title #{@admin_project.name} → Edit project %hr -= render 'form' += render 'form', :project => @admin_project diff --git a/app/views/admin/projects/new.html.haml b/app/views/admin/projects/new.html.haml index 1e1c7aac46e..eadb1f88daa 100644 --- a/app/views/admin/projects/new.html.haml +++ b/app/views/admin/projects/new.html.haml @@ -1,3 +1,3 @@ -%h2 New project +%h3.page_title New project %hr -= render 'form' += render 'form', :project => @admin_project diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index 8ba2943e7f9..4898d32ea43 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -25,9 +25,9 @@ %tr %td %b - Description: + Owner: %td - = @admin_project.description + = @admin_project.owner.name %tr %td %b |