@@ -55,6 +55,10 @@ class CoverUploader < CarrierWave::Uploader::Base |
||
| 55 | 55 |
version :thumb do |
| 56 | 56 |
process :resize_to_fit => [300, 200] |
| 57 | 57 |
end |
| 58 |
+ |
|
| 59 |
+ version :mini do |
|
| 60 |
+ process :resize_to_fit => [150, 100] |
|
| 61 |
+ end |
|
| 58 | 62 |
|
| 59 | 63 |
# Add a white list of extensions which are allowed to be uploaded. |
| 60 | 64 |
# For images you might use something like this: |
@@ -4,35 +4,30 @@ |
||
| 4 | 4 |
<div class="page-header"> |
| 5 | 5 |
<h1><%= t "admin_panel.posts" %> <%= link_to (t "admin_panel.new_blog_post"), new_blog_post_path, :class => 'btn btn-primary btn-mini' %></h1> |
| 6 | 6 |
</div> |
| 7 |
- <table class="table table-bordered"> |
|
| 8 |
- <thead> |
|
| 9 |
- <tr> |
|
| 10 |
- <th>Title</th> |
|
| 11 |
- <th>Slug</th> |
|
| 12 |
- <th>Content</th> |
|
| 13 |
- <th>Published</th> |
|
| 14 |
- <th>Author</th> |
|
| 15 |
- <th></th> |
|
| 16 |
- <th></th> |
|
| 17 |
- <th></th> |
|
| 18 |
- </tr> |
|
| 19 |
- </thead> |
|
| 20 |
- |
|
| 21 |
- <tbody> |
|
| 22 |
- <% @posts.each do |blog_post| %> |
|
| 23 |
- <tr> |
|
| 24 |
- <td><%= blog_post.title %></td> |
|
| 25 |
- <td><%= blog_post.slug %></td> |
|
| 26 |
- <td><%= blog_post.description %></td> |
|
| 27 |
- <td><%= blog_post.published %></td> |
|
| 28 |
- <td><%= blog_post.author.full_name %></td> |
|
| 29 |
- <td><%= link_to 'Show', post_path(blog_post) %></td> |
|
| 30 |
- <td><%= link_to 'Edit', edit_blog_post_path(blog_post) %></td> |
|
| 31 |
- <td><%= link_to 'Destroy', blog_post, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
|
| 32 |
- </tr> |
|
| 33 |
- <% end %> |
|
| 34 |
- </tbody> |
|
| 35 |
- </table> |
|
| 7 |
+ |
|
| 8 |
+ <% @posts.each do |post| %> |
|
| 9 |
+ <div class="media thumbnail" style="padding: 10px; padding-bottom: 5px;"> |
|
| 10 |
+ <span class="pull-left"> |
|
| 11 |
+ <% if post.image.mini.to_s != '' %> |
|
| 12 |
+ <%= image_tag post.image.mini.to_s %> |
|
| 13 |
+ <% else %> |
|
| 14 |
+ <img src="http://placehold.it/150x100" alt=""> |
|
| 15 |
+ <% end %> |
|
| 16 |
+ </span> |
|
| 17 |
+ <div class="media-body pull-left"> |
|
| 18 |
+ <h3 class="media-heading" style="margin-bottom: 0px;"><%= link_to post.title, post_path(post) %></h3> |
|
| 19 |
+ <p style="margin-top: -5px;"><small><%= t "blog.by" %> <%= post.author.full_name %>, <%= time_ago_in_words(post.created_at) %> <%= t "blog.ago" %></small></p> |
|
| 20 |
+ <p><%= post.description %></p> |
|
| 21 |
+ </div> |
|
| 22 |
+ <div class="pull-right"> |
|
| 23 |
+ <div class="btn-group btn-group-vertical"> |
|
| 24 |
+ <%= link_to '<i class="icon-eye-open"></i>'.html_safe, post_path(post), :class => 'btn' %> |
|
| 25 |
+ <%= link_to '<i class="icon-pencil"></i>'.html_safe, edit_blog_post_path(post), :class => 'btn' %> |
|
| 26 |
+ <%= link_to '<i class="icon-remove"></i>'.html_safe, post, method: :delete, data: { confirm: 'Are you sure?' }, :class => 'btn btn-danger' %>
|
|
| 27 |
+ </div> |
|
| 28 |
+ </div> |
|
| 29 |
+ </div> |
|
| 30 |
+ <% end %> |
|
| 36 | 31 |
|
| 37 | 32 |
</div> |
| 38 | 33 |
</div> |
@@ -19,6 +19,7 @@ Other features are still under development: |
||
| 19 | 19 |
- Store |
| 20 | 20 |
- Inventory |
| 21 | 21 |
- Module Controller |
| 22 |
+- Maintaince Mode |
|
| 22 | 23 |
|
| 23 | 24 |
## Todo's |
| 24 | 25 |
|