Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table redesign for action buttons #626

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions app/views/admin/content/_article_list.html.erb
Expand Up @@ -5,15 +5,18 @@
</td>
</tr>
<% end %>

<% for article in @articles %>
<tr>
<td>
<%= show_actions article %>
</td>
<td>
<% 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 %>
</td>
<td>
<%= author_link(article)%><br>
Expand All @@ -23,4 +26,4 @@
<%= (article.allow_comments?) ? link_to("#{article.comments.ham.size.to_s} <i class='glyphicon glyphicon-comment'></i>".html_safe, controller: '/admin/feedback', id: article.id, action: 'article') : '-' %></td>
</tr>
<% end %>
<%= display_pagination(@articles, 5, 'first', 'last')%>
<%= display_pagination(@articles, 5, 'first', 'last')%>
4 changes: 3 additions & 1 deletion app/views/admin/pages/_pages.html.erb
Expand Up @@ -9,9 +9,11 @@
<% for page in @pages %>
<tr>
<td>
<%= link_to_edit_with_profiles page.title, page %>
<%= show_actions page %>
</td>
<td>
<%= link_to_edit_with_profiles page.title, page %>
</td>
<td>
<%= author_link(page) %><br>
<small><%= l(page.created_at) %></small>
Expand Down
1 change: 1 addition & 0 deletions app/views/admin/pages/index.html.erb
Expand Up @@ -9,6 +9,7 @@
<table class='table table-striped'>
<thead>
<tr class='noborder'>
<th><%= t('actions')%></th>
<th><%= t(".title") %></th>
<th><%= t(".author")%></th>
</tr>
Expand Down
6 changes: 5 additions & 1 deletion app/views/admin/users/index.html.erb
Expand Up @@ -9,6 +9,7 @@
<table class="table table-hover">
<thead>
<tr>
<th><%= t('actions')%></th>
<th><%= t(".login") %></th>
<th><%= t(".name") %></th>
<th><%= t(".email") %></th>
Expand All @@ -21,12 +22,15 @@
<% for user in @users %>
<tr>
<td>
<%= link_to user.login, author_path(id: user.login) %>
<div class='action'>
<%= 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' ) %>
</div>
</td>
<td>
<%= link_to user.login, author_path(id: user.login) %>

</td>
<td><%= user.nickname %></td>
<td><%= mail_to user.email, user.email %></td>
<td><%= t("profile.#{user.profile.label}") %></td>
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
@@ -1,4 +1,5 @@
en:
actions: "Actions"
meta_sidebar:
content:
rss_feed: "RSS Feed"
Expand Down