refactoring views
This commit is contained in:
@@ -50,17 +50,7 @@
|
||||
location.href = domain + "/static/terms_of_service?url=" + location.href;
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.get("hide-news-ticker") == "1") {
|
||||
$("#news-ticker").hide();
|
||||
} else {
|
||||
$("#close-news-ticker-link").click(function(e) {
|
||||
$("#news-ticker").hide();
|
||||
Danbooru.Cookie.put("hide-news-ticker", "1", 1);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (this.get("hide-upgrade-account") != "1") {
|
||||
$("#upgrade-account").show();
|
||||
}
|
||||
|
||||
21
app/assets/javascripts/news.js
Normal file
21
app/assets/javascripts/news.js
Normal file
@@ -0,0 +1,21 @@
|
||||
(function() {
|
||||
Danbooru.News = {};
|
||||
|
||||
Danbooru.News.initialize = function() {
|
||||
var key = $("#news-ticker").data("updated-at");
|
||||
|
||||
if (Danbooru.Cookie.get("news-ticker") === key) {
|
||||
$("#news-ticker").hide();
|
||||
} else {
|
||||
$("#close-news-ticker-link").click(function(e) {
|
||||
$("#news-ticker").hide();
|
||||
Danbooru.Cookie.put("news-ticker", key);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
Danbooru.News.initialize();
|
||||
});
|
||||
})();
|
||||
@@ -22,7 +22,7 @@ module AdvertisementsHelper
|
||||
|
||||
def render_rss_advertisement
|
||||
if Danbooru.config.can_user_see_ads?(CurrentUser.user)
|
||||
render :partial => "static/jlist_rss_ads"
|
||||
render "static/jlist_rss_ads"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -26,9 +26,9 @@ class PostPresenter < Presenter
|
||||
return template.content_tag("p", "You need a privileged account to see this image.") if !Danbooru.config.can_user_see_post?(CurrentUser.user, @post)
|
||||
|
||||
if @post.is_flash?
|
||||
template.render(:partial => "posts/partials/show/flash", :locals => {:post => @post})
|
||||
template.render("posts/partials/show/flash", :post => @post)
|
||||
elsif @post.is_image?
|
||||
template.render(:partial => "posts/partials/show/image", :locals => {:post => @post})
|
||||
template.render("posts/partials/show/image", :post => @post)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class PostSetPresenter < Presenter
|
||||
html = "<div class='post-previews'>"
|
||||
|
||||
if posts.empty?
|
||||
return template.render(:partial => "post_sets/blank")
|
||||
return template.render("post_sets/blank")
|
||||
end
|
||||
|
||||
posts.each do |post|
|
||||
|
||||
@@ -8,7 +8,7 @@ module PostSetPresenters
|
||||
html = ""
|
||||
|
||||
if posts.empty?
|
||||
return template.render(:partial => "post_sets/blank")
|
||||
return template.render("post_sets/blank")
|
||||
end
|
||||
|
||||
posts.each do |post|
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="bans">
|
||||
<div class="new">
|
||||
<h1>Edit Ban</h1>
|
||||
<%= render :partial => "form", :locals => {:ban => @ban} %>
|
||||
<%= render "form", :ban => @ban %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="bans">
|
||||
<div class="new">
|
||||
<h1>New Ban</h1>
|
||||
<%= render :partial => "form", :locals => {:ban => @ban} %>
|
||||
<%= render "form", :ban => @ban %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
1
app/views/comments/create.js.erb
Normal file
1
app/views/comments/create.js.erb
Normal file
@@ -0,0 +1 @@
|
||||
$("div.comments-for-post[data-post-id=<%= @comment.post_id %>] div.list-of-comments").append("<%= escape_javascript(render('comments/partials/show/comment', :comment => @comment)) %>");
|
||||
@@ -1 +0,0 @@
|
||||
page.insert_html(:bottom, "div.comments-for-post[data-post-id=#{@comment.post_id}] div.list-of-comments", :partial => "comments/partials/show/comment", :locals => {:comment => @comment})
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="comments-for-post">
|
||||
<div class="list-of-comments">
|
||||
<% @comments.each do |comment| %>
|
||||
<%= render :partial => "comments/partials/show/comment", :locals => {:post => comment.post, :comment => comment, :show_header => false} %>
|
||||
<%= render "comments/partials/show/comment", :post => comment.post, :comment => comment, :show_header => false %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="preview">
|
||||
<%= link_to(image_tag(post.preview_file_url), post_path(post)) %>
|
||||
</div>
|
||||
<%= render :partial => "comments/partials/index/list", :locals => {:post => post, :comments => post.comments.recent.reverse, :show_header => true} %>
|
||||
<%= render "comments/partials/index/list", :post => post, :comments => post.comments.recent.reverse, :show_header => true %>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -20,4 +20,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "comments/secondary_links" %>
|
||||
<%= render "comments/secondary_links" %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="comments-for-post" data-post-id="<%= post.id %>">
|
||||
<% if show_header %>
|
||||
<%= render :partial => "comments/partials/index/header", :locals => {:post => post} %>
|
||||
<%= render "comments/partials/index/header", :post => post %>
|
||||
<% end %>
|
||||
|
||||
<div class="list-of-comments">
|
||||
@@ -15,6 +15,6 @@
|
||||
|
||||
<div class="new-comment">
|
||||
<p><%= link_to "Post comment", new_comment_path, :class => "expand-comment-response" %></p>
|
||||
<%= render :partial => "comments/partials/new/form", :locals => {:post => post} %>
|
||||
<%= render "comments/partials/new/form", :post => post %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
<div id="c-dmails">
|
||||
|
||||
<div id="a-index">
|
||||
<h1>Messages</h1>
|
||||
|
||||
<%= render "search" %>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<% @dmails.each do |dmail| %>
|
||||
<% if params[:folder] == "sent" %>
|
||||
<%= render "sent", :dmail => dmail %>
|
||||
<% else %>
|
||||
<%= render "received", :dmail => dmail %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<h1>Messages</h1>
|
||||
|
||||
<%= render "search" %>
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
<% @dmails.each do |dmail| %>
|
||||
<% if params[:folder] == "sent" %>
|
||||
<%= render :partial => "sent", :locals => {:dmail => dmail} %>
|
||||
<% else %>
|
||||
<%= render :partial => "received", :locals => {:dmail => dmail} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,2 +1,7 @@
|
||||
<h1>New Message</h1>
|
||||
<%= render :partial => "form", :locals => {:dmail => @dmail} %>
|
||||
<div id="c-dmails">
|
||||
<div id="a-new">
|
||||
<h1>New Message</h1>
|
||||
<%= render "form", :dmail => @dmail %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<div class="dmails">
|
||||
<div class="show">
|
||||
<div class="c-dmails">
|
||||
<div class="a-show">
|
||||
<div class="dmail">
|
||||
<h1><%= @dmail.title %></h1>
|
||||
<%= format_text(@dmail.body) %>
|
||||
|
||||
<p>
|
||||
<%= link_to "Respond", new_dmail_path(:respond_to_id => @dmail) %>
|
||||
| <%= link_to "Forward", new_dmail_path(:respond_to_id => @dmail, :forward => true) %>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<div id="c-favorites">
|
||||
<div id="a-index">
|
||||
<aside id="sidebar">
|
||||
<%= render :partial => "posts/partials/common/search", :locals => {:path => favorites_path, :tags => @favorite_set.tag_string} %>
|
||||
<%= render "posts/partials/common/search", :path => favorites_path, :tags => @favorite_set.tag_string %>
|
||||
|
||||
<% if CurrentUser.is_privileged? %>
|
||||
<section id="mode-box">
|
||||
<%= render :partial => "posts/partials/index/mode_menu" %>
|
||||
<%= render "posts/partials/index/mode_menu" %>
|
||||
</section>
|
||||
<% end %>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
/fav:<%= CurrentUser.name %>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "posts/partials/common/secondary_links" %>
|
||||
<%= render "posts/partials/common/secondary_links" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="list-of-forum-posts">
|
||||
<% forum_posts.each do |forum_post| %>
|
||||
<%= render :partial => "forum_posts/forum_post", :locals => {:forum_post => forum_post} %>
|
||||
<%= render "forum_posts/forum_post", :forum_post => forum_post %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="c-forum-topics">
|
||||
<div id="a-show" class="single-forum-post list-of-forum-posts">
|
||||
<%= render :partial => "forum_post", :locals => {:forum_post => @forum_post} %>
|
||||
<%= render "forum_post", :forum_post => @forum_post %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,24 +1,28 @@
|
||||
<h1>Forum</h1>
|
||||
<div id="c-forum-topics">
|
||||
<div id="a-index">
|
||||
<h1>Forum</h1>
|
||||
|
||||
<table width="100%" class="striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Creator</th>
|
||||
<th>Updated by</th>
|
||||
<th>Updated at</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @forum_topics.each do |topic| %>
|
||||
<tr>
|
||||
<td><% if topic.is_sticky? %><span class="sticky">Sticky:</span> <% end %><%= link_to topic.title, forum_topic_path(topic) %></td>
|
||||
<td><%= topic.creator.name %></td>
|
||||
<td><%= topic.updater.name %></td>
|
||||
<td><%= compact_time topic.updated_at %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<table width="100%" class="striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Creator</th>
|
||||
<th>Updated by</th>
|
||||
<th>Updated at</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @forum_topics.each do |topic| %>
|
||||
<tr>
|
||||
<td><% if topic.is_sticky? %><span class="sticky">Sticky:</span> <% end %><%= link_to topic.title, forum_topic_path(topic) %></td>
|
||||
<td><%= topic.creator.name %></td>
|
||||
<td><%= topic.updater.name %></td>
|
||||
<td><%= compact_time topic.updated_at %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "secondary_links" %>
|
||||
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "forum_posts/listing", :locals => {:forum_posts => @forum_posts} %>
|
||||
<%= render "forum_posts/listing", :forum_posts => @forum_posts %>
|
||||
<%= render "paginator" %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -14,5 +14,5 @@
|
||||
<%= render "secondary_links" %>
|
||||
|
||||
<%= content_for(:page_title) do %>
|
||||
forum/<%= @forum_topic.title %>
|
||||
forum/<%= @forum_topic.title %>
|
||||
<% end %>
|
||||
@@ -1,22 +1,27 @@
|
||||
<h1>IP Bans</h1>
|
||||
<div id="c-ip-bans">
|
||||
<div id="a-index">
|
||||
<h1>IP Bans</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>IP Address</th>
|
||||
<th>Banner</th>
|
||||
<th>Reason</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @ip_bans.each do |ip_ban| %>
|
||||
<tr>
|
||||
<td><%= ip_ban.ip_addr %></td>
|
||||
<td><%= ip_ban.creator.name %></td>
|
||||
<td><%= ip_ban.reason %></td>
|
||||
<td><%= link_to "Unban", ip_ban_path(ip_ban), :remote => true, :method => :delete, :confirm => "Do your really want to unban #{ip_ban.creator.name}?" %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>IP Address</th>
|
||||
<th>Banner</th>
|
||||
<th>Reason</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @ip_bans.each do |ip_ban| %>
|
||||
<tr>
|
||||
<td><%= ip_ban.ip_addr %></td>
|
||||
<td><%= ip_ban.creator.name %></td>
|
||||
<td><%= ip_ban.reason %></td>
|
||||
<td><%= link_to "Unban", ip_ban_path(ip_ban), :remote => true, :method => :delete, :confirm => "Do your really want to unban #{ip_ban.creator.name}?" %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
<h1>New IP Ban</h1>
|
||||
<div id="c-ip-bans">
|
||||
<div id="a-new">
|
||||
<h1>New IP Ban</h1>
|
||||
|
||||
<%= simple_form_for(@ip_ban) do |f| %>
|
||||
<%= f.input :ip_addr %>
|
||||
<%= f.input :reason %>
|
||||
<%= f.button :submit %>
|
||||
<% end %>
|
||||
<%= simple_form_for(@ip_ban) do |f| %>
|
||||
<%= f.input :ip_addr %>
|
||||
<%= f.input :reason %>
|
||||
<%= f.button :submit %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,23 +1,27 @@
|
||||
<h1>Janitor Trials</h1>
|
||||
<div id="c-janitor-trials">
|
||||
<div id="a-index">
|
||||
<h1>Janitor Trials</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>User</th>
|
||||
<th>Duration</th>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @janitor_trials.each do |janitor_trial| %>
|
||||
<tr>
|
||||
<td><%= janitor_trial.user.name %></td>
|
||||
<td><%= janitor_trial.created_at %></td>
|
||||
<td>
|
||||
<%= link_to "Promote", promote_janitor_trial_path(janitor_trial), :remote => true, :method => :put %>
|
||||
| <%= link_to "Demote", demote_janitor_trial_path(janitor_trial), :remote => true, :method => :put %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>User</th>
|
||||
<th>Duration</th>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @janitor_trials.each do |janitor_trial| %>
|
||||
<tr>
|
||||
<td><%= janitor_trial.user.name %></td>
|
||||
<td><%= janitor_trial.created_at %></td>
|
||||
<td>
|
||||
<%= link_to "Promote", promote_janitor_trial_path(janitor_trial), :remote => true, :method => :put %>
|
||||
| <%= link_to "Demote", demote_janitor_trial_path(janitor_trial), :remote => true, :method => :put %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<h1>New Janitor Trial</h1>
|
||||
<div id="c-janitor-trials">
|
||||
<div id="a-new">
|
||||
<h1>New Janitor Trial</h1>
|
||||
|
||||
<%= simple_form_for(@janitor_trial) do |f| %>
|
||||
<%= f.input :user_id %>
|
||||
<%= f.button :submit %>
|
||||
<% end %>
|
||||
<%= simple_form_for(@janitor_trial) do |f| %>
|
||||
<%= f.input :user_id %>
|
||||
<%= f.button :submit %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -38,4 +38,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "posts/partials/common/secondary_links" %>
|
||||
<%= render "posts/partials/common/secondary_links" %>
|
||||
@@ -1,4 +1,4 @@
|
||||
<div id="news-ticker">
|
||||
<div id="news-ticker" data-updated-at="2011-09-01">
|
||||
<ul>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
<%= sequential_paginator(@note_versions) %>
|
||||
|
||||
<%= render :partial => "notes/secondary_links" %>
|
||||
<%= render "notes/secondary_links" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "pools/secondary_links" %>
|
||||
<%= render "pools/secondary_links" %>
|
||||
|
||||
@@ -37,4 +37,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "pools/secondary_links" %>
|
||||
<%= render "pools/secondary_links" %>
|
||||
|
||||
@@ -1,17 +1,21 @@
|
||||
<p>If this post was automatically deleted, <strong>then it means at least ten janitors all thought it didn't belong on the site</strong>. If you still believe this image was wrongfully deleted, then you can appeal its deletion.</p>
|
||||
<div id="c-post-appeals">
|
||||
<div id="a-index">
|
||||
<p>If this post was automatically deleted, <strong>then it means at least ten janitors all thought it didn't belong on the site</strong>. If you still believe this image was wrongfully deleted, then you can appeal its deletion.</p>
|
||||
|
||||
<p>Some valid reasons for appealing include:</p>
|
||||
<p>Some valid reasons for appealing include:</p>
|
||||
|
||||
<ul>
|
||||
<li>Funny</li>
|
||||
<li>Weird</li>
|
||||
<li>Translated</li>
|
||||
<li>Part of a pool</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Funny</li>
|
||||
<li>Weird</li>
|
||||
<li>Translated</li>
|
||||
<li>Part of a pool</li>
|
||||
</ul>
|
||||
|
||||
<p>All users are limited to 5 appeals a day. For more details, please read the <%= link_to "wiki", wiki_pages_path(:title => "help:deletion_appeals") %>.</p>
|
||||
<p>All users are limited to 5 appeals a day. For more details, please read the <%= link_to "wiki", wiki_pages_path(:title => "help:deletion_appeals") %>.</p>
|
||||
|
||||
<%= simple_form_for(@post_appeal, :remote => true, :format => :js) do |f| %>
|
||||
<%= hidden_field_tag "post_appeal[post_id]", @post_appeal.post_id %>
|
||||
<%= f.text_field :reason, :size => "40x5" %>
|
||||
<% end %>
|
||||
<%= simple_form_for(@post_appeal, :remote => true, :format => :js) do |f| %>
|
||||
<%= hidden_field_tag "post_appeal[post_id]", @post_appeal.post_id %>
|
||||
<%= f.text_field :reason, :size => "40x5" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,25 +1,29 @@
|
||||
<p>If you believe a post does not belong on this site, you can flag for its deletion. As a reminder, the following are some common reasons for flagging a post:</p>
|
||||
<div id="c-post-flags">
|
||||
<div id="a-index">
|
||||
<p>If you believe a post does not belong on this site, you can flag for its deletion. As a reminder, the following are some common reasons for flagging a post:</p>
|
||||
|
||||
<ul>
|
||||
<li>Not anime-related</li>
|
||||
<li>Furry: a character has body fur or an animal face</li>
|
||||
<li>Watermark: text or logo inserted by someone besides the original artist</li>
|
||||
<li>Poor compression: JPEG artifacts</li>
|
||||
<li>Guro: mutilation, extreme bodily distension</li>
|
||||
<li>Bad proportions: extremely large breasts or penises</li>
|
||||
<li>Manga: Multiple pages of a manga, doujinshi, or comic that don't stand up to individual scrutiny</li>
|
||||
<li>Fake translations: Made up translations are banned</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Not anime-related</li>
|
||||
<li>Furry: a character has body fur or an animal face</li>
|
||||
<li>Watermark: text or logo inserted by someone besides the original artist</li>
|
||||
<li>Poor compression: JPEG artifacts</li>
|
||||
<li>Guro: mutilation, extreme bodily distension</li>
|
||||
<li>Bad proportions: extremely large breasts or penises</li>
|
||||
<li>Manga: Multiple pages of a manga, doujinshi, or comic that don't stand up to individual scrutiny</li>
|
||||
<li>Fake translations: Made up translations are banned</li>
|
||||
</ul>
|
||||
|
||||
<p>The following are <strong>NOT</strong> valid reasons for flagging a post:</p>
|
||||
<p>The following are <strong>NOT</strong> valid reasons for flagging a post:</p>
|
||||
|
||||
<ul>
|
||||
<li>Duplicate: just parent to the original</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Duplicate: just parent to the original</li>
|
||||
</ul>
|
||||
|
||||
<p>Enter a reason:</p>
|
||||
<p>Enter a reason:</p>
|
||||
|
||||
<%= simple_form_for(@post_flag, :remote => true, :format => :js) do |f| %>
|
||||
<%= f.input :post_id, :as => :hidden %>
|
||||
<%= f.text_field :reason %>
|
||||
<% end %>
|
||||
<%= simple_form_for(@post_flag, :remote => true, :format => :js) do |f| %>
|
||||
<%= f.input :post_id, :as => :hidden %>
|
||||
<%= f.text_field :reason %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<% if @post_versions.empty? %>
|
||||
<%= render "post_sets/blank" %>
|
||||
<% else %>
|
||||
<%= render :partial => "listing", :locals => {:post_versions => @post_versions} %>
|
||||
<%= render"listing", :post_versions => @post_versions %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<div id="c-posts">
|
||||
<div id="a-index">
|
||||
<aside id="sidebar">
|
||||
<%= render :partial => "posts/partials/common/search", :locals => {:path => posts_path, :tags => params[:tags]} %>
|
||||
<%= render "posts/partials/common/search", :path => posts_path, :tags => params[:tags] %>
|
||||
|
||||
<%= render :partial => "posts/partials/index/mode_menu" %>
|
||||
<%= render "posts/partials/index/mode_menu" %>
|
||||
|
||||
<section id="tag-box">
|
||||
<h1>Tags</h1>
|
||||
<%= @post_set.presenter.tag_list_html(self) %>
|
||||
</section>
|
||||
|
||||
<%= render :partial => "posts/partials/index/blacklist" %>
|
||||
<%= render "posts/partials/index/blacklist" %>
|
||||
</aside>
|
||||
|
||||
<section id="content">
|
||||
<%= render :partial => "wiki_pages/excerpt", :locals => {:post_set => @post_set} %>
|
||||
<%= render :partial => "posts/partials/index/posts", :locals => {:post_set => @post_set} %>
|
||||
<%= render "wiki_pages/excerpt", :post_set => @post_set %>
|
||||
<%= render "posts/partials/index/posts", :post_set => @post_set %>
|
||||
</section>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
/<%= @post_set.tag_string %>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "posts/partials/common/secondary_links" %>
|
||||
<%= render "posts/partials/common/secondary_links" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<div id="c-posts">
|
||||
<div id="a-show">
|
||||
<aside id="sidebar">
|
||||
<%= render :partial => "posts/partials/common/search", :locals => {:path => posts_path, :tags => params[:tags]} %>
|
||||
<%= render "posts/partials/common/search", :path => posts_path, :tags => params[:tags] %>
|
||||
|
||||
<% if @post.pools.any? %>
|
||||
<section id="pool-sidebar">
|
||||
<h1>Pools</h1>
|
||||
<%= render :partial => "posts/partials/show/pools", :locals => {:post => @post} %>
|
||||
<%= render "posts/partials/show/pools", :post => @post %>
|
||||
</section>
|
||||
<% end %>
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
|
||||
<section>
|
||||
<h1>Information</h1>
|
||||
<%= render :partial => "posts/partials/show/information", :locals => {:post => @post} %>
|
||||
<%= render "posts/partials/show/information", :post => @post %>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Options</h1>
|
||||
<%= render :partial => "posts/partials/show/options", :locals => {:post => @post} %>
|
||||
<%= render "posts/partials/show/options", :post => @post %>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@@ -36,7 +36,7 @@
|
||||
</aside>
|
||||
|
||||
<section id="content">
|
||||
<%= render :partial => "posts/partials/show/notices", :locals => {:post => @post} %>
|
||||
<%= render "posts/partials/show/notices", :post => @post %>
|
||||
|
||||
<section id="image-container">
|
||||
<div id="note-container"></div>
|
||||
@@ -50,7 +50,7 @@
|
||||
</menu>
|
||||
|
||||
<section id="comments">
|
||||
<%= render :partial => "comments/partials/index/list", :locals => {:comments => @post.comments, :post => @post, :show_header => false} %>
|
||||
<%= render "comments/partials/index/list", :comments => @post.comments, :post => @post, :show_header => false %>
|
||||
</section>
|
||||
|
||||
<section id="notes">
|
||||
@@ -62,7 +62,7 @@
|
||||
</section>
|
||||
|
||||
<section id="edit">
|
||||
<%= render :partial => "posts/partials/show/edit", :locals => {:post => @post} %>
|
||||
<%= render "posts/partials/show/edit", :post => @post %>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
@@ -93,4 +93,4 @@
|
||||
<meta name="post-is-deleted" content="<%= @post.is_deleted? %>">
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "posts/partials/common/secondary_links" %>
|
||||
<%= render "posts/partials/common/secondary_links" %>
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
<h4>Report: <%= @report_title %></h4>
|
||||
|
||||
<div>
|
||||
<div style="margin-bottom: 1em;">
|
||||
<% form_tag({:action => params[:action]}, :method => :get) do %>
|
||||
<table width="100%">
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2"><%= submit_tag "Search" %></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="15%"><label for="start_date">Start Date</label></th>
|
||||
<td width="85%"><%= text_field_tag "start_date", @start_date, :size => 10 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="end_date">End Date</label></th>
|
||||
<td><%= text_field_tag "end_date", @end_date, :size => 10 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="limit">Limit</label></th>
|
||||
<td><%= text_field_tag "limit", @limit, :size => 5 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="level">Level</label></td>
|
||||
<td><%= user_level_select_tag "level", :include_blank => true %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<table width="100%" class="highlightable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="15%">User</th>
|
||||
<th width="10%">Changes</th>
|
||||
<th width="75%">Percentage</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<td>Total</td>
|
||||
<td><%= @users[0]["sum"].to_i %></td>
|
||||
<td></td>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<% @users.each do |user| %>
|
||||
<tr class="<%= cycle 'even', 'odd' %>">
|
||||
<td><%= link_to_unless user["id"].nil?, h(user["name"]), :controller => "user", :action => "show", :id => user["id"] %></td>
|
||||
<td><%= link_to_unless user["id"].nil?, user["change_count"], @change_params.call(user["id"]) %></td>
|
||||
<td><%= number_to_percentage 100 * user["change_count"] / user["sum"], :precision => 1 %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% content_for("subnavbar") do %>
|
||||
<li><%= link_to "Tags", :action => "tag_updates", :start_date => @start_date, :end_date => @end_date %></li>
|
||||
<li><%= link_to "Notes", :action => "note_updates", :start_date => @start_date, :end_date => @end_date %></li>
|
||||
<li><%= link_to "Wiki", :action => "wiki_updates", :start_date => @start_date, :end_date => @end_date %></li>
|
||||
<li><%= link_to "Uploads", :action => "post_uploads", :start_date => @start_date, :end_date => @end_date %></li>
|
||||
<% end %>
|
||||
@@ -1,40 +0,0 @@
|
||||
<script language="javascript" type="text/javascript" src="/javascripts/flotr-0.2.0-alpha.js"></script>
|
||||
|
||||
<% form_tag({:action => "tag_history"}, :method => :get) do %>
|
||||
<table width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="10%">Tags</th>
|
||||
<td width="90%"><%= text_field_tag "tag", params[:tag], :size => 50 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Start Date</th>
|
||||
<td><%= text_field_tag "start_date", @start_date %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>End Date</th>
|
||||
<td><%= text_field_tag "end_date", @end_date %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><%= submit_tag "Search" %></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
<div id="container" style="width: 100%; height: 400px"></div>
|
||||
|
||||
<% if @counts %>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
Flotr.draw(
|
||||
$("container"), [<%= @counts.map {|x| "{data: #{x[1].to_json}, label: #{x[0].to_json}}"}.join(", ") %>],
|
||||
{
|
||||
lines: {show: true},
|
||||
xaxis: {ticks: <%= @ticks.to_json %>},
|
||||
yaxis: {noTicks: 10, tickDecimals: 0},
|
||||
legend: {show: true},
|
||||
shadowSize: 0
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<% end %>
|
||||
@@ -1,5 +1,5 @@
|
||||
<div id="sessions">
|
||||
<div id="new">
|
||||
<div id="c-sessions">
|
||||
<div id="a-new">
|
||||
<section>
|
||||
<h1>Login</h1>
|
||||
<%= form_tag(session_path, :class => "simple_form") do %>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<div id="c-tag-subscriptions">
|
||||
<div id="a-posts">
|
||||
<aside id="sidebar">
|
||||
<%= render :partial => "posts/partials/common/search", :locals => {:path => posts_tag_subscription_path, :tags => @post_set.tag_string} %>
|
||||
<%= render "posts/partials/common/search", :path => posts_tag_subscription_path, :tags => @post_set.tag_string %>
|
||||
|
||||
<%= render :partial => "posts/partials/index/mode_menu" %>
|
||||
<%= render "posts/partials/index/mode_menu" %>
|
||||
|
||||
<%= render :partial => "posts/partials/index/blacklist" %>
|
||||
<%= render "posts/partials/index/blacklist" %>
|
||||
</aside>
|
||||
|
||||
<section id="content">
|
||||
@@ -20,7 +20,7 @@
|
||||
/fav:<%= CurrentUser.name %>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "posts/partials/common/secondary_links" %>
|
||||
<%= render "posts/partials/common/secondary_links" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -27,4 +27,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "posts/partials/common/secondary_links" %>
|
||||
<%= render "posts/partials/common/secondary_links" %>
|
||||
@@ -59,4 +59,4 @@
|
||||
/ Upload
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => "posts/partials/common/secondary_links" %>
|
||||
<%= render "posts/partials/common/secondary_links" %>
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<%= render :partial => "posts/partials/common/secondary_links" %>
|
||||
<%= render "posts/partials/common/secondary_links" %>
|
||||
|
||||
@@ -51,4 +51,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "secondary_links" %>
|
||||
<%= render "secondary_links" %>
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="c-wiki-pages">
|
||||
<div id="a-index">
|
||||
<%= render :partial => "wiki_pages/sidebar" %>
|
||||
<%= render "wiki_pages/sidebar" %>
|
||||
|
||||
<section id="content">
|
||||
<h1>Wiki Pages</h1>
|
||||
@@ -37,4 +37,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "wiki_pages/secondary_links" %>
|
||||
<%= render "wiki_pages/secondary_links" %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div id="c-wiki-pages">
|
||||
<div id="a-index">
|
||||
<%= render :partial => "sidebar" %>
|
||||
<%= render "sidebar" %>
|
||||
|
||||
<section id="content">
|
||||
<h1>Wiki Pages</h1>
|
||||
|
||||
5
script/delayed_job
Executable file
5
script/delayed_job
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment'))
|
||||
require 'delayed/command'
|
||||
Delayed::Command.new(ARGV).daemonize
|
||||
Reference in New Issue
Block a user