This commit is contained in:
albert
2010-11-19 16:24:17 -05:00
parent a156cc8c62
commit c6304c6e08
41 changed files with 346 additions and 53 deletions

View File

@@ -1,3 +1,3 @@
<%= image_tag(@advertisement.image_url) %>
<%= render :partial => "form" %>
<%= render :partial => "secondary_nav_links" %>
<%= render "form" %>
<%= render "secondary_links" %>

View File

@@ -42,4 +42,4 @@
</tbody>
</table>
<%= render :partial => "secondary_nav_links" %>
<%= render "secondary_links" %>

View File

@@ -1,3 +1,3 @@
<%= error_messages_for :advertisement %>
<%= render :partial => "form" %>
<%= render :partial => "secondary_nav_links" %>
<%= render "form" %>
<%= render "secondary_links" %>

View File

@@ -4,4 +4,4 @@
<li>Hits: <%= @advertisement.hits.between(@start_date, @end_date).count %></li>
</ul>
<%= render :partial => "secondary_nav_links" %>
<%= render "secondary_links" %>

View File

@@ -33,5 +33,5 @@
<%= will_paginate(@artist_versions) %>
</div>
<%= render :partial => "footer" %>
<%= render "artists/secondary_links" %>

View File

@@ -1,7 +1,7 @@
<div id="artists">
<div id="edit">
<%= render :partial => "form" %>
<%= render "form" %>
</div>
</div>
<%= render :partial => "secondary_links" %>
<%= render "secondary_links" %>

View File

@@ -1,6 +1,6 @@
<div id="artists">
<div id="index">
<%= render :partial => "search" %>
<%= render "search" %>
<table class="highlightable" width="100%">
<thead>
@@ -32,6 +32,6 @@
<%= will_paginate(@artists) %>
</div>
<%= render :partial => "secondary_links" %>
<%= render "secondary_links" %>
</div>
</div>

View File

@@ -1,7 +1,7 @@
<div id="artists">
<div id="new">
<%= render :partial => "form" %>
<%= render "form" %>
</div>
</div>
<%= render :partial => "secondary_links" %>
<%= render "secondary_links" %>

View File

@@ -79,6 +79,6 @@
</div>
</div>
<%= render :partial => "secondary_links" %>
<%= render "secondary_links" %>
</div>
</div>

View File

@@ -0,0 +1,8 @@
<%= simple_form_for(ban) do |f| %>
<%= error_messages_for("ban") %>
<%= f.input :user_name, :as => :string %>
<%= f.input :duration, :hint => "in days" %>
<%= f.input :reason %>
<%= f.button :submit, :value => "Ban" %>
<% end %>

View File

@@ -0,0 +1,6 @@
<% content_for(:secondary_links) do %>
<menu>
<li><%= link_to "Listing", bans_path %></li>
<li><%= link_to "Ban", new_ban_path %></li>
</menu>
<% end %>

View File

@@ -0,0 +1 @@
$("#ban-<%= @ban.id %>").remove();

View File

@@ -0,0 +1,8 @@
<div class="bans">
<div class="new">
<h1>Edit Ban</h1>
<%= render "form", :locals => {:ban => @ban} %>
</div>
</div>
<%= render "secondary_links" %>

View File

@@ -0,0 +1,29 @@
<div class="bans">
<div class="index">
<table>
<thead>
<tr>
<th>User</th>
<th>Expires</th>
<th>Reason</th>
<th></th>
</tr>
</thead>
<tbody>
<% @bans.each do |ban| %>
<tr id="ban-<%= ban.id %>">
<td><%= ban.user_name %></td>
<td><%= ban.expires_at %></td>
<td><%= ban.reason %></td>
<td>
<%= link_to "Edit", edit_ban_path(ban) %>
| <%= link_to "Delete", ban_path(ban), :method => :delete, :remote => true %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>
</div>
<%= render "secondary_links" %>

View File

@@ -0,0 +1,8 @@
<div class="bans">
<div class="new">
<h1>New Ban</h1>
<%= render "form", :locals => {:ban => @ban} %>
</div>
</div>
<%= render "secondary_links" %>

