refactored source code, work on pixiv integration
This commit is contained in:
15
app/views/sources/_info.html.erb
Normal file
15
app/views/sources/_info.html.erb
Normal file
@@ -0,0 +1,15 @@
|
||||
<!--
|
||||
- source
|
||||
-->
|
||||
|
||||
<% if source.try(:available?) %>
|
||||
<div id="source-info">
|
||||
<p>This looks like a <%= source.site_name %> upload. <%= link_to "Fetch data", source_path(:format => "json", :url => params[:url]), :id => "fetch-data" %>.</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Artist</strong>: <span id="source-artist"></span></li>
|
||||
<li><strong>Tags</strong>: <span id="source-tags"></span></li>
|
||||
<li><strong>Record</strong>: <span id="source-record"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -1,6 +0,0 @@
|
||||
({
|
||||
"artist_name": "<%= j @source.artist_name %>",
|
||||
"profile_url": "<%= j @source.profile_url %>",
|
||||
"image_url": "<%= j @source.image_url %>",
|
||||
"tags": <%= @source.tags.to_json.html_safe %>
|
||||
});
|
||||
Reference in New Issue
Block a user