EliteJournal 1.9.400
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +1 -0
- data/MIT-LICENSE +21 -0
- data/README +22 -0
- data/app/controllers/account_controller.rb +25 -0
- data/app/controllers/application.rb +83 -0
- data/app/controllers/atom_controller.rb +26 -0
- data/app/controllers/auth_controller.rb +23 -0
- data/app/controllers/backend_controller.rb +14 -0
- data/app/controllers/css_controller.rb +31 -0
- data/app/controllers/draft_controller.rb +62 -0
- data/app/controllers/image_controller.rb +11 -0
- data/app/controllers/journal_controller.rb +53 -0
- data/app/controllers/link_controller.rb +29 -0
- data/app/controllers/ping_controller.rb +44 -0
- data/app/controllers/post_controller.rb +131 -0
- data/app/controllers/rss_controller.rb +22 -0
- data/app/controllers/tags_controller.rb +74 -0
- data/app/controllers/user_controller.rb +30 -0
- data/app/controllers/users_controller.rb +13 -0
- data/app/helpers/account_helper.rb +2 -0
- data/app/helpers/application_helper.rb +117 -0
- data/app/helpers/atom_helper.rb +2 -0
- data/app/helpers/auth_helper.rb +2 -0
- data/app/helpers/backend_helper.rb +2 -0
- data/app/helpers/css_helper.rb +2 -0
- data/app/helpers/draft_helper.rb +2 -0
- data/app/helpers/image_helper.rb +2 -0
- data/app/helpers/journal_helper.rb +2 -0
- data/app/helpers/link_helper.rb +2 -0
- data/app/helpers/ping_helper.rb +5 -0
- data/app/helpers/post_helper.rb +2 -0
- data/app/helpers/rss_helper.rb +5 -0
- data/app/helpers/tags_helper.rb +7 -0
- data/app/helpers/user_helper.rb +2 -0
- data/app/helpers/users_helper.rb +2 -0
- data/app/models/blogger_api.rb +24 -0
- data/app/models/comment.rb +18 -0
- data/app/models/draft.rb +12 -0
- data/app/models/face.rb +24 -0
- data/app/models/feed_killer.rb +17 -0
- data/app/models/image.rb +7 -0
- data/app/models/link.rb +10 -0
- data/app/models/meta_weblog_api.rb +82 -0
- data/app/models/ping.rb +16 -0
- data/app/models/post.rb +30 -0
- data/app/models/stylesheet.rb +7 -0
- data/app/models/tag.rb +16 -0
- data/app/models/user.rb +35 -0
- data/app/views/account/info.rhtml +30 -0
- data/app/views/atom/feed.rxml +15 -0
- data/app/views/auth/login.rhtml +9 -0
- data/app/views/css/edit.rhtml +18 -0
- data/app/views/css/list.rhtml +24 -0
- data/app/views/css/new.rhtml +6 -0
- data/app/views/draft/edit.rhtml +9 -0
- data/app/views/draft/list.rhtml +22 -0
- data/app/views/draft/new.rhtml +9 -0
- data/app/views/journal/_comment.rhtml +10 -0
- data/app/views/journal/_post.rhtml +40 -0
- data/app/views/journal/_trackback.rhtml +4 -0
- data/app/views/journal/error.rhtml +1 -0
- data/app/views/journal/index.rhtml +1 -0
- data/app/views/journal/view.rhtml +15 -0
- data/app/views/layouts/application.rhtml +90 -0
- data/app/views/link/list.rhtml +19 -0
- data/app/views/link/new.rhtml +7 -0
- data/app/views/ping/trackback.rxml +4 -0
- data/app/views/post/_reply.rhtml +10 -0
- data/app/views/post/destroyxml.rxml +3 -0
- data/app/views/post/edit.rhtml +7 -0
- data/app/views/post/new.rhtml +13 -0
- data/app/views/post/postxml.rxml +7 -0
- data/app/views/post/reply.rhtml +33 -0
- data/app/views/post/replyxml.rxml +5 -0
- data/app/views/post/toggle_commentingxml.rxml +9 -0
- data/app/views/rss/index.rxml +15 -0
- data/app/views/tags/addxml.rxml +4 -0
- data/app/views/tags/index.rhtml +3 -0
- data/app/views/tags/no_completions.rhtml +1 -0
- data/app/views/tags/search.rhtml +10 -0
- data/app/views/tags/search_completer.rhtml +1 -0
- data/app/views/user/list.rhtml +21 -0
- data/app/views/user/new.rhtml +12 -0
- data/app/views/users/index.rhtml +6 -0
- data/config/app.yml +15 -0
- data/config/database.yml +17 -0
- data/config/environment.rb +58 -0
- data/config/environments/development.rb +5 -0
- data/config/environments/geminstall.rb +4 -0
- data/config/environments/production.rb +3 -0
- data/config/environments/shared.rb +17 -0
- data/config/environments/test.rb +3 -0
- data/db/db-mysql.sql +95 -0
- data/db/db-postgresql.sql +94 -0
- data/db/db-sqlite.sql +94 -0
- data/db/default_user.sql +1 -0
- data/db/development_structure.sql +257 -0
- data/elitejournal +132 -0
- data/lib/image_size.rb +277 -0
- data/lib/trackback.rb +45 -0
- data/public/404.html +6 -0
- data/public/500.html +6 -0
- data/public/dispatch.cgi +10 -0
- data/public/dispatch.fcgi +7 -0
- data/public/dispatch.rb +10 -0
- data/public/stylesheets/ej-layout.css +126 -0
- data/public/stylesheets/ej-style.css +105 -0
- data/public/stylesheets/undohtml.css +9 -0
- metadata +178 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= error_messages_for 'draft' %>
|
2
|
+
<%= form_tag %>
|
3
|
+
<p><label for="draft_subject">Subject</label><br />
|
4
|
+
<%= input('draft', 'subject') %></p>
|
5
|
+
<p><label for="tb_url">TrackBack To</label><br />
|
6
|
+
<input type="text" name="tb_url" id="tb_url" /></p>
|
7
|
+
<p><%= text_area('draft', 'body') %></p>
|
8
|
+
<p><input id="draft_submit" type="submit" value="Save Draft" /></p>
|
9
|
+
<%= end_form_tag %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<table id="drafttable">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th>Drafted On</th>
|
5
|
+
<th>Subject</th>
|
6
|
+
<th> </th>
|
7
|
+
</tr>
|
8
|
+
</thead>
|
9
|
+
<tbody>
|
10
|
+
<% @drafts.each do |draft| -%>
|
11
|
+
<tr>
|
12
|
+
<td><%= draft.created_at %></td>
|
13
|
+
<td><%= draft.subject %></td>
|
14
|
+
<td><%= link_to 'Edit', :controller => 'draft', :action => 'edit', :id => draft.id %>
|
15
|
+
<%= link_to 'Delete', :controller => 'draft', :action => 'destroy', :id => draft.id %>
|
16
|
+
<%= link_to 'Post', :controller => 'draft', :action => 'post', :id => draft.id %>
|
17
|
+
</td>
|
18
|
+
</tr>
|
19
|
+
<% end -%>
|
20
|
+
</tbody>
|
21
|
+
</table>
|
22
|
+
<p><%= link_to 'Create New Draft', :controller => 'draft', :action => 'new' %></p>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= error_messages_for 'draft' %>
|
2
|
+
<%= form_tag %>
|
3
|
+
<p><label for="draft_subject">Subject</label><br />
|
4
|
+
<%= input('draft', 'subject') %></p>
|
5
|
+
<p><label for="tb_url">TrackBack To</label><br />
|
6
|
+
<%= input('draft', 'tb_url') %></p>
|
7
|
+
<p><%= text_area('draft', 'body') %></p>
|
8
|
+
<p><input id="draft_submit" type="submit" value="Save Draft" /></p>
|
9
|
+
<%= end_form_tag %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<div class="comment">
|
2
|
+
<a name="comment_<%= comment.id %>"></a>
|
3
|
+
<b><%= comment.subject %></b> (<%= link_to('Reply', :controller => 'post', :action => 'reply', :id => comment.post_id, :params => {'comment_id' => comment.id }) %>) <% if owns_post?(comment.post) %>(<%= link_to 'Delete', :controller => 'post', :action => 'destroy_comment', :id => comment.id %>)<% end %><br />
|
4
|
+
Posted <%= distance_of_time_in_words comment.post.created_at, comment.created_at %> later by <em><%= comment.posted_by %></em><br /><br />
|
5
|
+
<%= comment.rendered %>
|
6
|
+
|
7
|
+
<% comment.comments.each do |c| -%>
|
8
|
+
<%= render_partial 'comment', c %>
|
9
|
+
<% end -%>
|
10
|
+
</div>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<!--
|
2
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
3
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
4
|
+
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
|
5
|
+
<rdf:Description
|
6
|
+
rdf:about="<%= url_for :controller => 'journal', :action => 'view', :id => post.id %>"
|
7
|
+
dc:identifier="<%= url_for :controller => 'journal', :action => 'view', :id => post.id %>"
|
8
|
+
dc:title="<%= post.subject %>"
|
9
|
+
trackback:ping="<%= url_for :controller => 'ping', :action => 'trackback', :id => post.id, :only_path => false %>" />
|
10
|
+
</rdf:RDF>
|
11
|
+
-->
|
12
|
+
<div class="postsubject" id="postsubject_<%= post.id %>"><h2><%= post.subject %></h2></div>
|
13
|
+
<div id="postdiv_<%= post.id %>" class="post">
|
14
|
+
<div class="face"><%= user_face(post.user) %></div>
|
15
|
+
|
16
|
+
<ul class="postdata" id="postdata_<%= post.id %>">
|
17
|
+
<li>Posted by <%= link_user(post.user) %> on <%= sexifytime post.created_at %>.</li>
|
18
|
+
<% if post.has_tags? %><li id="posttags_<%= post.id %>">Tags: <%= tag_links(post) %></li><% end %>
|
19
|
+
<li>Trackback URL: <%= url_for :controller => 'ping', :action => 'trackback', :id => post.id, :only_path => false %></li>
|
20
|
+
<% if owns_post?(post) -%>
|
21
|
+
<li>Admin <%= link_to('Edit', {:controller => 'post', :action => 'edit', :id => post.id}, {'onclick' => "return setupEditInPlace('#{post.id}')"}) %> <%= link_to('Delete', {:controller => 'post', :action => 'destroy', :id => post.id}, {'onclick' => "return deletePost('#{post.id}')"}) %></li>
|
22
|
+
<li id="togglecomment_<%= post.id %>"><%= comment_toggle_link(post) %></li>
|
23
|
+
<% end -%>
|
24
|
+
</ul>
|
25
|
+
|
26
|
+
<div class="postbody" id="postbody_<%= post.id %>">
|
27
|
+
<%= render_body(post) %>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<%= post_links(post) %>
|
31
|
+
|
32
|
+
<div style="display: none;" id="post_tags_<%= post.id %>">
|
33
|
+
<form action="<%= url_for(:controller => 'tags', :action => 'add') %>" method="post" onsubmit="return sendTags(this);">
|
34
|
+
<input type="hidden" name="post_id" value="<%= post.id %>" />
|
35
|
+
<p><input autocomplete="off" type="text" name="tags" size="30" id="post_tags_ip_<%= post.id %>" /></p>
|
36
|
+
</form>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<%= render_partial 'post/reply', post %>
|
40
|
+
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
Error: <%= @error %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render_collection_of_partials 'journal/post', @posts %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= render_partial 'post', @post %>
|
2
|
+
|
3
|
+
<% if @post.has_pings? -%>
|
4
|
+
<div id="trackbacks">
|
5
|
+
<h3>TrackBacks</h3>
|
6
|
+
<%= render_collection_of_partials 'trackback', @post.pings %>
|
7
|
+
</div>
|
8
|
+
<% end -%>
|
9
|
+
|
10
|
+
<% if @post.allows_comment? and @post.has_comments? -%>
|
11
|
+
<div id="comments">
|
12
|
+
<h3>Comments</h3>
|
13
|
+
<%= render_collection_of_partials 'comment', @comments %>
|
14
|
+
</div>
|
15
|
+
<% end -%>
|
@@ -0,0 +1,90 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
5
|
+
<title><%= page_title %></title>
|
6
|
+
<link href="<%= @app_config['main']['app_base'] %>stylesheets/undohtml.css" rel="stylesheet" type="text/css" />
|
7
|
+
<link href="<%= @app_config['main']['app_base'] %>stylesheets/ej-layout.css" rel="stylesheet" type="text/css" />
|
8
|
+
<link href="<%= @app_config['main']['app_base'] %>stylesheets/ej-style.css" rel="stylesheet" type="text/css" />
|
9
|
+
<% if user_page? -%>
|
10
|
+
<link href="<%= url_for :controller => 'css', :action => 'getstyle', :id => @user.id %>" rel="stylesheet" type="text/css" />
|
11
|
+
<link rel="alternate" type="application/atom+xml" title="<%= page_title %> - Atom" href="<%= @request.protocol %><%= @request.host_with_port %>/atom/<%= @user.username %>" />
|
12
|
+
<link rel="alternate" type="application/rss+xml" title="<%= page_title %> - RSS" href="<%= @request.protocol %><%= @request.host_with_port %>/rss/<%= @user.username %>" />
|
13
|
+
<% end -%>
|
14
|
+
|
15
|
+
<script src="<%= @app_config['main']['app_base'] %>javascripts/ruby_fade.js"></script>
|
16
|
+
<script src="<%= @app_config['main']['app_base'] %>javascripts/uimanip.js"></script>
|
17
|
+
<script src="<%= @app_config['main']['app_base'] %>javascripts/xmlhttp.js"></script>
|
18
|
+
<script src="<%= @app_config['main']['app_base'] %>javascripts/xmlhttpreq.js"></script>
|
19
|
+
|
20
|
+
<link rel="alternate" type="application/atom+xml" title="<%= @app_config['main']['title'] %> - Atom" href="<%= @request.protocol %><%= @request.host_with_port %>/atom/feed" />
|
21
|
+
<link rel="alternate" type="application/rss+xml" title="<%= @app_config['main']['title'] %> - RSS" href="<%= @request.protocol %><%= @request.host_with_port %>/rss" />
|
22
|
+
|
23
|
+
</head>
|
24
|
+
<body>
|
25
|
+
<div id="header">
|
26
|
+
<h1><%= page_title %></h1>
|
27
|
+
<p id="subtitle"><%= page_subtitle %></p>
|
28
|
+
</div>
|
29
|
+
<ul id="menu">
|
30
|
+
<% if logged_in? -%>
|
31
|
+
<li id="logout"><%= current_user.name %> | <%= link_to 'Log Out', :controller => 'auth', :action => 'logout' %></li>
|
32
|
+
<li><%= link_to('Home', :controller => 'journal', :action => 'index' ) %></li>
|
33
|
+
<li><%= link_to('Users', :controller => 'users', :action => 'index' ) %></li>
|
34
|
+
<li><%= link_to('Post', :controller => 'post', :action => 'new' ) %></li>
|
35
|
+
<li><%= link_to('My Drafts', :controller => 'draft', :action => 'list' ) %></li>
|
36
|
+
<li><%= link_to('My Info', :controller => 'account', :action => 'info' ) %></li>
|
37
|
+
<li><%= link_to('My Links', :controller => 'link', :action => 'index' ) %></li>
|
38
|
+
<li><%= link_to('My CSS', :controller => 'css', :action => 'edit' ) %></li>
|
39
|
+
<% if current_user.is_admin? -%>
|
40
|
+
<li><%= link_to('User Admin', :controller => 'user', :action => 'index' ) %></li>
|
41
|
+
<% end -%>
|
42
|
+
<% else -%>
|
43
|
+
<li id="logout"><%= link_to 'Log In', :controller => 'auth', :action => 'login' %></li>
|
44
|
+
<li><%= link_to 'Home', :controller => 'journal', :action => 'index' %></li>
|
45
|
+
<li><%= link_to('Users', :controller => 'users', :action => 'index' ) %></li>
|
46
|
+
<% end -%>
|
47
|
+
</ul>
|
48
|
+
|
49
|
+
<div id="posts">
|
50
|
+
<%= @content_for_layout %>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div id="sidebar">
|
54
|
+
<h2>Recently Updated</h2>
|
55
|
+
<ul>
|
56
|
+
<% @most_recent.each do |u| -%>
|
57
|
+
<li><%= link_user u %></li>
|
58
|
+
<% end -%>
|
59
|
+
</ul>
|
60
|
+
|
61
|
+
<% if user_page? -%>
|
62
|
+
<h2>Links</h2>
|
63
|
+
<ul>
|
64
|
+
<li><%= link_to 'Atom', :controller => 'atom', :action => @user.username %></li>
|
65
|
+
<li><%= link_to 'RSS', :controller => 'rss', :action => @user.username %></li>
|
66
|
+
<% @user.links.each do |l| -%>
|
67
|
+
<li><a href="<%= l.link_url %>"><%= l.link_text %></a></li>
|
68
|
+
<% end -%>
|
69
|
+
</ul>
|
70
|
+
<% end -%>
|
71
|
+
|
72
|
+
<% if @params['controller'] == 'tags' and @params['action'] == 'show' -%>
|
73
|
+
<h2>Related Tags</h2>
|
74
|
+
<ul>
|
75
|
+
<% @tag.related_tags.each do |t| -%>
|
76
|
+
<li><%= link_to t.tag, :controller => 'tags', :action => 'show', :params => {'tag', CGI.escape(t.tag)} %></li>
|
77
|
+
<% end -%>
|
78
|
+
</ul>
|
79
|
+
|
80
|
+
<h2>Find This Tag On...</h2>
|
81
|
+
<ul>
|
82
|
+
<% @app_config['tags'].each do |t, url| -%>
|
83
|
+
<li><%= link_to t, sprintf(url, CGI.escape(@tag.tag)) %></li>
|
84
|
+
<% end -%>
|
85
|
+
</ul>
|
86
|
+
<% end -%>
|
87
|
+
|
88
|
+
</div>
|
89
|
+
</body>
|
90
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<table id="linktable">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th>Link Text</th>
|
5
|
+
<th>URL</th>
|
6
|
+
<th> </th>
|
7
|
+
</tr>
|
8
|
+
</thead>
|
9
|
+
<tbody>
|
10
|
+
<% @links.each do |link| -%>
|
11
|
+
<tr>
|
12
|
+
<td><%= link.link_text %></td>
|
13
|
+
<td><%= link.link_url %></td>
|
14
|
+
<td><%= link_to 'Delete', :controller => 'link', :action => 'destroy', :id => link.id %></td>
|
15
|
+
</tr>
|
16
|
+
<% end -%>
|
17
|
+
</tbody>
|
18
|
+
</table>
|
19
|
+
<p><%= link_to 'Create New Link', :controller => 'link', :action => 'new' %></p>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= error_messages_for 'link' %>
|
2
|
+
<%= form_tag %>
|
3
|
+
<p><label for="link_link_text">Link Text</label><br /><%= input('link', 'link_text') %></p>
|
4
|
+
<p><label for="link_link_url">Link URL</label><br /><%= input('link', 'link_url') %></p>
|
5
|
+
<p><input type="submit" value="Add Link" /></p>
|
6
|
+
<%= end_form_tag %>
|
7
|
+
<%= link_to 'Back', :controller => 'link', :action => 'list' %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<div style="display: none;" id="postreply_<%= reply.id %>" class="postreply">
|
2
|
+
<form class="postreply" id="postreply_<%= reply.id %>" action="<%= url_for :controller => 'post', :action => 'reply', :id => reply.id %>" method="post">
|
3
|
+
<p><label for="comment_subject_<%= reply.id %>">Subject</label><br />
|
4
|
+
<input type="text" name="comment[subject]" id="comment_subject_<%= reply.id %>" /></p>
|
5
|
+
<p><label for="comment_posted_by_<%= reply.id %>">Posted By</label><br />
|
6
|
+
<input type="text" name="comment[posted_by]" id="comment_posted_by_<%= reply.id %>" /></p>
|
7
|
+
<p><textarea name="comment[body]" id="comment_body_<%= reply.id %>"></textarea></p>
|
8
|
+
<p><input id="reply_submit_<%= reply.id %>" type="submit" value="Reply" onclick="return sendReply('<%= reply.id %>');"/>
|
9
|
+
</form>
|
10
|
+
</div>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<%= error_messages_for 'post' %>
|
2
|
+
<%= form_tag %>
|
3
|
+
<p><label for="post_subject">Subject</label><br />
|
4
|
+
<%= input('post', 'subject') %></p>
|
5
|
+
<p><%= text_area('post', 'body') %></p>
|
6
|
+
<p><input id="post_submit" type="submit" name="post_type" value="Post" /></p>
|
7
|
+
<%= end_form_tag %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div id="postform">
|
2
|
+
<%= error_messages_for 'post' %>
|
3
|
+
<form id="postform" name="f" method="post" action="<%= url_for :controller => 'post', :action => 'new' %>">
|
4
|
+
<p><label for="post_subject">Subject</label><br />
|
5
|
+
<%= input('post', 'subject') %></p>
|
6
|
+
<p><label for="post_tags">Tags</label><br />
|
7
|
+
<input autocomplete="off" type="text" name="tags" size="30" id="post_tags" /></p>
|
8
|
+
<p><label for="tb_url">TrackBack To</label><br />
|
9
|
+
<input type="text" name="tb_url" id="tb_url" /></p>
|
10
|
+
<p><%= text_area('post', 'body') %></p>
|
11
|
+
<p><input id="post_submit" type="submit" name="btnG" value="Post" /></p>
|
12
|
+
<%= end_form_tag %>
|
13
|
+
</div>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<div class="post">
|
2
|
+
<h2><%= @post.subject %></h2>
|
3
|
+
<ul class="postdata">
|
4
|
+
<li>Posted On <%= @post.created_at %></li>
|
5
|
+
<li>Trackback URL: <%= url_for :controller => 'ping', :action => 'trackback', :id => @post.id, :only_path => false %>/li>
|
6
|
+
<% if @post.updated? -%>
|
7
|
+
<li>Update On <%= @post.updated_at %></li>
|
8
|
+
<% end -%>
|
9
|
+
</ul>
|
10
|
+
<%= render_body(@post) %>
|
11
|
+
|
12
|
+
<% if @comment -%>
|
13
|
+
<b><%= @comment.subject %></b><br />
|
14
|
+
Posted On <%= @comment.created_at %> By <%= @comment.posted_by %><br />
|
15
|
+
<%= @comment.rendered %>
|
16
|
+
<br />
|
17
|
+
<% end -%>
|
18
|
+
|
19
|
+
<form id="postreply" action="<%= url_for :controller => 'post', :action => 'reply', :id => @post.id %>" method="post">
|
20
|
+
<div style="visibility: hidden;">
|
21
|
+
<% if @comment -%>
|
22
|
+
<input type="hidden" name="newcomment[comment_id]" value="<%= @comment.id %>" />
|
23
|
+
<% end -%>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<p><label for="newcomment_subject">Subject</label><br />
|
27
|
+
<%= text_field 'newcomment', 'subject' %></p>
|
28
|
+
<p><label for="newcomment_posted_by">Posted By</label><br />
|
29
|
+
<%= text_field 'newcomment', 'posted_by' %></p>
|
30
|
+
<p><%= text_area 'newcomment', 'body' %></p>
|
31
|
+
<p><input type="submit" value="Reply" /></p>
|
32
|
+
</form>
|
33
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
xml.rss('version' => '2.0') do
|
2
|
+
xml.channel do
|
3
|
+
xml.title(@title)
|
4
|
+
xml.link("#{@request.protocol}#{@request.host_with_port}")
|
5
|
+
xml.description(@subtitle)
|
6
|
+
@posts.each { |p|
|
7
|
+
xml.item do
|
8
|
+
xml.title(p.subject)
|
9
|
+
xml.link("#{@request.protocol}#{@request.host_with_port}/journal/view/#{p.id}")
|
10
|
+
xml.description(p.rendered)
|
11
|
+
xml.pubDate(p.updated_at)
|
12
|
+
end
|
13
|
+
}
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
sendRPCDone(frameElement, "", new Array(""), new Array(""), new Array(""));
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
4
|
+
<script>
|
5
|
+
function bodyLoad() {
|
6
|
+
if (parent == window) return;
|
7
|
+
var frameElement = this.frameElement;
|
8
|
+
parent.sendRPCDone(frameElement, "", new Array(), new Array(), new Array(""));
|
9
|
+
}
|
10
|
+
</script></head><body onload='bodyLoad();'></body></html>
|
@@ -0,0 +1 @@
|
|
1
|
+
sendRPCDone(frameElement, "<%= @params['qu'] %>", new Array(<%= @tagarray %>), new Array(<%= @postsarray %>), new Array(""));
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<table id="usertable">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th>Username</th>
|
5
|
+
<th>Name</th>
|
6
|
+
<th>Level</th>
|
7
|
+
<th> </th>
|
8
|
+
</tr>
|
9
|
+
</thead>
|
10
|
+
<tbody>
|
11
|
+
<% @users.each do |user| -%>
|
12
|
+
<tr>
|
13
|
+
<td><%= user.username %></td>
|
14
|
+
<td><%= user.name %></td>
|
15
|
+
<td><%= user.is_admin? ? "Admin" : "User" %></td>
|
16
|
+
<td><%= link_to 'Delete', :controller => 'user', :action => 'destroy', :id => user.id %></td>
|
17
|
+
</tr>
|
18
|
+
<% end -%>
|
19
|
+
</tbody>
|
20
|
+
</table>
|
21
|
+
<p><%= link_to 'Create New User', :controller => 'user', :action => 'new' %></p>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= error_messages_for 'user' %>
|
2
|
+
<%= form_tag %>
|
3
|
+
<p><label for="user_username">Username</label><br /><%= input('user', 'username') %></p>
|
4
|
+
<p><label for="user_name">Name</label><br /><%= input('user', 'name') %></p>
|
5
|
+
<p><%= check_box('user', 'is_admin') %> <label for="user_is_admin">Is Administrator</label></p>
|
6
|
+
<p><%= check_box('user', 'allows_comment') %> <label for="user_allows_comment">Allow Comments</label></p>
|
7
|
+
<p><label for="user_password">Password</label><br /><%= input('user', 'password') %></p>
|
8
|
+
<p><label for="user_password_confirmation">Confirm Password</label><br />
|
9
|
+
<input type="password" id="user_password" name="user[password_confirmation]" size="30" /></p>
|
10
|
+
<p><input type="submit" value="Add User" /></p>
|
11
|
+
<%= end_form_tag %>
|
12
|
+
<%= link_to 'Back', :controller => 'user', :action => 'list' %>
|