View File

@@ -0,0 +1,12 @@
<div class="bans">
<div class="show">
<h1>Show Ban</h1>
<ul>
<li><strong>User</strong>: <%= @ban.user_name %></li>
<li><strong>Expires</strong>: <%= @ban.expires_at %></li>
<li><strong>Reason</strong>: <%= @ban.reason %></li>
</ul>
</div>
</div>
<%= render "secondary_links" %>

View File

@@ -5,7 +5,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", :locals => {:post => post, :comments => post.comments.recent.reverse, :show_header => true} %>
<div class="clearfix"></div>
</div>
<% end %>

View File

@@ -0,0 +1,12 @@
<div id="preview">
</div>
<%= simple_form_for(dmail) do |f| %>
<%= hidden_field_tag "dmail[parent_id]", dmail.parent_id || dmail.id, :id => "dmail_parent_id" %>
<%= f.input :to_name, :label => "To" %>
<%= f.input :title %>
<%= f.input :body, :html_options => {:size => "50x25"} %>
<%= f.button :submit %>
<%= submit_tag "Preview" %>
<% end %>

View File

@@ -0,0 +1,5 @@
<tr>
<td><%= link_to dmail.from_name, user_path(dmail.from) %></td>
<td><%= link_to dmail.title, dmail_path(dmail) %></td>
<td><%= compact_time(dmail.created_at) %></td>
</tr>

View File

@@ -0,0 +1,10 @@
<div>
<%= simple_form_for @search do |f| %>
<%= hidden_field_tag :folder, params[:folder] %>
<%= f.input :title_contains %>
<%= f.input :body_contains %>
<%= f.input :to_name_equals %>
<%= f.input :from_name_equals %>
<%= f.button :submit %>
<% end %>
</div>

View File

@@ -0,0 +1,7 @@
<% content_for(:secondary_links) do %>
<menu>
<li><%= link_to "Received", dmails_path(:folder => "received") %></li>
<li><%= link_to "Sent", dmails_path(:folder => "sent") %></li>
<li><%= link_to "New", new_dmail_path %></li>
</menu>
<% end %>

View File

@@ -0,0 +1,5 @@
<tr>
<td><%= link_to dmail.to_name, user_path(dmail.from) %></td>
<td><%= link_to dmail.title, dmail_path(dmail) %></td>
<td><%= compact_time(dmail.created_at) %></td>
</tr>

View File

@@ -0,0 +1,2 @@
<h1>Edit Message</h1>
<%= render "form", :locals => {:dmail => @dmail} %>

View File

@@ -0,0 +1,15 @@
<h1>Messages</h1>
<%= render "search" %>
<table>
<tbody>
<% @dmails.each do |dmail| %>
<% if params[:folder] == "sent" %>
<%= render "sent", :locals => {:dmail => dmail} %>
<% else %>
<%= render "received", :locals => {:dmail => dmail} %>
<% end %>
<% end %>
</tbody>
</table>

View File

@@ -0,0 +1,2 @@
<h1>New Message</h1>
<%= render "form", :locals => {:dmail => @dmail} %>

View File

View File

@@ -0,0 +1 @@
<h1>Access Denied</h1>

View File

