simple_calendar, calender_show_view

Kalender in Tabellenansicht
This commit is contained in:
2013-08-08 09:09:34 +02:00
parent ae75459d58
commit b329fa4896
5 changed files with 15 additions and 3 deletions

View File

@@ -75,3 +75,5 @@ group :development, :test do
gem 'factory_girl_rails' gem 'factory_girl_rails'
gem 'rspec-rails' gem 'rspec-rails'
end end
gem "simple_calendar", "~> 0.1.9"

View File

@@ -18,7 +18,7 @@ class CalentriesController < ApplicationController
respond_to do |format| respond_to do |format|
format.html # show.html.erb format.html # show.html.erb
format.json { render json: @calentry } format.json { render json: @calentry }
format.ics { render 'show.ics.erb',} format.ics { render 'show.ics.erb'}
end end
end end

View File

@@ -9,7 +9,16 @@
<b>Public:</b> <b>Public:</b>
<%= @calendar.public %> <%= @calendar.public %>
</p> </p>
<p>
<ul>
<% @calendar.calentries.each do |entry| %>
<%= entry.summary+ "- " + entry.start.to_s %>
<% end %>
<%= 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 'Edit', edit_calendar_path(@calendar) %> |
<%= link_to 'Back', calendars_path %> <%= link_to 'Back', calendars_path %>

View File

@@ -3,6 +3,7 @@
<%= f.input :start %> <%= f.input :start %>
<%= f.input :ende %> <%= f.input :ende %>
<%= f.input :summary %> <%= f.input :summary %>
<%= f.input :calendar, :as=> :radio %>
<%= f.input :typ %> <%= f.input :typ %>
<% end %> <% end %>

View File

@@ -4,8 +4,8 @@
</li> </li>
<li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li> <li><%= link_to I18n.t(:news,:scope=>'home' ),rubriken_path %></li>
<li><%= link_to I18n.t(:info,:scope=>'home' ) %></li> <li><%= link_to I18n.t(:info,:scope=>'home' ) %></li>
<li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %> <li><%= link_to I18n.t(:studien,:scope=>'home' ), studien_path %></li>
</li> <li><%= link_to "Kalender", calendars_path %></li>
<li><%= link_to "wiki intern", page_path(1) %> <li><%= link_to "wiki intern", page_path(1) %>
</li> </li>
</ul> </ul>