Commit 083990c7 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Minor UI improvements

parent 0175e665
.snippet.file-holder { .snippet.file-holder {
.file-title { .file-title {
.snippet-file-name { .snippet-file-name {
padding: 4px 10px;
position: relative; position: relative;
top: -4px; top: -4px;
left: -4px; left: -4px;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
New Merge Request New Merge Request
%h3.page-title %h3.page-title
Merge Requests Merge Requests
%span (#{@merge_requests.total_count})
.row .row
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
.automerge_widget.cannot_be_merged{style: "display:none"} .automerge_widget.cannot_be_merged{style: "display:none"}
.alert.alert-disabled .alert.alert-disabled
%span %span
= link_to "Show how to merge", "#modal_merge_info", class: "how_to_merge_link btn btn-small padded", title: "How To Merge", "data-toggle" => "modal" = link_to "Show how to merge", "#modal_merge_info", class: "how_to_merge_link btn padded", title: "How To Merge", "data-toggle" => "modal"
   
%strong This request can't be merged with GitLab. You should do it manually %strong This request can't be merged with GitLab. You should do it manually
......
...@@ -27,8 +27,11 @@ ...@@ -27,8 +27,11 @@
= f.hidden_field :content, class: 'snippet-file-content' = f.hidden_field :content, class: 'snippet-file-content'
.form-actions .form-actions
- if @snippet.new_record?
= f.submit 'Create snippet', class: "btn-create btn"
- else
= f.submit 'Save', class: "btn-save btn" = f.submit 'Save', class: "btn-save btn"
= link_to "Cancel", project_snippets_path(@project), class: " btn" = link_to "Cancel", project_snippets_path(@project), class: " btn btn-cancel"
- unless @snippet.new_record? - unless @snippet.new_record?
.pull-right= link_to 'Destroy', project_snippet_path(@project, @snippet), confirm: 'Are you sure?', method: :delete, class: "btn pull-right danger delete-snippet", id: "destroy_snippet_#{@snippet.id}" .pull-right= link_to 'Destroy', project_snippet_path(@project, @snippet), confirm: 'Are you sure?', method: :delete, class: "btn pull-right danger delete-snippet", id: "destroy_snippet_#{@snippet.id}"
......
%h3.page-title %h3.page-title
Snippets Snippets
%small share code pastes with others out of git repository
- if can? current_user, :write_project_snippet, @project - if can? current_user, :write_project_snippet, @project
= link_to new_project_snippet_path(@project), class: "btn btn-small add_new pull-right", title: "New Snippet" do = link_to new_project_snippet_path(@project), class: "btn btn-new pull-right", title: "New Snippet" do
Add new snippet Add new snippet
%p.light
Share code pastes with others out of git repository
%hr %hr
%ul.bordered-list %ul.bordered-list
= render partial: "projects/snippets/snippet", collection: @snippets = render partial: "projects/snippets/snippet", collection: @snippets
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
.controls= f.text_field :title, placeholder: "Example Snippet", class: 'input-xlarge', required: true .controls= f.text_field :title, placeholder: "Example Snippet", class: 'input-xlarge', required: true
.control-group .control-group
= f.label "Private?" = f.label "Private?"
.controls= f.check_box :private, {class: ''} .controls
= f.check_box :private, {class: ''}
.control-group .control-group
.file-editor .file-editor
= f.label :file_name, "File" = f.label :file_name, "File"
...@@ -32,7 +33,7 @@ ...@@ -32,7 +33,7 @@
- else - else
= f.submit 'Save', class: "btn-save btn" = f.submit 'Save', class: "btn-save btn"
= link_to "Cancel", snippets_path(@project), class: " btn" = link_to "Cancel", snippets_path(@project), class: "btn btn-cancel"
- unless @snippet.new_record? - unless @snippet.new_record?
.pull-right= link_to 'Destroy', snippet_path(@snippet), confirm: 'Removed snippet cannot be restored! Are you sure?', method: :delete, class: "btn pull-right danger delete-snippet", id: "destroy_snippet_#{@snippet.id}" .pull-right= link_to 'Destroy', snippet_path(@snippet), confirm: 'Removed snippet cannot be restored! Are you sure?', method: :delete, class: "btn pull-right danger delete-snippet", id: "destroy_snippet_#{@snippet.id}"
......
...@@ -14,11 +14,20 @@ ...@@ -14,11 +14,20 @@
.span3 .span3
%ul.nav.nav-pills.nav-stacked %ul.nav.nav-pills.nav-stacked
= nav_tab :scope, nil do = nav_tab :scope, nil do
= link_to "All", user_snippets_path(@user) = link_to user_snippets_path(@user) do
All
%span.pull-right
= @user.snippets.count
= nav_tab :scope, 'private' do = nav_tab :scope, 'private' do
= link_to "Private", user_snippets_path(@user, scope: 'private') = link_to user_snippets_path(@user, scope: 'private') do
Private
%span.pull-right
= @user.snippets.private.count
= nav_tab :scope, 'public' do = nav_tab :scope, 'public' do
= link_to "Public", user_snippets_path(@user, scope: 'public') = link_to user_snippets_path(@user, scope: 'public') do
Public
%span.pull-right
= @user.snippets.public.count
.span9.my-snippets .span9.my-snippets
= render 'snippets' = render 'snippets'
......
...@@ -58,7 +58,7 @@ class ProjectSnippets < Spinach::FeatureSteps ...@@ -58,7 +58,7 @@ class ProjectSnippets < Spinach::FeatureSteps
within('.file-editor') do within('.file-editor') do
find(:xpath, "//input[@id='project_snippet_content']").set 'Content of snippet three' find(:xpath, "//input[@id='project_snippet_content']").set 'Content of snippet three'
end end
click_button "Save" click_button "Create snippet"
end end
Then 'I should see snippet "Snippet three"' do Then 'I should see snippet "Snippet three"' do
......
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