summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/events/edit.html.erb48
-rw-r--r--app/views/events/index.html.erb36
-rw-r--r--app/views/events/new.html.erb47
-rw-r--r--app/views/events/show.html.erb48
-rw-r--r--app/views/layouts/events.html.erb17
-rw-r--r--app/views/layouts/occurrences.html.erb17
-rw-r--r--app/views/occurrences/edit.html.erb32
-rw-r--r--app/views/occurrences/index.html.erb28
-rw-r--r--app/views/occurrences/new.html.erb31
-rw-r--r--app/views/occurrences/show.html.erb28
10 files changed, 332 insertions, 0 deletions
diff --git a/app/views/events/edit.html.erb b/app/views/events/edit.html.erb
new file mode 100644
index 0000000..e40ac55
--- /dev/null
+++ b/app/views/events/edit.html.erb
@@ -0,0 +1,48 @@
1<h1>Editing event</h1>
2
3<% form_for(@event) do |f| %>
4 <%= f.error_messages %>
5
6 <p>
7 <%= f.label :start_time %><br />
8 <%= f.datetime_select :start_time %>
9 </p>
10 <p>
11 <%= f.label :end_time %><br />
12 <%= f.datetime_select :end_time %>
13 </p>
14 <p>
15 <%= f.label :rrule %><br />
16 <%= f.text_field :rrule %>
17 </p>
18 <p>
19 <%= f.label :custom_rrule %><br />
20 <%= f.check_box :custom_rrule %>
21 </p>
22 <p>
23 <%= f.label :allday %><br />
24 <%= f.check_box :allday %>
25 </p>
26 <p>
27 <%= f.label :url %><br />
28 <%= f.text_field :url %>
29 </p>
30 <p>
31 <%= f.label :latitude %><br />
32 <%= f.text_field :latitude %>
33 </p>
34 <p>
35 <%= f.label :longitude %><br />
36 <%= f.text_field :longitude %>
37 </p>
38 <p>
39 <%= f.label :node_id %><br />
40 <%= f.text_field :node_id %>
41 </p>
42 <p>
43 <%= f.submit 'Update' %>
44 </p>
45<% end %>
46
47<%= link_to 'Show', @event %> |
48<%= link_to 'Back', events_path %> \ No newline at end of file
diff --git a/app/views/events/index.html.erb b/app/views/events/index.html.erb
new file mode 100644
index 0000000..c1b5b48
--- /dev/null
+++ b/app/views/events/index.html.erb
@@ -0,0 +1,36 @@
1<h1>Listing events</h1>
2
3<table>
4 <tr>
5 <th>Start time</th>
6 <th>End time</th>
7 <th>Rrule</th>
8 <th>Custom rrule</th>
9 <th>Allday</th>
10 <th>Url</th>
11 <th>Latitude</th>
12 <th>Longitude</th>
13 <th>Node</th>
14 </tr>
15
16<% @events.each do |event| %>
17 <tr>
18 <td><%=h event.start_time %></td>
19 <td><%=h event.end_time %></td>
20 <td><%=h event.rrule %></td>
21 <td><%=h event.custom_rrule %></td>
22 <td><%=h event.allday %></td>
23 <td><%=h event.url %></td>
24 <td><%=h event.latitude %></td>
25 <td><%=h event.longitude %></td>
26 <td><%=h event.node_id %></td>
27 <td><%= link_to 'Show', event %></td>
28 <td><%= link_to 'Edit', edit_event_path(event) %></td>
29 <td><%= link_to 'Destroy', event, :confirm => 'Are you sure?', :method => :delete %></td>
30 </tr>
31<% end %>
32</table>
33
34<br />
35
36<%= link_to 'New event', new_event_path %> \ No newline at end of file
diff --git a/app/views/events/new.html.erb b/app/views/events/new.html.erb
new file mode 100644
index 0000000..0182b07
--- /dev/null
+++ b/app/views/events/new.html.erb
@@ -0,0 +1,47 @@
1<h1>New event</h1>
2
3<% form_for(@event) do |f| %>
4 <%= f.error_messages %>
5
6 <p>
7 <%= f.label :start_time %><br />
8 <%= f.datetime_select :start_time %>
9 </p>
10 <p>
11 <%= f.label :end_time %><br />
12 <%= f.datetime_select :end_time %>
13 </p>
14 <p>
15 <%= f.label :rrule %><br />
16 <%= f.text_field :rrule %>
17 </p>
18 <p>
19 <%= f.label :custom_rrule %><br />
20 <%= f.check_box :custom_rrule %>
21 </p>
22 <p>
23 <%= f.label :allday %><br />
24 <%= f.check_box :allday %>
25 </p>
26 <p>
27 <%= f.label :url %><br />
28 <%= f.text_field :url %>
29 </p>
30 <p>
31 <%= f.label :latitude %><br />
32 <%= f.text_field :latitude %>
33 </p>
34 <p>
35 <%= f.label :longitude %><br />
36 <%= f.text_field :longitude %>
37 </p>
38 <p>
39 <%= f.label :node_id %><br />
40 <%= f.text_field :node_id %>
41 </p>
42 <p>
43 <%= f.submit 'Create' %>
44 </p>
45<% end %>
46
47<%= link_to 'Back', events_path %> \ No newline at end of file
diff --git a/app/views/events/show.html.erb b/app/views/events/show.html.erb
new file mode 100644
index 0000000..699765d
--- /dev/null
+++ b/app/views/events/show.html.erb
@@ -0,0 +1,48 @@
1<p>
2 <b>Start time:</b>
3 <%=h @event.start_time %>
4</p>
5
6<p>
7 <b>End time:</b>
8 <%=h @event.end_time %>
9</p>
10
11<p>
12 <b>Rrule:</b>
13 <%=h @event.rrule %>
14</p>
15
16<p>
17 <b>Custom rrule:</b>
18 <%=h @event.custom_rrule %>
19</p>
20
21<p>
22 <b>Allday:</b>
23 <%=h @event.allday %>
24</p>
25
26<p>
27 <b>Url:</b>
28 <%=h @event.url %>
29</p>
30
31<p>
32 <b>Latitude:</b>
33 <%=h @event.latitude %>
34</p>
35
36<p>
37 <b>Longitude:</b>
38 <%=h @event.longitude %>
39</p>
40
41<p>
42 <b>Node:</b>
43 <%=h @event.node_id %>
44</p>
45
46
47<%= link_to 'Edit', edit_event_path(@event) %> |
48<%= link_to 'Back', events_path %> \ No newline at end of file
diff --git a/app/views/layouts/events.html.erb b/app/views/layouts/events.html.erb
new file mode 100644
index 0000000..93a6c0c
--- /dev/null
+++ b/app/views/layouts/events.html.erb
@@ -0,0 +1,17 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7 <title>Events: <%= controller.action_name %></title>
8 <%= stylesheet_link_tag 'scaffold' %>
9</head>
10<body>
11
12<p style="color: green"><%= flash[:notice] %></p>
13
14<%= yield %>
15
16</body>
17</html>
diff --git a/app/views/layouts/occurrences.html.erb b/app/views/layouts/occurrences.html.erb
new file mode 100644
index 0000000..ab4aca6
--- /dev/null
+++ b/app/views/layouts/occurrences.html.erb
@@ -0,0 +1,17 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
7 <title>Occurrences: <%= controller.action_name %></title>
8 <%= stylesheet_link_tag 'scaffold' %>
9</head>
10<body>
11
12<p style="color: green"><%= flash[:notice] %></p>
13
14<%= yield %>
15
16</body>
17</html>
diff --git a/app/views/occurrences/edit.html.erb b/app/views/occurrences/edit.html.erb
new file mode 100644
index 0000000..6a81188
--- /dev/null
+++ b/app/views/occurrences/edit.html.erb
@@ -0,0 +1,32 @@
1<h1>Editing occurrence</h1>
2
3<% form_for(@occurrence) do |f| %>
4 <%= f.error_messages %>
5
6 <p>
7 <%= f.label :summary %><br />
8 <%= f.text_field :summary %>
9 </p>
10 <p>
11 <%= f.label :start_time %><br />
12 <%= f.datetime_select :start_time %>
13 </p>
14 <p>
15 <%= f.label :end_time %><br />
16 <%= f.datetime_select :end_time %>
17 </p>
18 <p>
19 <%= f.label :node_id %><br />
20 <%= f.text_field :node_id %>
21 </p>
22 <p>
23 <%= f.label :event_id %><br />
24 <%= f.text_field :event_id %>
25 </p>
26 <p>
27 <%= f.submit 'Update' %>
28 </p>
29<% end %>
30
31<%= link_to 'Show', @occurrence %> |
32<%= link_to 'Back', occurrences_path %> \ No newline at end of file
diff --git a/app/views/occurrences/index.html.erb b/app/views/occurrences/index.html.erb
new file mode 100644
index 0000000..06dbf07
--- /dev/null
+++ b/app/views/occurrences/index.html.erb
@@ -0,0 +1,28 @@
1<h1>Listing occurrences</h1>
2
3<table>
4 <tr>
5 <th>Summary</th>
6 <th>Start time</th>
7 <th>End time</th>
8 <th>Node</th>
9 <th>Event</th>
10 </tr>
11
12<% @occurrences.each do |occurrence| %>
13 <tr>
14 <td><%=h occurrence.summary %></td>
15 <td><%=h occurrence.start_time %></td>
16 <td><%=h occurrence.end_time %></td>
17 <td><%=h occurrence.node_id %></td>
18 <td><%=h occurrence.event_id %></td>
19 <td><%= link_to 'Show', occurrence %></td>
20 <td><%= link_to 'Edit', edit_occurrence_path(occurrence) %></td>
21 <td><%= link_to 'Destroy', occurrence, :confirm => 'Are you sure?', :method => :delete %></td>
22 </tr>
23<% end %>
24</table>
25
26<br />
27
28<%= link_to 'New occurrence', new_occurrence_path %> \ No newline at end of file
diff --git a/app/views/occurrences/new.html.erb b/app/views/occurrences/new.html.erb
new file mode 100644
index 0000000..0a77af1
--- /dev/null
+++ b/app/views/occurrences/new.html.erb
@@ -0,0 +1,31 @@
1<h1>New occurrence</h1>
2
3<% form_for(@occurrence) do |f| %>
4 <%= f.error_messages %>
5
6 <p>
7 <%= f.label :summary %><br />
8 <%= f.text_field :summary %>
9 </p>
10 <p>
11 <%= f.label :start_time %><br />
12 <%= f.datetime_select :start_time %>
13 </p>
14 <p>
15 <%= f.label :end_time %><br />
16 <%= f.datetime_select :end_time %>
17 </p>
18 <p>
19 <%= f.label :node_id %><br />
20 <%= f.text_field :node_id %>
21 </p>
22 <p>
23 <%= f.label :event_id %><br />
24 <%= f.text_field :event_id %>
25 </p>
26 <p>
27 <%= f.submit 'Create' %>
28 </p>
29<% end %>
30
31<%= link_to 'Back', occurrences_path %> \ No newline at end of file
diff --git a/app/views/occurrences/show.html.erb b/app/views/occurrences/show.html.erb
new file mode 100644
index 0000000..9e831cf
--- /dev/null
+++ b/app/views/occurrences/show.html.erb
@@ -0,0 +1,28 @@
1<p>
2 <b>Summary:</b>
3 <%=h @occurrence.summary %>
4</p>
5
6<p>
7 <b>Start time:</b>
8 <%=h @occurrence.start_time %>
9</p>
10
11<p>
12 <b>End time:</b>
13 <%=h @occurrence.end_time %>
14</p>
15
16<p>
17 <b>Node:</b>
18 <%=h @occurrence.node_id %>
19</p>
20
21<p>
22 <b>Event:</b>
23 <%=h @occurrence.event_id %>
24</p>
25
26
27<%= link_to 'Edit', edit_occurrence_path(@occurrence) %> |
28<%= link_to 'Back', occurrences_path %> \ No newline at end of file