cortex-reaver 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +25 -0
- data/README +48 -0
- data/bin/console +11 -0
- data/bin/cortex_reaver +110 -0
- data/bin/import.rb +78 -0
- data/lib/cortex_reaver.rb +114 -0
- data/lib/cortex_reaver/config.rb +21 -0
- data/lib/cortex_reaver/controller/comment.rb +113 -0
- data/lib/cortex_reaver/controller/config.rb +14 -0
- data/lib/cortex_reaver/controller/journal.rb +40 -0
- data/lib/cortex_reaver/controller/main.rb +56 -0
- data/lib/cortex_reaver/controller/page.rb +34 -0
- data/lib/cortex_reaver/controller/photograph.rb +45 -0
- data/lib/cortex_reaver/controller/project.rb +40 -0
- data/lib/cortex_reaver/controller/tag.rb +67 -0
- data/lib/cortex_reaver/controller/user.rb +71 -0
- data/lib/cortex_reaver/helper/activity.rb +9 -0
- data/lib/cortex_reaver/helper/attachments.rb +139 -0
- data/lib/cortex_reaver/helper/auth.rb +45 -0
- data/lib/cortex_reaver/helper/canonical.rb +55 -0
- data/lib/cortex_reaver/helper/crud.rb +317 -0
- data/lib/cortex_reaver/helper/date.rb +29 -0
- data/lib/cortex_reaver/helper/error.rb +14 -0
- data/lib/cortex_reaver/helper/feeds.rb +88 -0
- data/lib/cortex_reaver/helper/form.rb +114 -0
- data/lib/cortex_reaver/helper/navigation.rb +142 -0
- data/lib/cortex_reaver/helper/photographs.rb +25 -0
- data/lib/cortex_reaver/helper/tags.rb +47 -0
- data/lib/cortex_reaver/helper/workflow.rb +27 -0
- data/lib/cortex_reaver/migrations/001_users.rb +24 -0
- data/lib/cortex_reaver/migrations/002_pages.rb +29 -0
- data/lib/cortex_reaver/migrations/003_journals.rb +26 -0
- data/lib/cortex_reaver/migrations/004_photographs.rb +24 -0
- data/lib/cortex_reaver/migrations/005_projects.rb +27 -0
- data/lib/cortex_reaver/migrations/006_tags.rb +64 -0
- data/lib/cortex_reaver/migrations/007_comments.rb +40 -0
- data/lib/cortex_reaver/migrations/008_config.rb +23 -0
- data/lib/cortex_reaver/model/comment.rb +109 -0
- data/lib/cortex_reaver/model/journal.rb +53 -0
- data/lib/cortex_reaver/model/page.rb +87 -0
- data/lib/cortex_reaver/model/photograph.rb +133 -0
- data/lib/cortex_reaver/model/project.rb +49 -0
- data/lib/cortex_reaver/model/tag.rb +72 -0
- data/lib/cortex_reaver/model/user.rb +147 -0
- data/lib/cortex_reaver/public/css/admin.css +45 -0
- data/lib/cortex_reaver/public/css/custom.css +0 -0
- data/lib/cortex_reaver/public/css/form.css +51 -0
- data/lib/cortex_reaver/public/css/main.css +325 -0
- data/lib/cortex_reaver/public/css/photo.css +113 -0
- data/lib/cortex_reaver/public/css/ramaze_error.css +90 -0
- data/lib/cortex_reaver/public/css/text.css +25 -0
- data/lib/cortex_reaver/public/dispatch.fcgi +11 -0
- data/lib/cortex_reaver/public/images/CortexReaver.gif +0 -0
- data/lib/cortex_reaver/public/images/atom-xml-icon.png +0 -0
- data/lib/cortex_reaver/public/images/body.png +0 -0
- data/lib/cortex_reaver/public/images/border_bottom.png +0 -0
- data/lib/cortex_reaver/public/images/border_bottom_left.png +0 -0
- data/lib/cortex_reaver/public/images/border_bottom_right.png +0 -0
- data/lib/cortex_reaver/public/images/border_left.png +0 -0
- data/lib/cortex_reaver/public/images/border_right.png +0 -0
- data/lib/cortex_reaver/public/images/border_top.png +0 -0
- data/lib/cortex_reaver/public/images/border_top_left.png +0 -0
- data/lib/cortex_reaver/public/images/border_top_right.png +0 -0
- data/lib/cortex_reaver/public/images/comment.gif +0 -0
- data/lib/cortex_reaver/public/images/dark_trans.png +0 -0
- data/lib/cortex_reaver/public/images/delete.gif +0 -0
- data/lib/cortex_reaver/public/images/edit.gif +0 -0
- data/lib/cortex_reaver/public/images/header.png +0 -0
- data/lib/cortex_reaver/public/images/header.xcf +0 -0
- data/lib/cortex_reaver/public/images/header_background.png +0 -0
- data/lib/cortex_reaver/public/images/parent.gif +0 -0
- data/lib/cortex_reaver/public/images/rss-xml-icon.png +0 -0
- data/lib/cortex_reaver/public/images/sections.png +0 -0
- data/lib/cortex_reaver/public/images/sections_highlight.png +0 -0
- data/lib/cortex_reaver/public/js/admin.js +36 -0
- data/lib/cortex_reaver/public/js/cookie.js +27 -0
- data/lib/cortex_reaver/public/js/jquery.js +32 -0
- data/lib/cortex_reaver/public/js/photo.js +33 -0
- data/lib/cortex_reaver/snippets/array.rb +7 -0
- data/lib/cortex_reaver/snippets/ramaze/dispatcher/file.rb +37 -0
- data/lib/cortex_reaver/support/attachments.rb +235 -0
- data/lib/cortex_reaver/support/cached_rendering.rb +79 -0
- data/lib/cortex_reaver/support/canonical.rb +107 -0
- data/lib/cortex_reaver/support/comments.rb +69 -0
- data/lib/cortex_reaver/support/pagination.rb +38 -0
- data/lib/cortex_reaver/support/renderer.rb +196 -0
- data/lib/cortex_reaver/support/sequenceable.rb +248 -0
- data/lib/cortex_reaver/support/tags.rb +108 -0
- data/lib/cortex_reaver/support/timestamps.rb +33 -0
- data/lib/cortex_reaver/version.rb +8 -0
- data/lib/cortex_reaver/view/adminbox.rhtml +56 -0
- data/lib/cortex_reaver/view/blank_layout.rhtml +46 -0
- data/lib/cortex_reaver/view/comments/comment.rhtml +34 -0
- data/lib/cortex_reaver/view/comments/form.rhtml +25 -0
- data/lib/cortex_reaver/view/comments/list.rhtml +5 -0
- data/lib/cortex_reaver/view/comments/post_form.rhtml +36 -0
- data/lib/cortex_reaver/view/config/form.rhtml +10 -0
- data/lib/cortex_reaver/view/error.rhtml +72 -0
- data/lib/cortex_reaver/view/journals/form.rhtml +12 -0
- data/lib/cortex_reaver/view/journals/journal.rhtml +39 -0
- data/lib/cortex_reaver/view/journals/list.rhtml +33 -0
- data/lib/cortex_reaver/view/journals/short.rhtml +3 -0
- data/lib/cortex_reaver/view/journals/show.rhtml +5 -0
- data/lib/cortex_reaver/view/pages/form.rhtml +12 -0
- data/lib/cortex_reaver/view/pages/list.rhtml +26 -0
- data/lib/cortex_reaver/view/pages/show.rhtml +12 -0
- data/lib/cortex_reaver/view/photographs/atom_fragment.rhtml +82 -0
- data/lib/cortex_reaver/view/photographs/form.rhtml +19 -0
- data/lib/cortex_reaver/view/photographs/grid.rhtml +36 -0
- data/lib/cortex_reaver/view/photographs/list.rhtml +9 -0
- data/lib/cortex_reaver/view/photographs/short.rhtml +3 -0
- data/lib/cortex_reaver/view/photographs/show.rhtml +114 -0
- data/lib/cortex_reaver/view/photographs/sidebar.rhtml +7 -0
- data/lib/cortex_reaver/view/projects/form.rhtml +13 -0
- data/lib/cortex_reaver/view/projects/list.rhtml +27 -0
- data/lib/cortex_reaver/view/projects/show.rhtml +38 -0
- data/lib/cortex_reaver/view/tags/form.rhtml +9 -0
- data/lib/cortex_reaver/view/tags/list.rhtml +28 -0
- data/lib/cortex_reaver/view/tags/show.rhtml +51 -0
- data/lib/cortex_reaver/view/text_layout.rhtml +78 -0
- data/lib/cortex_reaver/view/users/form.rhtml +16 -0
- data/lib/cortex_reaver/view/users/list.rhtml +38 -0
- data/lib/cortex_reaver/view/users/login.rhtml +13 -0
- data/lib/cortex_reaver/view/users/register.rhtml +13 -0
- data/lib/cortex_reaver/view/users/show.rhtml +37 -0
- data/lib/cortex_reaver/view/users/user.rhtml +35 -0
- data/lib/proto/cortex_reaver.yaml +28 -0
- metadata +285 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
<h2><%= @form_action[/\/new$/] ? 'New' : 'Edit' %> Photograph</h2>
|
2
|
+
|
3
|
+
<%= errors_on @photograph %>
|
4
|
+
|
5
|
+
<form class="edit-form" action="<%= Rs(@form_action) %>" method="post" enctype="multipart/form-data">
|
6
|
+
<%= form_p :title, :model => @photograph %>
|
7
|
+
<%= live_name_field @photograph %>
|
8
|
+
<%= live_tags_field @photograph %>
|
9
|
+
<p>
|
10
|
+
<label for="image">Image:</label>
|
11
|
+
<input id="image" name="image" size="30" type="file" />
|
12
|
+
</p>
|
13
|
+
<p>
|
14
|
+
<label for="infer_date">Infer date from EXIF tag?</label>
|
15
|
+
<input id="infer_date" name="infer_date" type="checkbox" value="1" checked="checked" />
|
16
|
+
</p>
|
17
|
+
|
18
|
+
<input type="submit" name="submit" />
|
19
|
+
</form>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<% columns = 4 %>
|
2
|
+
<% i = 0 %>
|
3
|
+
<table class="photographs grid">
|
4
|
+
<tr>
|
5
|
+
<% @photographs.all.each do |photograph| %>
|
6
|
+
<td>
|
7
|
+
<table class="thumbnail frame" cellspacing="0" cellpadding="0">
|
8
|
+
<tr>
|
9
|
+
<td class="border_top_left"></td>
|
10
|
+
<td class="border_top"></td>
|
11
|
+
<td class="border_top_right"></td>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<td class="border_left"></td>
|
15
|
+
<td id="photograph_<%= photograph.name %>" class="content">
|
16
|
+
<a href="<%= photograph.url %>">
|
17
|
+
<img src="<%= photograph.thumbnail_public_path %>" class="grid thumbnail" alt="<%=h photograph.title %>" />
|
18
|
+
</a>
|
19
|
+
</td>
|
20
|
+
<td class="border_right"></td>
|
21
|
+
</tr>
|
22
|
+
<tr>
|
23
|
+
<td class="border_bottom_left"></td>
|
24
|
+
<td class="border_bottom"></td>
|
25
|
+
<td class="border_bottom_right"></td>
|
26
|
+
</tr>
|
27
|
+
</table>
|
28
|
+
</td>
|
29
|
+
<% if (i += 1) == 4 %>
|
30
|
+
</tr>
|
31
|
+
<tr>
|
32
|
+
<% i = 0 %>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
</tr>
|
36
|
+
</table>
|
@@ -0,0 +1,114 @@
|
|
1
|
+
<table class="photo frame" cellspacing="0" cellpadding="0">
|
2
|
+
<tr>
|
3
|
+
<td class="border_top_left"></td>
|
4
|
+
<td class="border_top"></td>
|
5
|
+
<td class="border_top_right"></td>
|
6
|
+
</tr>
|
7
|
+
<tr>
|
8
|
+
<td class="border_left"></td>
|
9
|
+
<td id="photograph_<%= @photograph.name %>" class="content">
|
10
|
+
<div id="canvas">
|
11
|
+
<div id="bar">
|
12
|
+
<ul class="actions">
|
13
|
+
<% if previous_photo = @photograph.previous %>
|
14
|
+
<li>
|
15
|
+
<%= A('« Previous', :href => previous_photo.url) %>
|
16
|
+
</li>
|
17
|
+
<% end %>
|
18
|
+
<li>
|
19
|
+
<a href="<%= @photograph.absolute_window_url %>">Back to Thumbnails</a>
|
20
|
+
</li>
|
21
|
+
<% if admin? %>
|
22
|
+
<li>
|
23
|
+
<%= A('Edit', :href => Rs(:edit, @photograph.name)) %>
|
24
|
+
</li>
|
25
|
+
<% end %>
|
26
|
+
<% if next_photo = @photograph.next %>
|
27
|
+
<li>
|
28
|
+
<%= A('Next »', :href => next_photo.url) %>
|
29
|
+
</li>
|
30
|
+
<% end %>
|
31
|
+
</ul>
|
32
|
+
</div>
|
33
|
+
<script type="text/javascript">
|
34
|
+
/* <![CDATA[ */
|
35
|
+
$('#bar').css('margin-bottom', -1 * $('#bar').height());
|
36
|
+
/* ]]> */
|
37
|
+
</script>
|
38
|
+
|
39
|
+
<img src="<%= @photograph.full_public_path %>" id="photo" alt="<%= attr_h @photograph.title %>" title="<%= attr_h @photograph.title %>" />
|
40
|
+
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<h2>
|
44
|
+
<% if previous_photo %>
|
45
|
+
<%= A('«', :href => previous_photo.url) %>
|
46
|
+
<% end %>
|
47
|
+
<%=h @photograph.title %>
|
48
|
+
<% if next_photo %>
|
49
|
+
<%= A('»', :href => next_photo.url) %>
|
50
|
+
<% end %>
|
51
|
+
</h2>
|
52
|
+
<div class="byline">
|
53
|
+
<div class="description"><%= description_of @photograph %></div>
|
54
|
+
<% unless @photograph.tags.empty? %>
|
55
|
+
<div class="tags"><%= tags_on @photograph %></div>
|
56
|
+
<% end %>
|
57
|
+
</div>
|
58
|
+
</td>
|
59
|
+
<td class="border_right"></td>
|
60
|
+
</tr>
|
61
|
+
<tr>
|
62
|
+
<td class="border_bottom_left"></td>
|
63
|
+
<td class="border_bottom"></td>
|
64
|
+
<td class="border_bottom_right"></td>
|
65
|
+
</tr>
|
66
|
+
</table>
|
67
|
+
|
68
|
+
<% unless @photograph.comments.empty? %>
|
69
|
+
<table class="text frame" cellspacing="0" cellpadding="0">
|
70
|
+
<tr>
|
71
|
+
<td class="border_top_left"></td>
|
72
|
+
<td class="border_top"></td>
|
73
|
+
<td class="border_top_right"></td>
|
74
|
+
</tr>
|
75
|
+
<tr>
|
76
|
+
<td class="border_left"></td>
|
77
|
+
<td class="content">
|
78
|
+
<div class="comments">
|
79
|
+
<a id="comments"></a>
|
80
|
+
<% @photograph.comments_dataset.order(:created_on).all.each do |comment| %>
|
81
|
+
<%= render_template '../comments/comment.rhtml', 'comment' => comment %>
|
82
|
+
<% end %>
|
83
|
+
</div>
|
84
|
+
|
85
|
+
</td>
|
86
|
+
<td class="border_right"></td>
|
87
|
+
</tr>
|
88
|
+
<tr>
|
89
|
+
<td class="border_bottom_left"></td>
|
90
|
+
<td class="border_bottom"></td>
|
91
|
+
<td class="border_bottom_right"></td>
|
92
|
+
</tr>
|
93
|
+
</table>
|
94
|
+
<% end %>
|
95
|
+
|
96
|
+
<table class="text frame" cellspacing="0" cellpadding="0">
|
97
|
+
<tr>
|
98
|
+
<td class="border_top_left"></td>
|
99
|
+
<td class="border_top"></td>
|
100
|
+
<td class="border_top_right"></td>
|
101
|
+
</tr>
|
102
|
+
<tr>
|
103
|
+
<td class="border_left"></td>
|
104
|
+
<td class="content">
|
105
|
+
<%= render_template '../comments/post_form.rhtml', 'comment' => @new_comment %>
|
106
|
+
</td>
|
107
|
+
<td class="border_right"></td>
|
108
|
+
</tr>
|
109
|
+
<tr>
|
110
|
+
<td class="border_bottom_left"></td>
|
111
|
+
<td class="border_bottom"></td>
|
112
|
+
<td class="border_bottom_right"></td>
|
113
|
+
</tr>
|
114
|
+
</table>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<% @photographs.all.each do |photograph| %>
|
2
|
+
<div class="box" id="photograph_<%= photograph.name %>">
|
3
|
+
<a href="<%= photograph.url %>">
|
4
|
+
<img src="<%= photograph.thumbnail_public_path %>" class="grid thumbnail" alt="<%=h photograph.title %>" />
|
5
|
+
</a>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<h2><%= @form_action[/\/new$/] ? 'New' : 'Edit' %> Project</h2>
|
2
|
+
|
3
|
+
<%= errors_on @project %>
|
4
|
+
|
5
|
+
<form class="edit-form" action="<%= Rs(@form_action) %>" method="post" enctype="multipart/form-data">
|
6
|
+
<%= form_p 'title', :model => @project %>
|
7
|
+
<%= live_name_field @project %>
|
8
|
+
<%= live_tags_field @project %>
|
9
|
+
<%= form_p :description, :model => @project %>
|
10
|
+
<%= form_p :body, :model => @project, :type => 'textarea' %>
|
11
|
+
<%= attachment_form @project %>
|
12
|
+
<input type="submit" name="submit" />
|
13
|
+
</form>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div class="projects">
|
2
|
+
<h2>Projects</h2>
|
3
|
+
<table>
|
4
|
+
<thead>
|
5
|
+
<tr>
|
6
|
+
<th>Title</th>
|
7
|
+
<th>Description</th>
|
8
|
+
<% if admin? %>
|
9
|
+
<th></th>
|
10
|
+
<th></th>
|
11
|
+
<% end %>
|
12
|
+
</tr>
|
13
|
+
</thead>
|
14
|
+
<tbody>
|
15
|
+
<% @projects.each do |project| %>
|
16
|
+
<tr>
|
17
|
+
<td><%= A(project.title, :href => project.url) %></td>
|
18
|
+
<td><%= project.description %></td>
|
19
|
+
<% if admin? %>
|
20
|
+
<td><a href="/projects/edit/<%= project.name %>">Edit</a></td>
|
21
|
+
<td><%= A 'Delete', :href => "/projects/delete/#{project.name}", :onclick => "return confirm('Are you sure you want to delete this project?');" %></td>
|
22
|
+
<% end %>
|
23
|
+
</tr>
|
24
|
+
<% end %>
|
25
|
+
</tbody>
|
26
|
+
</table>
|
27
|
+
</div>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<div class="project text-entry">
|
2
|
+
<h2><a id="project_<%= @project.name %>" href="<%= @project.url %>"><%=h @project.title %></a></h2>
|
3
|
+
<div class="byline">
|
4
|
+
<span class="written">
|
5
|
+
<%= user_link @project.user %> on <%= date_line @project %>
|
6
|
+
</span>
|
7
|
+
<%= tags_on @project %>
|
8
|
+
</div>
|
9
|
+
<div class="body">
|
10
|
+
<%= @project.body_cache %>
|
11
|
+
</div>
|
12
|
+
<%= attachment_list @project %>
|
13
|
+
<div class="footer">
|
14
|
+
<ul class="actions">
|
15
|
+
<li><a href="<%= @project.url %>#comments">
|
16
|
+
<img src="/images/comment.gif" class="icon" alt="comment" />
|
17
|
+
<%= @project.comment_count %> <%= @project.comment_count == 1 ? 'comment' : 'comments' %>
|
18
|
+
</a></li>
|
19
|
+
<% if admin? %>
|
20
|
+
<li><a href="/projects/edit/<%= @project.name %>">
|
21
|
+
<img src="/images/edit.gif" class="icon" alt="edit" /> Edit
|
22
|
+
</a></li>
|
23
|
+
<li><%= A '<img src="/images/delete.gif" class="icon" alt="delete" /> Delete', :href => "/projects/delete/#{@project.name}", :onclick => "return confirm('Are you sure you want to delete this project?');" %></li>
|
24
|
+
<% end %>
|
25
|
+
</ul>
|
26
|
+
</div>
|
27
|
+
|
28
|
+
<% unless @hide_comments %>
|
29
|
+
<div class="comments">
|
30
|
+
<a id="comments" />
|
31
|
+
<% @project.comments_dataset.order(:created_on).all.each do |comment| %>
|
32
|
+
<%= render_template '../comments/comment.rhtml', 'comment' => comment %>
|
33
|
+
<% end %>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<%= render_template '../comments/post_form.rhtml', 'comment' => @new_comment %>
|
37
|
+
<% end %>
|
38
|
+
</div>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<h2><%= @form_action[/\/new$/] ? 'New' : 'Edit' %> Tag</h2>
|
2
|
+
|
3
|
+
<%= errors_on @tag %>
|
4
|
+
|
5
|
+
<form class="edit-form" action="<%= Rs(@form_action) %>" method="post">
|
6
|
+
<%= form_p 'title', :model => @tag %>
|
7
|
+
<%= live_name_field @tag %>
|
8
|
+
<input type="submit" name="submit" />
|
9
|
+
</form>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<div class="tags">
|
2
|
+
<h2>Tags</h2>
|
3
|
+
<table>
|
4
|
+
<thead>
|
5
|
+
<tr>
|
6
|
+
<th>Tag</th>
|
7
|
+
<% if admin? %>
|
8
|
+
<th></th>
|
9
|
+
<th></th>
|
10
|
+
<% end %>
|
11
|
+
<th>Popularity</th>
|
12
|
+
</tr>
|
13
|
+
</thead>
|
14
|
+
<tbody>
|
15
|
+
<% max_count = (@tags.order(:count).reverse.first || []).count %>
|
16
|
+
<% @tags.each do |tag| %>
|
17
|
+
<tr>
|
18
|
+
<td class="title"><%= A(tag.title, :href => tag.url) %></td>
|
19
|
+
<% if admin? %>
|
20
|
+
<td><a href="/tags/edit/<%= tag.name %>">Edit</a></td>
|
21
|
+
<td><%= A 'Delete', :href => "/tags/delete/#{tag.name}", :onclick => "return confirm('Are you sure you want to delete this tag?');" %></td>
|
22
|
+
<% end %>
|
23
|
+
<td class="count" style="width: <%= admin? ? 60 : 80 %>%"><div class="percent-bar" style="width: <%= tag.count.to_f / max_count * 100 %>%"><%= tag.count %></div></td>
|
24
|
+
</tr>
|
25
|
+
<% end %>
|
26
|
+
</tbody>
|
27
|
+
</table>
|
28
|
+
</div>
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<div class="tag">
|
2
|
+
<h2><%= h @title %></h2>
|
3
|
+
<div class="body">
|
4
|
+
<% unless (pages = CortexReaver::Page.tagged_with(@tags)).empty? %>
|
5
|
+
<div class="pages">
|
6
|
+
<h3>Pages</h3>
|
7
|
+
<ul>
|
8
|
+
<% pages.each do |page| %>
|
9
|
+
<li><%= A(page.title, :href => page.url) %></li>
|
10
|
+
<% end %>
|
11
|
+
</ul>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
14
|
+
<% unless (projects = CortexReaver::Project.tagged_with(@tags)).empty? %>
|
15
|
+
<div class="projects">
|
16
|
+
<h3>Projects</h3>
|
17
|
+
<ul>
|
18
|
+
<% projects.each do |project| %>
|
19
|
+
<li><%= A(project.title, :href => project.url) %></li>
|
20
|
+
<% end %>
|
21
|
+
</ul>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
24
|
+
<% unless (journals = CortexReaver::Journal.tagged_with(@tags)).empty? %>
|
25
|
+
<div class="journals">
|
26
|
+
<h3>Journals</h3>
|
27
|
+
<ul>
|
28
|
+
<% journals.each do |journal| %>
|
29
|
+
<li><%= A(journal.title, :href => journal.url) %></li>
|
30
|
+
<% end %>
|
31
|
+
</ul>
|
32
|
+
</div>
|
33
|
+
<% end %>
|
34
|
+
<% unless (photographs = CortexReaver::Photograph.tagged_with(@tags)).empty? %>
|
35
|
+
<div class="photographs">
|
36
|
+
<h3>Photographs</h3>
|
37
|
+
<%= render_template '../photographs/grid.rhtml', :photographs => photographs %>
|
38
|
+
</div>
|
39
|
+
<% end %>
|
40
|
+
</div>
|
41
|
+
<div class="footer">
|
42
|
+
<ul class="actions">
|
43
|
+
<% if admin? and @tags.size == 1 %>
|
44
|
+
<li><a href="/tags/edit/<%= @tags.first.name %>">
|
45
|
+
<img src="/images/edit.gif" class="icon" alt="comment" /> Edit
|
46
|
+
</a></li>
|
47
|
+
<li><%= A '<img src="/images/delete.gif" class="icon" alt="delete" /> Delete', :href => "/tags/delete/#{@tags.first.name}", :onclick => "return confirm('Are you sure you want to delete this tag?');" %></li>
|
48
|
+
<% end %>
|
49
|
+
</ul>
|
50
|
+
</div>
|
51
|
+
</div>
|
@@ -0,0 +1,78 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
|
+
<head>
|
6
|
+
<title><%=h (@title || CortexReaver.config[:site][:name]) %></title>
|
7
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
8
|
+
<meta http-equiv="Content-Style-Type" content="text/css" />
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
|
+
<meta http-equiv="expires" content="0" />
|
11
|
+
<meta name="description" content="<%=attr_h CortexReaver.config[:site][:description] %>" />
|
12
|
+
<meta name="generator" content="Cortex Reaver <%= CortexReaver::APP_VERSION %>" />
|
13
|
+
<meta name="keywords" content="<%= attr_h CortexReaver.config[:site][:keywords] %>" />
|
14
|
+
<meta name="author" content="<%= attr_h CortexReaver.config[:site][:author] %>" />
|
15
|
+
<meta name="date" content="<%= Time.now.iso8601 %>" />
|
16
|
+
<link rel="stylesheet" type="text/css" href="/css/main.css" />
|
17
|
+
<link rel="stylesheet" type="text/css" href="/css/admin.css" />
|
18
|
+
<link rel="stylesheet" type="text/css" href="/css/photo.css" />
|
19
|
+
<link rel="stylesheet" type="text/css" href="/css/text.css" />
|
20
|
+
<link rel="stylesheet" type="text/css" href="/css/form.css" />
|
21
|
+
<link rel="stylesheet" type="text/css" href="/css/custom.css" />
|
22
|
+
<% if @feeds %>
|
23
|
+
<% @feeds.each do |title, feed| %>
|
24
|
+
<link rel="alternate" type="application/atom+xml" href="<%= attr_h feed %>" title="<%= attr_h title %>" />
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<script type="text/javascript" src="/js/jquery.js"></script>
|
30
|
+
<script type="text/javascript" defer="defer" src="/js/cookie.js"></script>
|
31
|
+
<script type="text/javascript" defer="defer" src="/js/admin.js"></script>
|
32
|
+
|
33
|
+
<div id="top">
|
34
|
+
<a href="/">
|
35
|
+
<img id="header" src="/images/header.png" alt="Aphyr" />
|
36
|
+
</a>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="sections">
|
40
|
+
<ul>
|
41
|
+
<li><a href="/journals">Journal</a></li>
|
42
|
+
<li><a href="/photographs">Photography</a></li>
|
43
|
+
<li><a href="/projects">Projects</a></li>
|
44
|
+
<li><a href="/tags">Tags</a></li>
|
45
|
+
<li><a href="/comments">Comments</a></li>
|
46
|
+
<li><a href="/about">About</a></li>
|
47
|
+
</ul>
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<div id="middle">
|
51
|
+
<table id="columns">
|
52
|
+
<tbody>
|
53
|
+
<tr>
|
54
|
+
<td id="main">
|
55
|
+
<%= render_template "adminbox.rhtml" %>
|
56
|
+
|
57
|
+
<%= flashbox %>
|
58
|
+
|
59
|
+
<div id="content">
|
60
|
+
<%= @content %>
|
61
|
+
</div>
|
62
|
+
</td>
|
63
|
+
|
64
|
+
<% if @sidebar %>
|
65
|
+
<td id="sidebar">
|
66
|
+
<%= @sidebar %>
|
67
|
+
</td>
|
68
|
+
<% end %>
|
69
|
+
</tr>
|
70
|
+
</tbody>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<div id="colophon">
|
75
|
+
Copyright © 2001—<%= Time.now.strftime('%Y') %> <%=h CortexReaver.config[:site][:author] %>
|
76
|
+
</div>
|
77
|
+
</body>
|
78
|
+
</html>
|