Merge branch 'testing'

Conflicts:
	app/views/artists/_quick_search.html.erb
	app/views/pools/_quick_search.html.erb
	app/views/tags/_quick_search.html.erb
	app/views/wiki_pages/_quick_search.html.erb
This commit is contained in:
Toks
2013-03-30 15:50:31 -04:00
13 changed files with 21 additions and 18 deletions

View File

@@ -95,7 +95,7 @@
$("#related-tags").show();
var query = Danbooru.RelatedTag.recent_search.query;
var related_tags = Danbooru.RelatedTag.recent_search.tags.sort();
var related_tags = Danbooru.RelatedTag.recent_search.tags;
var wiki_page_tags = Danbooru.RelatedTag.recent_search.wiki_page_tags;
var $dest = $("#related-tags");
$dest.empty();

View File

@@ -15,7 +15,7 @@ header#top {
display: inline-block;
input {
width: 8em;
width: 8.5em;
}
}

View File

@@ -19,6 +19,7 @@ class DText
str.gsub!(/\[i\](.+?)\[\/i\]/i, '<em>\1</em>')
str.gsub!(/\[s\](.+?)\[\/s\]/i, '<s>\1</s>')
str.gsub!(/\[u\](.+?)\[\/u\]/i, '<u>\1</u>')
str.gsub!(/\[spoilers?\](.+?)\[\/spoilers?\]/i, '<span class="spoiler">\1</span>')
str = parse_links(str)
str = parse_aliased_wiki_links(str)
@@ -127,8 +128,6 @@ class DText
str.gsub!(/\s*\[\/quote\]\s*/m, "\n\n[/quote]\n\n")
str.gsub!(/\s*\[code\]\s*/m, "\n\n[code]\n\n")
str.gsub!(/\s*\[\/code\]\s*/m, "\n\n[/code]\n\n")
str.gsub!(/\s*\[spoilers?\](?!\])\s*/m, "\n\n[spoiler]\n\n")
str.gsub!(/\s*\[\/spoilers?\]\s*/m, "\n\n[/spoiler]\n\n")
end
str.gsub!(/(?:\r?\n){3,}/, "\n\n")
@@ -178,16 +177,6 @@ class DText
flags[:code] = false
'</pre>'
when /\[spoilers?\](?!\])/
stack << "div"
'<div class="spoiler">'
when /\[\/spoilers?\]/
if stack.last == "div"
stack.pop
'</div>'
end
else
if flags[:code]
block

View File

@@ -1,3 +1,3 @@
<%= form_tag(artists_path, :method => :get) do %>
<%= text_field "search", "name", :id => "quicksearch_name" %>
<%= text_field "search", "name", :id => "quicksearch_name", :placeholder => "Search artists" %>
<% end %>

View File

@@ -0,0 +1,4 @@
<%= form_tag(comments_path, :method => :get) do %>
<%= hidden_field_tag "group_by", "comment" %>
<%= text_field "search", "body_matches", :placeholder => "Search comments" %>
<% end %>

View File

@@ -1,5 +1,6 @@
<% content_for(:secondary_links) do %>
<menu>
<li><%= render "quick_search" %></li>
<li><%= link_to "Listing", comments_path(:group_by => "post") %></li>
<li><%= link_to "Search", search_comments_path %></li>
<li><%= link_to "Help", wiki_pages_path(:title => "help:comments") %></li>

View File

@@ -0,0 +1,4 @@
<%= form_tag(notes_path, :method => :get) do %>
<%= hidden_field_tag "group_by", "note" %>
<%= text_field "search", "body_matches", :placeholder => "Search notes" %>
<% end %>

View File

@@ -1,5 +1,6 @@
<% content_for(:secondary_links) do %>
<menu>
<li><%= render "quick_search" %></li>
<li><%= link_to "Listing", notes_path(:group_by => "post") %></li>
<li><%= link_to "Search", search_notes_path %></li>
<li><%= link_to "History", note_versions_path %></li>

View File

@@ -1,3 +1,3 @@
<%= form_tag(pools_path, :method => :get) do %>
<%= text_field "search", "name_matches", :id => "quick_search_name_matches" %>
<%= text_field "search", "name_matches", :id => "quick_search_name_matches", :placeholder => "Search pools" %>
<% end %>

View File

@@ -1,3 +1,3 @@
<%= form_tag(tags_path, :method => :get) do %>
<%= text_field "search", "name_matches", :id => "quick_search_name_matches" %>
<%= text_field "search", "name_matches", :id => "quick_search_name_matches", :placeholder => "Search tags" %>
<% end %>

View File

@@ -0,0 +1,3 @@
<%= form_tag(users_path, :method => :get) do %>
<%= text_field "search", "name_matches", :placeholder => "Search users" %>
<% end %>

View File

@@ -1,5 +1,6 @@
<% content_for(:secondary_links) do %>
<menu>
<li><%= render "quick_search" %>
<li><%= link_to "Listing", users_path %></li>
<li><%= link_to "Search", search_users_path %></li>

View File

@@ -1,3 +1,3 @@
<%= form_tag(wiki_pages_path, :method => :get) do %>
<%= text_field "search", "title", :id => "quick_search_title" %>
<%= text_field "search", "title", :id => "quick_search_title", :placeholder => "Search wiki pages" %>
<% end %>