From 96bf3604812e7fca7d977741fc97e1aadf4968a9 Mon Sep 17 00:00:00 2001 From: Jace Monje Date: Mon, 29 Jun 2015 09:10:50 +0800 Subject: [PATCH 1/2] separated action buttons into own table for cleaner look --- app/views/admin/content/_article_list.html.erb | 7 +++++-- app/views/admin/pages/_pages.html.erb | 4 +++- app/views/admin/pages/index.html.erb | 1 + app/views/admin/users/index.html.erb | 6 +++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/views/admin/content/_article_list.html.erb b/app/views/admin/content/_article_list.html.erb index b76427af2d..93e409a177 100644 --- a/app/views/admin/content/_article_list.html.erb +++ b/app/views/admin/content/_article_list.html.erb @@ -5,15 +5,18 @@ <% end %> + <% for article in @articles %> + + <%= show_actions article %> + <% if article.published %> <%= link_to_permalink(article, article.title, nil, 'published')%> <% else %> <%= link_to(article.title, {controller: '/articles', action: "preview", id: article.id}, {class: 'unpublished', target: '_new'}) %> <% end %> - <%= show_actions article %> <%= author_link(article)%>
@@ -23,4 +26,4 @@ <%= (article.allow_comments?) ? link_to("#{article.comments.ham.size.to_s} ".html_safe, controller: '/admin/feedback', id: article.id, action: 'article') : '-' %> <% end %> -<%= display_pagination(@articles, 5, 'first', 'last')%> \ No newline at end of file +<%= display_pagination(@articles, 5, 'first', 'last')%> diff --git a/app/views/admin/pages/_pages.html.erb b/app/views/admin/pages/_pages.html.erb index 45d9d87cae..03ee7d5c91 100644 --- a/app/views/admin/pages/_pages.html.erb +++ b/app/views/admin/pages/_pages.html.erb @@ -9,9 +9,11 @@ <% for page in @pages %> - <%= link_to_edit_with_profiles page.title, page %> <%= show_actions page %> + + <%= link_to_edit_with_profiles page.title, page %> + <%= author_link(page) %>
<%= l(page.created_at) %> diff --git a/app/views/admin/pages/index.html.erb b/app/views/admin/pages/index.html.erb index 6acc0dfc89..38bf4c2b6f 100644 --- a/app/views/admin/pages/index.html.erb +++ b/app/views/admin/pages/index.html.erb @@ -9,6 +9,7 @@ + diff --git a/app/views/admin/users/index.html.erb b/app/views/admin/users/index.html.erb index eb9f06ef73..33124484c2 100644 --- a/app/views/admin/users/index.html.erb +++ b/app/views/admin/users/index.html.erb @@ -9,6 +9,7 @@
Actions <%= t(".title") %> <%= t(".author")%>
+ @@ -21,12 +22,15 @@ <% for user in @users %> + From 1c52ad1d3fb117a8ec295550887abbdb69c954e2 Mon Sep 17 00:00:00 2001 From: Jace Monje Date: Tue, 30 Jun 2015 07:00:15 +0800 Subject: [PATCH 2/2] added and configured translation keys for actions --- app/views/admin/pages/index.html.erb | 2 +- app/views/admin/users/index.html.erb | 2 +- config/locales/en.yml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/admin/pages/index.html.erb b/app/views/admin/pages/index.html.erb index 38bf4c2b6f..32ca9c8e12 100644 --- a/app/views/admin/pages/index.html.erb +++ b/app/views/admin/pages/index.html.erb @@ -9,7 +9,7 @@
Actions <%= t(".login") %> <%= t(".name") %> <%= t(".email") %>
- <%= link_to user.login, author_path(id: user.login) %>
<%= link_to(content_tag(:span, '', class: 'glyphicon glyphicon-pencil'), edit_admin_user_path(user), class: 'btn btn-primary btn-xs btn-action' ) %> <%= link_to(content_tag(:span, '', class: 'glyphicon glyphicon-link'), author_path(id:user.login), class: 'btn btn-success btn-xs btn-action' ) %>
+ <%= link_to user.login, author_path(id: user.login) %> + + <%= user.nickname %> <%= mail_to user.email, user.email %> <%= t("profile.#{user.profile.label}") %>
- + diff --git a/app/views/admin/users/index.html.erb b/app/views/admin/users/index.html.erb index 33124484c2..c973fee64a 100644 --- a/app/views/admin/users/index.html.erb +++ b/app/views/admin/users/index.html.erb @@ -9,7 +9,7 @@
Actions<%= t('actions')%> <%= t(".title") %> <%= t(".author")%>
- + diff --git a/config/locales/en.yml b/config/locales/en.yml index 5881fa012d..8b06a9f7a3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,4 +1,5 @@ en: + actions: "Actions" meta_sidebar: content: rss_feed: "RSS Feed"
Actions<%= t('actions')%> <%= t(".login") %> <%= t(".name") %> <%= t(".email") %>