Update button copy

Improve news archive
This commit is contained in:
Luke Barratt 2014-05-02 09:06:01 +01:00
parent 658e35ba7b
commit eee037b42c
5 changed files with 35 additions and 28 deletions

View file

@ -58,8 +58,8 @@ $dark-gray: #21262A;
$medium-gray: #2F383D; $medium-gray: #2F383D;
$light-blue: darken(#2FB0E7, 10); $light-blue: darken(#2FB0E7, 5);
$light-gray: darken(#ECF1F5, 10); $light-gray: darken(#ECF1F5, 5);
$light-red: #e56c69; $light-red: #e56c69;
$light-yellow: #FFF6BF; $light-yellow: #FFF6BF;
$light-green: #1f7f5c; $light-green: #1f7f5c;

View file

@ -83,6 +83,21 @@ div.article-links {
} }
} }
table.articles.archive {
.title {
width: 50%;
}
.date {
width: 20%;
}
.author {
width: 20%;
}
}
/* /*
Article Form Article Form
*/ */

View file

@ -1,25 +1,21 @@
<table class="data"> <table class="articles archive striped">
<tr> <tr>
<th>Title</th> <th class="title">Title</th>
<th>Category</th> <th class="date">Date</th>
<th>Date</th> <th class="author">Author</th>
<th>Author</th> <th class="actions"></th>
<th>Cmts.</th>
<th></th>
</tr> </tr>
<% articles.each do |article| %> <% articles.each do |article| %>
<tr class="<%= cycle('even', 'odd') %>"> <tr>
<td><%= namelink article, 35 %></td> <td><%= namelink article, 35 %></td>
<td><%= namelink article.category %></td>
<td><%= shortdate article.created_at %></td> <td><%= shortdate article.created_at %></td>
<td><%= namelink article.user %></td> <td><%= namelink article.user %></td>
<td><%= h article.comments.count %></td> <td class="actions">
<td>
<% if article.can_update? cuser %> <% if article.can_update? cuser %>
<%= link_to 'Edit', edit_article_path(article) %> <%= link_to icon('pencil'), edit_article_path(article) %>
<% end; if article.can_destroy? cuser %> <% end; if article.can_destroy? cuser %>
<%= link_to 'Destroy', article, :confirm => 'Are you sure?', :method => :delete %> <%= link_to icon('times'), article, confirm: 'Are you sure?', method: :delete %>
<% end %> <% end %>
</td> </td>
</tr> </tr>

View file

@ -1,11 +1,7 @@
<div class="wide"> <h1>News Archive</h1>
<h1>
News Archive
</h1>
<%= render :partial => "list", :locals => {:articles => @news} %> <%= render partial: 'list', locals: { articles: @news } %>
<% if cuser and cuser.admin? %> <% if cuser and cuser.admin? %>
<%= link_to 'New News', new_article_path %> <%= link_to 'New Article', new_article_path, class: 'button' %>
<% end %> <% end %>
</div>

View file

@ -1,14 +1,14 @@
<div id="bans"> <div id="bans">
<h1>Active bans</h1> <h1>Active Bans</h1>
<%= link_to 'New ban', new_ban_path, class: 'button' %> <%= link_to 'New Ban', new_ban_path, class: 'button' %>
<%= render partial: "list", locals: { bans: @bans.effective } %> <%= render partial: "list", locals: { bans: @bans.effective } %>
<h1>Ban history</h1> <h1>Ban History</h1>
<%= render partial: "list", locals: { bans: @bans.ineffective } %> <%= render partial: "list", locals: { bans: @bans.ineffective } %>
<%= link_to 'New ban', new_ban_path, class: 'button' %> <%= link_to 'New Ban', new_ban_path, class: 'button' %>
</div> </div>