@@ -0,0 +1,90 @@
<div class="static">
<div class="site_map">
<h2><%= link_to Danbooru.config.app_name, '/' %></h2>
<div>
<ul>
<li><h4>Posts</h4></li>
<li><%= link_to("Help", wiki_pages_path(:title => "help:posts")) %></li>
<li><%= link_to("Listing", posts_path) %></li>
<li><%= link_to("Recent Changes", post_histories_path) %></li>
<li><%= link_to("Upload", new_upload_path) %></li>
</ul>
<ul>
<li><h4>Tools</h4></li>
<li><%= link_to("Bookmarklet", wiki_pages_path(:title => "help:bookmarklet")) %></li>
<li><%= link_to("API Documentation", wiki_pages_path(:title => "help:api")) %></li>
</ul>
<ul>
<li><h4>Reports</h4></li>
</ul>
</div>
<div>
<ul>
<li><h4>Tags</h4></li>
<li><%= link_to("Help", wiki_pages_path(:title => "help:tags")) %></li>
<li><%= link_to("Cheat sheet", wiki_pages_path(:title => "help:cheatsheet")) %></li>
<li><%= link_to("Aliases", tag_aliases_path) %></li>
<li><%= link_to("Implications", tag_implications_path) %></li>
<li><%= link_to("Listing", tags_path) %></li>
</ul>
<ul>
<li><h4>Notes</h4></li>
<li><%= link_to("Help", wiki_pages_path(:title => "help:notes")) %></li>
<li><%= link_to("History", note_versions_path) %></li>
<li><%= link_to("Listing", notes_path) %></li>
</ul>
<ul>
<li><h4>Artists</h4></li>
<li><%= link_to("Help", wiki_pages_path(:title => "help:artists")) %></li>
<li><%= link_to("Listing", artists_path) %></li>
</ul>
<ul>
<li><h4>Pools</h4></li>
<li><%= link_to("Help", wiki_pages_path(:title => "help:pools")) %></li>
<li><%= link_to("Listing", pools_path) %></li>
</ul>
</div>
<div>
<ul>
<li><h4>Comments</h4></li>
<li><%= link_to("Help", wiki_pages_path(:title => "help:comments")) %></li>
<li><%= link_to("Listing", comments_path) %></li>
<li><%= link_to("Trac", "http://trac.donmai.us") %></li>
</ul>
<ul>
<li><h4>Forum</h4></li>
<li><%= link_to("Help", wiki_pages_path(:title => "help:forum")) %></li>
<li><%= link_to("Listing", forum_topics_path) %></li>
</ul>
<ul>
<li><h4>Wiki</h4></li>
<li><%= link_to("Help", wiki_pages_path(:title => "help:wiki")) %></li>
<li><%= link_to("Listing", wiki_pages_path) %></li>
<li><%= link_to("Recent Changes", wiki_page_versions_path) %></li>
</ul>
</div>
<div>
<ul>
<li><h4>Users</h4></li>
<li><%= link_to("Help", wiki_pages_path(:title => "help:users")) %></li>
<li><%= link_to("Bans", bans_path) %></li>
<li><%= link_to("Listing", users_path) %></li>
<% unless CurrentUser.nil? %>
<li><%= link_to("Profile", user_path(CurrentUser.user)) %></li>
<% end %>
<li><%= link_to("Feedback", user_feedback_path) %></li>
<li><%= link_to("Settings", edit_user_path(CurrentUser.user)) %></li>
<li><%= link_to("Signup", new_user_path) %></li>
<li><%= link_to("Terms of Service", terms_of_service_path) %></li>
</ul>
<% if CurrentUser.is_admin? %>
<ul>
<li><h4>Admin</h4></li>
<li><%= link_to("Edit User", admin_users_edit_path) %></li>
<li><%= link_to("Janitor Trials", janitor_trials_path) %></li>
<li><%= link_to("IP Bans", ip_bans_path) %></li>
</ul>
<% end %>
</div>
</div>
</div>

View File

@@ -0,0 +1,15 @@
<div class="login-header">
<% if CurrentUser.is_anonymous? %>
<% form_tag(sessions_path) do %>
<span class="notice">You are not logged in.</span>
<%= label_tag :name %>
<%= text_field_tag :name %>
<%= label_tag :password %>
<%= password_field_tag :password %>
<% end %>
<% else %>
<%#= nav_link_to("My Account", user_path(CurrentUser.user)) %>
<% end %>
</div>

View File

@@ -0,0 +1,15 @@
<% content_for(:secondary_links) do %>
<menu>
<li><%= link_to "Listing", users_path %></li>
<li><%= link_to "Register", new_user_path %></li>
<% if @user && !@user.new_record? %>
<li>|</li>
<li><%= link_to "Edit", edit_user_path(@user) %></li>
<li><%= link_to "Profile", user_path(@user) %></li>
<% end %>
<% unless CurrentUser.user.is_anonymous? %>
<li>|</li>
<li><%= link_to "Logout", session_path(0), :method => :delete %></li>
<% end %>
</menu>
<% end %>