forked from bofh/fetsite
Calendar Klasse überarbeitet Views,gefixt, Pictures hinzugefügt
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<%= f.inputs do %>
|
||||
<%= f.input :name %>
|
||||
<%= f.input :public %>
|
||||
<%= f.input :picture, :as => :file %>
|
||||
<% end %>
|
||||
|
||||
<%= f.actions do %>
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
<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>
|
||||
<div class="media">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object img-circle" src="<%= calendar.picture.thumb.url %>"/>
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4><%= link_to calendar.name, calendar %></h4>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
|
||||
<%= link_to 'New Calendar', new_calendar_path %>
|
||||
|
||||
@@ -1,24 +1,30 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<p>
|
||||
<b>Name:</b>
|
||||
<%= @calendar.name %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<b>Public:</b>
|
||||
<%= @calendar.public %>
|
||||
</p>
|
||||
<p>
|
||||
<ul>
|
||||
<h1>
|
||||
<%= '<i class="icon-globe"></i>'.html_safe unless !@calendar.public%>
|
||||
<%= @calendar.name %>
|
||||
</h1>
|
||||
<div class="row-fluid">
|
||||
<ul class="list-group">
|
||||
<% @calendar.calentries.each do |entry| %>
|
||||
<%= entry.summary+ "- " + entry.start.to_s %>
|
||||
<li class="list-group-item">
|
||||
<%= link_to entry.summary+ " - " + I18n.l(entry.start), entry %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<%= calendar @calendar.calentries do |entry| %>
|
||||
<div><%= link_to entry.name, entry %></div>
|
||||
<% end %>
|
||||
|
||||
<%= link_to 'New Entry', new_calentry_path %>
|
||||
<%= link_to 'Edit', edit_calendar_path(@calendar) %> |
|
||||
<%= link_to 'Back', calendars_path %>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="btn-group">
|
||||
<%= link_to 'New Entry', new_calentry_path, {:class=>"btn"} %>
|
||||
<%= link_to 'Edit', edit_calendar_path(@calendar), {:class=>"btn"} %>
|
||||
<%= link_to 'Back', calendars_path, {:class=>"btn"} %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
3
app/views/calendars/show.ics.erb
Normal file
3
app/views/calendars/show.ics.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<% @calendar.calentries.each do |entry| %>
|
||||
<%= render entry %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user