forked from saberma/shopqi
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change article view , modify tag list view and comment view
- Loading branch information
Showing
18 changed files
with
126 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
%tr(class="#{cycle(:odd, :event)}") | ||
%td | ||
=link_to article.title,blog_article_path(blog,article) | ||
%span.description{:style => "margin: 0 0 0 4px;"} | ||
%span.hint==由#{article.user.name} | ||
==发表于:#{distance_of_time_in_words(article.updated_at,Time.now)} | ||
%td.date{:style => "text-align: right"} | ||
=article.created_at.to_s(:with_year) | ||
%td.date{:style => "text-align: right"} | ||
=article.updated_at.to_s(:with_year) | ||
%td{:style => "text-align: center"} | ||
=link_to article.title,blog_article_path(blog,article) | ||
%td | ||
%span.comment-number 0 | ||
%td | ||
%ul.tag-list | ||
%li | ||
-article.tags.each do |tag| | ||
=link_to tag.name, blog_path(blog,tag: tag.name),class: 'active-tag' | ||
%td=article.author | ||
%td | ||
%span.note=article.updated_at.to_s(:with_year) | ||
%td.r | ||
= link_to image_tag('admin/icons/trash.gif'), blog_article_path(blog,article), remote: true, method: :delete, confirm: '您确定要删除?', title: '删除它', class: :del |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,40 @@ | ||
-if blog.commentable == 'no' | ||
-if blog.commentable == 'no' | ||
%p.description.highlight(style="text-align: center") | ||
==此博客评论已被禁用,你可以#{link_to "启用评论",edit_blog_path(blog)} | ||
-else | ||
%p#comment-counts.info.c.st | ||
==这篇文章共有#{article.comments.size}条评论 | ||
| | ||
%span#comment_published_count.status_tag.published | ||
=link_to "#{article.published_comments.size}条公开评论",comments_path(article_id:article.id,blog_id:blog.id,status:"published"),title:"显示所有公开评论" | ||
| | ||
%span#comment_unapproved_count.status_tag.unapproved | ||
=link_to "#{article.unapproved_comments.size}条待审核评论",comments_path(article_id:article.id,blog_id:blog.id,status:"unapproved"),title:"显示所有待审核评论" | ||
| | ||
%span#comment_removed_count.status_tag.removed | ||
=link_to "#{article.removed_comments.size}条已删除评论",comments_path(article_id:article.id,blog_id:blog.id,status:"removed"),title:"显示所有已删除评论" | ||
|
||
#comments | ||
%h4==文章#{article.title}的评论 | ||
%p.description | ||
These are comments for this article, you can view and manage all your | ||
%a{:href => "/admin/comments"} comments here | ||
%form#batch-form{"accept-charset" => "UTF-8", :action => "/admin/articles/set", :method => "post"} | ||
%table#comments-list.standard-table.hide_checkboxes{:cellpadding => "0", :cellspacing => "0"} | ||
%thead | ||
%tr | ||
%th.checkbox{:width => "5%"} | ||
%input#select-all{:type => "checkbox"}/ | ||
%th{:width => "17%"} From | ||
%th{:width => "55%"} Comment | ||
%th{:width => "22%"} | ||
%tbody | ||
/ Required arguments: comment, parent | ||
%tr#comment_19083422.odd | ||
%td.checkbox | ||
%input#checkbox-19083422.selector{:name => "comments[]", :type => "checkbox", :value => "19083422"}/ | ||
%td | ||
jj | ||
%a.email{:href => "mailto:jj@gmail.com"} jj@gmail.com | ||
%span.note 12 Jul 23:12 | ||
%td | ||
%p fasffas | ||
%span.posted-on | ||
Posted in | ||
%a{:href => "/admin/blogs/941902/articles/3200602"} aaa | ||
from the blog | ||
%a{:href => "/admin/blogs/941902"} aaa | ||
%td.r | ||
%span.comment-actions | ||
%span#comment_19083422_actions | ||
%a.action.btn{"data-method" => "post", "data-remote" => "true", :href => "/admin/comments/19083422/spam", :loading => "var action = $('comment_19083422_actions'); action.update('marking as spam...'); action.addClassName('hint');", :rel => "nofollow", :title => "Spam this comment"} spam | ||
%a.action{"data-confirm" => "Are you sure you want to delete this comment?", "data-method" => "post", "data-remote" => "true", :href => "/admin/comments/19083422/remove", :loading => "var action = $('comment_19083422_actions'); action.update('removing...'); action.addClassName('hint');", :rel => "nofollow", :title => "Remove this comment"} | ||
%img{:alt => "Trash", :src => "https://cdn.shopify.com/s/images/admin/icons/trash.gif?19b2f7c9ac918121a1eed4f4e75712320f420f18"}/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
%table.standard-table.ssb{:cellspacing => "0", :style => "margin-bottom: 40px"} | ||
%thead | ||
%tr | ||
%th{:width => "20%"}==#{blog.title} 文章 | ||
%th{:width => "10%"} 评论 | ||
%th{:width => "17%"} 标签 | ||
%th{:width => "13%"} 作者 | ||
%th{:width => "8%"} 更新时间 | ||
%th{:width => "5%"} | ||
%tbody | ||
-articles = blog.articles | ||
=render partial: 'articles/article' , collection: articles, locals: {blog: blog} | ||
%tr.last-article | ||
%td{:colspan => "6"}=link_to "管理 #{blog.title}", blog_path(blog),class: 'view-all-articles' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,6 @@ | ||
/ | ||
Required arguments: blogs, comment_counts | ||
#blogs | ||
%h4 博客 | ||
%p.description | ||
博客是经常更新的一系列文章。 | ||
您的客户可以订阅博客,及时看到新的文章。 | ||
%table.data.blogs-table{ :cellspacing => "0", :cellpadding => "0" } | ||
%thead | ||
%tr | ||
%th{ :scope => "col" } 标题 | ||
%th{ :scope => "col", :style => "width: 50px" } | ||
%tbody | ||
-blogs.each do |blog| | ||
=render partial:"blogs/blogs",locals:{blog:blog} | ||
=render blogs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,6 +74,7 @@ cn: | |
title: 标题 | ||
article: | ||
title: 标题 | ||
author: 作者 | ||
body_html: 内容 | ||
tags: 标签 | ||
custom_collection: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.