Show More
Commit Description:
logical merge
Commit Description:
logical merge
References:
File last commit:
Show/Diff file:
Action:
app/views/announcements/index.html.erb
| 40 lines
| 1.2 KiB
| text/plain
| TextLexer
|
|
r97 | <h1>Listing announcements</h1> | ||
|
r103 | <%= link_to 'New announcement', new_announcement_path %> | ||
|
r306 | <table class="info"> | ||
<tr class="info-head"> | ||||
<th>Updated</th> | ||||
<th>Announcement</th> | ||||
|
r97 | <th>Author</th> | ||
|
r306 | <th>Published</th> | ||
<th></th> | ||||
<th></th> | ||||
<th></th> | ||||
|
r97 | </tr> | ||
<% for announcement in @announcements %> | ||||
|
r306 | <tr class="info-<%= cycle 'odd', 'even' %>"> | ||
|
r97 | <% @announcement = announcement %> | ||
|
r306 | <td><%= time_ago_in_words announcement.updated_at %></td> | ||
<td> | ||||
<% if !announcement.title.blank? %> | ||||
<b>Title:</b> <%=h announcement.title %><br/> | ||||
<% end %> | ||||
<% if !announcement.notes.blank? %> | ||||
<b>Notes: <%=h announcement.notes %></b><br/> | ||||
<% end %> | ||||
<%=h announcement.body %> | ||||
</td> | ||||
|
r97 | <td><%=h announcement.author %></td> | ||
<td><%= in_place_editor_field :announcement, :published, {}, :rows => 1 %></td> | ||||
<td><%= link_to 'Show', announcement %></td> | ||||
<td><%= link_to 'Edit', edit_announcement_path(announcement) %></td> | ||||
<td><%= link_to 'Destroy', announcement, :confirm => 'Are you sure?', :method => :delete %></td> | ||||
</tr> | ||||
<% end %> | ||||
</table> | ||||
<br /> | ||||
<%= link_to 'New announcement', new_announcement_path %> | ||||