Show More
Commit Description:
## Bootstrapify...
Commit Description:
## Bootstrapify
* submit error message
* bootstrap switch for announcement
References:
File last commit:
Show/Diff file:
Action:
app/views/announcements/index.html.erb
| 41 lines
| 1.3 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> | ||
r555 | <td><%= check_box_tag :published, 1, announcement.published, class: 'bootstrap-switch', data: {size: 'small'} %></td> | |||
<!-- <td><%= in_place_editor_field :announcement, :published, {}, :rows => 1 %></td> --> | ||||
|
r97 | <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 %> | ||||