calendar feature generiert

This commit is contained in:
Andreas Stephanides
2013-08-06 00:48:45 +02:00
parent f8d5cb0ddd
commit 6bb35c110a
44 changed files with 1011 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
<%= semantic_form_for @calendar do |f| %>
<%= f.inputs do %>
<%= f.input :name %>
<%= f.input :public %>
<% end %>
<%= f.actions do %>
<%= f.action :submit, :as => :input %>
<% end %>
<% end %>

View File

@@ -0,0 +1,6 @@
<h1>Editing calendar</h1>
<%= render 'form' %>
<%= link_to 'Show', @calendar %> |
<%= link_to 'Back', calendars_path %>

View File

@@ -0,0 +1,25 @@
<h1>Listing calendars</h1>
<table>
<tr>
<th>Name</th>
<th>Public</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @calendars.each do |calendar| %>
<tr>
<td><%= calendar.name %></td>
<td><%= calendar.public %></td>
<td><%= link_to 'Show', calendar %></td>
<td><%= link_to 'Edit', edit_calendar_path(calendar) %></td>
<td><%= link_to 'Destroy', calendar, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New Calendar', new_calendar_path %>

View File

@@ -0,0 +1,5 @@
<h1>New calendar</h1>
<%= render 'form' %>
<%= link_to 'Back', calendars_path %>

View File

@@ -0,0 +1,15 @@
<p id="notice"><%= notice %></p>
<p>
<b>Name:</b>
<%= @calendar.name %>
</p>
<p>
<b>Public:</b>
<%= @calendar.public %>
</p>
<%= link_to 'Edit', edit_calendar_path(@calendar) %> |
<%= link_to 'Back', calendars_path %>