aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/admin/blog
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin/blog')
-rw-r--r--app/views/admin/blog/comments/_comment.html.erb23
-rw-r--r--app/views/admin/blog/comments/index.html.erb2
-rw-r--r--app/views/admin/blog/comments/show.html.erb61
3 files changed, 75 insertions, 11 deletions
diff --git a/app/views/admin/blog/comments/_comment.html.erb b/app/views/admin/blog/comments/_comment.html.erb
index e03605a..3435c75 100644
--- a/app/views/admin/blog/comments/_comment.html.erb
+++ b/app/views/admin/blog/comments/_comment.html.erb
@@ -1,17 +1,20 @@
-<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(comment) -%>">
+<li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= "comment-#{comment.to_param}" -%>">
<span class='title'>
<%=h comment.name %>
<span class="preview"> - <%= truncate(comment.message, :length => 75) %></span>
</span>
<span class='actions'>
- <%= link_to refinery_icon_tag("application_go.png"), blog_post_url(comment.post,
- :anchor => "comment-#{comment.to_param}"),
- :title => t('.view_live'),
- :target => "_blank" %>
- <%= link_to refinery_icon_tag("application_edit.png"), edit_admin_blog_comment_path(comment),
- :title => t('.edit') %>
- <%= link_to refinery_icon_tag("delete.png"), admin_blog_comment_path(comment),
- :class => "cancel confirm-delete",
- :title => t('.delete') %>
+ <%= link_to refinery_icon_tag("application_go.png"),
+ blog_post_url(comment.post, :anchor => "comment-#{comment.to_param}"),
+ :title => t('.view_live'),
+ :target => "_blank" unless comment.unmoderated? %>
+ <%= link_to refinery_icon_tag('zoom.png'), admin_blog_comment_path(comment),
+ :title => t('.read') %>
+ <%= link_to refinery_icon_tag("cross.png"),
+ rejected_admin_blog_comment_path(comment, :return_to => request.path.split('/').last),
+ :title => t('.reject') unless comment.rejected? %>
+ <%= link_to refinery_icon_tag("tick.png"),
+ approved_admin_blog_comment_path(comment, :return_to => request.path.split('/').last),
+ :title => t('.approve') unless comment.approved? %>
</span>
</li>
diff --git a/app/views/admin/blog/comments/index.html.erb b/app/views/admin/blog/comments/index.html.erb
index 940ba47..c1596a6 100644
--- a/app/views/admin/blog/comments/index.html.erb
+++ b/app/views/admin/blog/comments/index.html.erb
@@ -28,7 +28,7 @@
<% else %>
<h3>
<%= t('.no_items_yet',
- :type => (t("admin.blog.submenu.comments.#{action_name}").downcase unless action_name == 'index')) %>
+ :type => t("admin.blog.submenu.comments.#{action_name.gsub('index', 'new')}").downcase) %>
</h3>
<% end %>
<% end %>
diff --git a/app/views/admin/blog/comments/show.html.erb b/app/views/admin/blog/comments/show.html.erb
new file mode 100644
index 0000000..8ed5191
--- /dev/null
+++ b/app/views/admin/blog/comments/show.html.erb
@@ -0,0 +1,61 @@
+<div id='actions'>
+ <h2><%= t('.details')%></h2>
+ <p>
+ <strong><%= t('.age') %>:</strong> <%= time_ago_in_words(@blog_comment.created_at) %>
+ </p>
+ <h2><%= t('.actions') %></h2>
+ <ul>
+ <li>
+ <%= link_to t('.back'), {:action => 'index'}, :class => "back_icon" %>
+ </li>
+ <li>
+ <%= link_to t('.reject'), rejected_admin_blog_comment_path(@blog_comment, :return_to => 'rejected'),
+ :class => 'comment_cross_icon' unless @blog_comment.rejected? %>
+ </li>
+ <li>
+ <%= link_to t('.approve'), approved_admin_blog_comment_path(@blog_comment, :return_to => 'approved'),
+ :class => 'comment_tick_icon' unless @blog_comment.approved? %>
+ </li>
+ </ul>
+</div>
+<div id='records'>
+ <h2><%= t('.comment') %></h2>
+ <table id='inquiry'>
+ <tr>
+ <td>
+ <strong><%= t('.blog_post') %></strong>
+ </td>
+ <td>
+ <%= link_to @blog_comment.post.title,
+ blog_post_url(@blog_comment.post, :anchor => "comment-#{@blog_comment.to_param}"),
+ :target => '_blank' %>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <strong><%= t('.from') %></strong>
+ </td>
+ <td>
+ <%= @blog_comment.name %> [<%= mail_to @blog_comment.email, @blog_comment.email, {:title => t('.click_to_email')} %>]
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <strong><%= t('.date') %></strong>
+ </td>
+ <td>
+ <%= l(Date.parse(@blog_comment.created_at.to_s), :format => :long) %>
+ </td>
+ </tr>
+ <tr>
+ <td valign='top'>
+ <strong><%= t('.message') %></strong>
+ </td>
+ <td>
+ <p style='margin-top: 0px'>
+ <%= @blog_comment.message.gsub("\r\n\r\n", "\r\n").gsub("\r\n", "</p><p>") %>
+ </p>
+ </td>
+ </tr>
+ </table>
+</div> \ No newline at end of file