Add announcement admin and view template
This commit is contained in:
1 parent
4807066c68
commit
5570a2dfbf
12 files changed
+145
-115
No files matched your search
@@ -1,22 +0,0 @@
|
||||
<h1>Editing announcement</h1>
|
||||
|
||||
<% form_for(@announcement) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p>
|
||||
<%= f.label :title, "Title" %>
|
||||
<%= f.text_field :title %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.label :content, "Content" %>
|
||||
<%= f.text_area :content %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.submit 'Update' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Show', @announcement %> |
|
||||
<%= link_to 'Back', announcements_path %>
|
||||
@@ -1,18 +0,0 @@
|
||||
<h1>Listing announcements</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
</tr>
|
||||
|
||||
<% @announcements.each do |announcement| %>
|
||||
<tr>
|
||||
<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 %>
|
||||
@@ -1,21 +0,0 @@
|
||||
<h1>New announcement</h1>
|
||||
|
||||
<% form_for(@announcement) do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
||||
<p>
|
||||
<%= f.label :title, "Title" %>
|
||||
<%= f.text_field :title %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.label :content, "Content" %>
|
||||
<%= f.text_area :content %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.submit 'Create' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'Back', announcements_path %>
|
||||
Reference in new issue
Block a user