move save search button to sidebar
This commit is contained in:
@@ -38,7 +38,7 @@ div#page {
|
||||
}
|
||||
|
||||
input[type=text] {
|
||||
width: 8em;
|
||||
width: 10em;
|
||||
z-index: 1000;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
@import "common/010_reset.scss";
|
||||
@import "common/020_base.scss";
|
||||
@import "common/030_links.scss";
|
||||
|
||||
body {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
input[type=text], input[type=submit] {
|
||||
font-size: 18pt;
|
||||
}
|
||||
|
||||
/* paginator */
|
||||
div.paginator {
|
||||
font-size: 16pt;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
|
||||
li {
|
||||
display: inline;
|
||||
|
||||
a, span {
|
||||
padding: 3px 18px;
|
||||
margin: 0 3px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* posts/index */
|
||||
article.post-preview {
|
||||
margin: 15px 0;
|
||||
width: 150px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
a {
|
||||
width: 150px;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
img {
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* posts/show */
|
||||
img#image {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
div#options {
|
||||
margin-top: 10px;
|
||||
font-size: 24pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div#tags {
|
||||
margin-top: 30px;
|
||||
|
||||
li {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
a.search-tag {
|
||||
font-size: 24pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
@@ -90,6 +90,7 @@ class ApplicationController < ActionController::Base
|
||||
flash[:notice] = "This feature isn't available: #{@exception.message}"
|
||||
respond_to do |fmt|
|
||||
fmt.html { redirect_to :back }
|
||||
fmt.js { render nothing: true, status: 501 }
|
||||
fmt.json { render template: "static/error", status: 501 }
|
||||
fmt.xml { render template: "static/error", status: 501 }
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ class SavedSearchesController < ApplicationController
|
||||
end
|
||||
|
||||
def create
|
||||
@saved_search = saved_searches.create(:query => params[:saved_search_tags], :label_string => params[:saved_search_labels])
|
||||
@saved_search = saved_searches.create!(:query => params[:saved_search_tags], :label_string => params[:saved_search_labels])
|
||||
if params[:saved_search_disable_labels]
|
||||
CurrentUser.disable_categorized_saved_searches = true
|
||||
CurrentUser.save
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
<%= render "posts/partials/index/blacklist" %>
|
||||
|
||||
<%#= raw common_searches_html(CurrentUser.user) %>
|
||||
|
||||
<section id="tag-box">
|
||||
<h1>Tags</h1>
|
||||
<%= @post_set.presenter.tag_list_html(self) %>
|
||||
</section>
|
||||
|
||||
<%= render "posts/partials/index/options" %>
|
||||
|
||||
<%= render "posts/partials/index/related" %>
|
||||
</aside>
|
||||
|
||||
|
||||
@@ -15,17 +15,6 @@
|
||||
<% end %>
|
||||
<%= hidden_field_tag "ms", "1" %>
|
||||
<%= submit_tag "Go", :name => nil, :class => "ui-button ui-widget ui-corner-all tiny gradient" %>
|
||||
<%= submit_tag "+", :id => "expand-search", "data-jq-dropdown" => "#search-dropdown", :class => "ui-button ui-widget ui-corner-all tiny gradient" %>
|
||||
<div id="search-dropdown" class="jq-dropdown jq-dropdown-tip">
|
||||
<ul class="jq-dropdown-menu">
|
||||
<% if SavedSearch.enabled? && CurrentUser.show_saved_searches? %>
|
||||
<li><%= link_to "Save search", saved_searches_path, :id => "save-search" %></li>
|
||||
<% end %>
|
||||
|
||||
<li><%= link_to "Search wiki", wiki_pages_path, :id => "wiki-search" %></li>
|
||||
<li><%= link_to "Search artists", artists_path, :id => "artist-search" %></li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
|
||||
8
app/views/posts/partials/index/_options.html.erb
Normal file
8
app/views/posts/partials/index/_options.html.erb
Normal file
@@ -0,0 +1,8 @@
|
||||
<section id="options-box">
|
||||
<h1>Options</h1>
|
||||
<ul>
|
||||
<% if SavedSearch.enabled? && CurrentUser.is_member? %>
|
||||
<li><%= button_tag "Save search", id: "save-search", class: "ui-button ui-widget ui-corner-all gradient sub" %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</section>
|
||||
Reference in New Issue
Block a user