forked from e621ng/e621ng
view changes
This commit is contained in:
parent
24bf21540a
commit
2b7a8f2d67
3
Gemfile
3
Gemfile
@ -24,4 +24,5 @@ gem "mechanize"
|
||||
gem "nokogiri"
|
||||
gem "meta_search", :git => "git://github.com/ernie/meta_search.git"
|
||||
gem "silent-postgres"
|
||||
gem "whenever", :require => false
|
||||
gem "whenever", :require => false
|
||||
gem "bourbon"
|
||||
|
@ -48,6 +48,8 @@ GEM
|
||||
multi_json (~> 1.0)
|
||||
arel (2.1.4)
|
||||
bcrypt-ruby (2.1.4)
|
||||
bourbon (0.1.5)
|
||||
sass (>= 3.1)
|
||||
builder (3.0.0)
|
||||
daemons (1.1.4)
|
||||
delayed_job (2.1.4)
|
||||
@ -103,6 +105,7 @@ GEM
|
||||
thor (~> 0.14.6)
|
||||
rake (0.9.2)
|
||||
rdoc (3.9.1)
|
||||
sass (3.1.7)
|
||||
shoulda (2.11.3)
|
||||
silent-postgres (0.0.8)
|
||||
simple_form (1.4.2)
|
||||
@ -134,6 +137,7 @@ PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
bourbon
|
||||
delayed_job
|
||||
factory_girl
|
||||
ffaker!
|
||||
|
@ -35,7 +35,7 @@
|
||||
} else if (command === "[reset]") {
|
||||
return [];
|
||||
} else if (command[0] === "-") {
|
||||
return tags.reject(function(x) {return x == command.substr(1, 100)})
|
||||
return Danbooru.reject(tags, function(x) {return x === command.substr(1, 100)});
|
||||
} else {
|
||||
tags.push(command)
|
||||
return tags;
|
||||
@ -44,13 +44,13 @@
|
||||
|
||||
Danbooru.TagScript.run = function(post_id, tag_script) {
|
||||
var commands = this.parse(tag_script);
|
||||
var post = Post.posts.get(post_id);
|
||||
var old_tags = post.tags.join(" ");
|
||||
var post = $("#p_" + post_id);
|
||||
var old_tags = post.data("tags");
|
||||
|
||||
$.each(commands, function(i, x) {
|
||||
post.tags = Danbooru.TagScript.process(post.tags, x);
|
||||
post.data("tags", Danbooru.TagScript.process(post.data("tags"), x));
|
||||
})
|
||||
|
||||
Danbooru.Post.update(post_id, {"post[old_tags]": old_tags, "post[tags]": post.tags.join(" ")});
|
||||
Danbooru.Post.update(post_id, {"post[old_tags]": old_tags, "post[tags]": post.data("tags")});
|
||||
}
|
||||
})();
|
||||
|
@ -1,4 +1,4 @@
|
||||
$(document).ready(function() {
|
||||
$(function() {
|
||||
var img = $("#image-preview img");
|
||||
if (img) {
|
||||
var height = img.attr("height");
|
||||
@ -7,7 +7,7 @@ $(document).ready(function() {
|
||||
var ratio = 400.0 / height;
|
||||
img.attr("height", height * ratio);
|
||||
img.attr("width", width * ratio);
|
||||
$("#scale").val("Scaled " + parseInt(100 * ratio) + "%");
|
||||
$("#scale").html("Scaled " + parseInt(100 * ratio) + "%");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -34,4 +34,14 @@
|
||||
|
||||
return all;
|
||||
}
|
||||
|
||||
Danbooru.reject = function(array, f) {
|
||||
var filtered = [];
|
||||
$.each(array, function(i, x) {
|
||||
if (!f(x)) {
|
||||
filtered.push(x);
|
||||
}
|
||||
});
|
||||
return filtered;
|
||||
}
|
||||
})();
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*= require "smoothness/jquery-ui-1.8.5.custom.css" */
|
||||
@import 'bourbon';
|
||||
|
||||
$link_color: #006FFA;
|
||||
$link_hover_color: #9093FF;
|
||||
|
@ -12,6 +12,11 @@ class ArtistsController < ApplicationController
|
||||
respond_with(@artist)
|
||||
end
|
||||
|
||||
def banned
|
||||
@artists = Artist.where("is_banned = ?", true).order("name")
|
||||
respond_with(@artists)
|
||||
end
|
||||
|
||||
def index
|
||||
@search = Artist.search(params[:search])
|
||||
@artists = @search.paginate(params[:page])
|
||||
|
@ -166,6 +166,10 @@ class Artist < ActiveRecord::Base
|
||||
include NoteMethods
|
||||
include TagMethods
|
||||
|
||||
def ban!
|
||||
|
||||
end
|
||||
|
||||
def initialize_creator
|
||||
self.creator_id = CurrentUser.user.id
|
||||
end
|
||||
|
13
app/views/artists/banned.html.erb
Normal file
13
app/views/artists/banned.html.erb
Normal file
@ -0,0 +1,13 @@
|
||||
<div id="c-artists">
|
||||
<div id="a-banned">
|
||||
<h1>Banned Artists</h1>
|
||||
|
||||
<p>The following artists have requested they be removed from the site. Please do not upload any works from these artists. These artists all have implications pointing to the <code>banned_artist</code> tag.</p>
|
||||
|
||||
<ul>
|
||||
<% @artists.each do |artist| %>
|
||||
<li><%= link_to artist.name, artist_path(artist) %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
@ -38,6 +38,7 @@ Danbooru::Application.routes.draw do
|
||||
end
|
||||
collection do
|
||||
get :search
|
||||
get :banned
|
||||
end
|
||||
end
|
||||
resources :artist_versions, :only => [:index]
|
||||
|
Loading…
Reference in New Issue
Block a user