forked from bofh/fetsite
calendar feature generiert
This commit is contained in:
10
app/views/calendars/_form.html.erb
Normal file
10
app/views/calendars/_form.html.erb
Normal 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 %>
|
||||
6
app/views/calendars/edit.html.erb
Normal file
6
app/views/calendars/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing calendar</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @calendar %> |
|
||||
<%= link_to 'Back', calendars_path %>
|
||||
25
app/views/calendars/index.html.erb
Normal file
25
app/views/calendars/index.html.erb
Normal 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 %>
|
||||
5
app/views/calendars/new.html.erb
Normal file
5
app/views/calendars/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New calendar</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', calendars_path %>
|
||||
15
app/views/calendars/show.html.erb
Normal file
15
app/views/calendars/show.html.erb
Normal 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 %>
|
||||
12
app/views/calentries/_form.html.erb
Normal file
12
app/views/calentries/_form.html.erb
Normal file
@@ -0,0 +1,12 @@
|
||||
<%= semantic_form_for @calentry do |f| %>
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :start %>
|
||||
<%= f.input :ende %>
|
||||
<%= f.input :summary %>
|
||||
<%= f.input :typ %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
<%= f.action :submit, :as => :input %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
6
app/views/calentries/edit.html.erb
Normal file
6
app/views/calentries/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<h1>Editing calentry</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Show', @calentry %> |
|
||||
<%= link_to 'Back', calentries_path %>
|
||||
29
app/views/calentries/index.html.erb
Normal file
29
app/views/calentries/index.html.erb
Normal file
@@ -0,0 +1,29 @@
|
||||
<h1>Listing calentries</h1>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Start</th>
|
||||
<th>Ende</th>
|
||||
<th>Summary</th>
|
||||
<th>Typ</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
<% @calentries.each do |calentry| %>
|
||||
<tr>
|
||||
<td><%= calentry.start %></td>
|
||||
<td><%= calentry.ende %></td>
|
||||
<td><%= calentry.summary %></td>
|
||||
<td><%= calentry.typ %></td>
|
||||
<td><%= link_to 'Show', calentry %></td>
|
||||
<td><%= link_to 'Edit', edit_calentry_path(calentry) %></td>
|
||||
<td><%= link_to 'Destroy', calentry, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Calentry', new_calentry_path %>
|
||||
5
app/views/calentries/new.html.erb
Normal file
5
app/views/calentries/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>New calentry</h1>
|
||||
|
||||
<%= render 'form' %>
|
||||
|
||||
<%= link_to 'Back', calentries_path %>
|
||||
25
app/views/calentries/show.html.erb
Normal file
25
app/views/calentries/show.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Start:</b>
|
||||
<%= @calentry.start %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Ende:</b>
|
||||
<%= @calentry.ende %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Summary:</b>
|
||||
<%= @calentry.summary %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Typ:</b>
|
||||
<%= @calentry.typ %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_calentry_path(@calentry) %> |
|
||||
<%= link_to 'Back', calentries_path %>
|
||||
25
app/views/calentries/show.ics.erb
Normal file
25
app/views/calentries/show.ics.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Start:</b>
|
||||
<%= @calentry.start %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Ende:</b>
|
||||
<%= @calentry.ende %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Summary:</b>
|
||||
<%= @calentry.summary %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Typ:</b>
|
||||
<%= @calentry.typ %>
|
||||
</p>
|
||||
|
||||
|
||||
<%= link_to 'Edit', edit_calentry_path(@calentry) %> |
|
||||
<%= link_to 'Back', calentries_path %>
|
||||
Reference in New Issue
Block a user