diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-24 18:24:14 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-24 18:24:14 +0300 |
commit | 3e09e6f7b8032859a82266282dfd35715b3b3727 (patch) | |
tree | 7f882004565743b11cb4c734cbdfb9417fa1a9ab /app/views | |
parent | e55e23bbda6f6a95982109bc46e48a5550e4c181 (diff) | |
download | gitlab-ce-3e09e6f7b8032859a82266282dfd35715b3b3727.tar.gz |
Move Profile related controllers under Profiles:: module
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/keys/_show.html.haml | 12 | ||||
-rw-r--r-- | app/views/keys/edit.html.haml | 7 | ||||
-rw-r--r-- | app/views/layouts/nav/_profile.html.haml | 2 | ||||
-rw-r--r-- | app/views/profiles/keys/_form.html.haml (renamed from app/views/keys/_form.html.haml) | 6 | ||||
-rw-r--r-- | app/views/profiles/keys/_key.html.haml | 12 | ||||
-rw-r--r-- | app/views/profiles/keys/edit.html.haml | 7 | ||||
-rw-r--r-- | app/views/profiles/keys/index.html.haml (renamed from app/views/keys/index.html.haml) | 5 | ||||
-rw-r--r-- | app/views/profiles/keys/new.html.haml (renamed from app/views/keys/new.html.haml) | 0 | ||||
-rw-r--r-- | app/views/profiles/keys/show.html.haml (renamed from app/views/keys/show.html.haml) | 4 | ||||
-rw-r--r-- | app/views/profiles/notifications/_settings.html.haml (renamed from app/views/notifications/_settings.html.haml) | 0 | ||||
-rw-r--r-- | app/views/profiles/notifications/show.html.haml (renamed from app/views/notifications/show.html.haml) | 0 | ||||
-rw-r--r-- | app/views/profiles/notifications/update.js.haml (renamed from app/views/notifications/update.js.haml) | 0 | ||||
-rw-r--r-- | app/views/profiles/passwords/new.html.haml (renamed from app/views/passwords/new.html.haml) | 0 | ||||
-rw-r--r-- | app/views/profiles/show.html.haml | 4 |
14 files changed, 29 insertions, 30 deletions
diff --git a/app/views/keys/_show.html.haml b/app/views/keys/_show.html.haml deleted file mode 100644 index 52bbea6fc7b..00000000000 --- a/app/views/keys/_show.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -%tr - %td - = link_to key_path(key) do - %strong= key.title - %td - %span.cgray - Added - = time_ago_in_words(key.created_at) - ago - %td - = link_to 'Remove', key, confirm: 'Are you sure?', method: :delete, class: "btn btn-small btn-remove delete-key pull-right" - diff --git a/app/views/keys/edit.html.haml b/app/views/keys/edit.html.haml deleted file mode 100644 index 60a3afedddc..00000000000 --- a/app/views/keys/edit.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -%h1 Editing key - -= render 'form' - -= link_to 'Show', @key -\| -= link_to 'Back', keys_path diff --git a/app/views/layouts/nav/_profile.html.haml b/app/views/layouts/nav/_profile.html.haml index e5e4b27c665..c2db7067e44 100644 --- a/app/views/layouts/nav/_profile.html.haml +++ b/app/views/layouts/nav/_profile.html.haml @@ -7,7 +7,7 @@ = nav_link(controller: :notifications) do = link_to "Notifications", profile_notifications_path = nav_link(controller: :keys) do - = link_to keys_path do + = link_to profile_keys_path do SSH Keys %span.count= current_user.keys.count = nav_link(path: 'profiles#design') do diff --git a/app/views/keys/_form.html.haml b/app/views/profiles/keys/_form.html.haml index fe26216b1d5..59808d60022 100644 --- a/app/views/keys/_form.html.haml +++ b/app/views/profiles/keys/_form.html.haml @@ -1,6 +1,6 @@ %div - = form_for @key do |f| - -if @key.errors.any? + = form_for [:profile, @key] do |f| + - if @key.errors.any? .alert.alert-error %ul - @key.errors.full_messages.each do |msg| @@ -20,5 +20,5 @@ .actions = f.submit 'Save', class: "btn btn-save" - = link_to "Cancel", keys_path, class: "btn btn-cancel" + = link_to "Cancel", profile_keys_path, class: "btn btn-cancel" diff --git a/app/views/profiles/keys/_key.html.haml b/app/views/profiles/keys/_key.html.haml new file mode 100644 index 00000000000..a71ad6295cd --- /dev/null +++ b/app/views/profiles/keys/_key.html.haml @@ -0,0 +1,12 @@ +%tr + %td + = link_to profile_key_path(key) do + %strong= key.title + %td + %span.cgray + Added + = time_ago_in_words(key.created_at) + ago + %td + = link_to 'Remove', profile_key_path(key), confirm: 'Are you sure?', method: :delete, class: "btn btn-small btn-remove delete-key pull-right" + diff --git a/app/views/profiles/keys/edit.html.haml b/app/views/profiles/keys/edit.html.haml new file mode 100644 index 00000000000..08c5a3dfe1e --- /dev/null +++ b/app/views/profiles/keys/edit.html.haml @@ -0,0 +1,7 @@ +%h1 Editing key + += render 'form' + += link_to 'Show', profile_keys_path(key) +\| += link_to 'Back', profile_keys_path diff --git a/app/views/keys/index.html.haml b/app/views/profiles/keys/index.html.haml index 7730b344a7d..b22805bc862 100644 --- a/app/views/keys/index.html.haml +++ b/app/views/profiles/keys/index.html.haml @@ -1,6 +1,6 @@ %h3.page_title SSH Keys - = link_to "Add new", new_key_path, class: "btn pull-right" + = link_to "Add new", new_profile_key_path, class: "btn pull-right" %hr %p.slead @@ -13,8 +13,7 @@ %th Name %th Added %th - - @keys.each do |key| - = render(partial: 'show', locals: {key: key}) + = render @keys - if @keys.blank? %tr %td{colspan: 3} diff --git a/app/views/keys/new.html.haml b/app/views/profiles/keys/new.html.haml index fff3805890e..fff3805890e 100644 --- a/app/views/keys/new.html.haml +++ b/app/views/profiles/keys/new.html.haml diff --git a/app/views/keys/show.html.haml b/app/views/profiles/keys/show.html.haml index 059fe5e5806..64c6621ea5f 100644 --- a/app/views/keys/show.html.haml +++ b/app/views/profiles/keys/show.html.haml @@ -5,10 +5,10 @@ created at = @key.created_at.stamp("Aug 21, 2011") .back_link - = link_to keys_path do + = link_to profile_keys_path do ← To keys list %hr %pre= @key.key .pull-right - = link_to 'Remove', @key, confirm: 'Are you sure?', method: :delete, class: "btn btn-remove delete-key" + = link_to 'Remove', profile_key_path(@key), confirm: 'Are you sure?', method: :delete, class: "btn btn-remove delete-key" diff --git a/app/views/notifications/_settings.html.haml b/app/views/profiles/notifications/_settings.html.haml index 1a4a4a9f916..1a4a4a9f916 100644 --- a/app/views/notifications/_settings.html.haml +++ b/app/views/profiles/notifications/_settings.html.haml diff --git a/app/views/notifications/show.html.haml b/app/views/profiles/notifications/show.html.haml index 069747097c5..069747097c5 100644 --- a/app/views/notifications/show.html.haml +++ b/app/views/profiles/notifications/show.html.haml diff --git a/app/views/notifications/update.js.haml b/app/views/profiles/notifications/update.js.haml index 88e74d50671..88e74d50671 100644 --- a/app/views/notifications/update.js.haml +++ b/app/views/profiles/notifications/update.js.haml diff --git a/app/views/passwords/new.html.haml b/app/views/profiles/passwords/new.html.haml index c92424160b3..c92424160b3 100644 --- a/app/views/passwords/new.html.haml +++ b/app/views/profiles/passwords/new.html.haml diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index 7ca2546afdf..7ca7583cd32 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -83,9 +83,9 @@ %legend SSH public keys: %span.pull-right - = link_to pluralize(current_user.keys.count, 'key'), keys_path + = link_to pluralize(current_user.keys.count, 'key'), profile_keys_path .padded - = link_to "Add Public Key", new_key_path, class: "btn btn-small" + = link_to "Add Public Key", new_profile_key_path, class: "btn btn-small" .form-actions = f.submit 'Save', class: "btn btn-save" |