Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
34f757c
commit e3a8b59
Showing
4 changed files
with
59 additions
and
10 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import Widget from require "lapis.html" | ||
import Posts from require "models" | ||
import Pagination from require "widgets" | ||
|
||
class PostIndex extends Widget | ||
content: => | ||
widget Pagination | ||
|
||
table class: "table is-bordered is-striped is-narrow is-fullwidth", -> | ||
thead -> | ||
tr -> | ||
th "ID" | ||
th "Title" | ||
th "Status" | ||
th "Type" | ||
th "Updated" | ||
th "Created" | ||
th "View" | ||
th "Edit" | ||
th "Comments" | ||
tbody -> | ||
for post in *@posts | ||
tr -> | ||
td post.id | ||
td post.title | ||
td Posts.statuses\to_name post.status | ||
td Posts.types\to_name post.type | ||
td post.updated_at | ||
td post.created_at | ||
td -> a class: "button", href: @url_for("posts_view", slug: post.slug), "View" | ||
td -> a class: "button", href: @url_for("posts_edit", id: post.id), "Edit" | ||
td -> span class: "disqus-comment-count", "data-disqus-identifier": "https://guard13007.com#{@url_for "posts_view", slug: post.slug}" | ||
|
||
widget Pagination |
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