diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-12 12:08:52 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-12 12:08:52 +0300 |
commit | 083990c795c74a0dfc76813e44706289a7ede43d (patch) | |
tree | a547b31f0c33fe09deb4d5165c9717b4a10a969e /app/views/projects/snippets | |
parent | 0175e665893ca8f8fd660ff55841e95c02fcb987 (diff) | |
download | gitlab-ce-083990c795c74a0dfc76813e44706289a7ede43d.tar.gz |
Minor UI improvements
Diffstat (limited to 'app/views/projects/snippets')
-rw-r--r-- | app/views/projects/snippets/_form.html.haml | 7 | ||||
-rw-r--r-- | app/views/projects/snippets/index.html.haml | 8 |
2 files changed, 10 insertions, 5 deletions
diff --git a/app/views/projects/snippets/_form.html.haml b/app/views/projects/snippets/_form.html.haml index 14a42f34f25..e83f5d0d65d 100644 --- a/app/views/projects/snippets/_form.html.haml +++ b/app/views/projects/snippets/_form.html.haml @@ -27,8 +27,11 @@ = f.hidden_field :content, class: 'snippet-file-content' .form-actions - = f.submit 'Save', class: "btn-save btn" - = link_to "Cancel", project_snippets_path(@project), class: " btn" + - if @snippet.new_record? + = f.submit 'Create snippet', class: "btn-create btn" + - else + = f.submit 'Save', class: "btn-save btn" + = link_to "Cancel", project_snippets_path(@project), class: " btn btn-cancel" - 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}" diff --git a/app/views/projects/snippets/index.html.haml b/app/views/projects/snippets/index.html.haml index 2e8dddefffc..c40f63d05b3 100644 --- a/app/views/projects/snippets/index.html.haml +++ b/app/views/projects/snippets/index.html.haml @@ -1,10 +1,12 @@ %h3.page-title Snippets - %small share code pastes with others out of git repository - - 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 + +%p.light + Share code pastes with others out of git repository + %hr %ul.bordered-list = render partial: "projects/snippets/snippet", collection: @snippets |