related tags: factor partials out from post, upload edit forms.

This commit is contained in:
evazion
2018-10-12 21:18:15 -05:00
parent e133a598a3
commit 5a05961bde
4 changed files with 14 additions and 20 deletions

View File

@@ -82,20 +82,12 @@
<span id="open-edit-dialog" class="ui-icon ui-icon-arrow-1-ne" title="detach" style="display: none;" data-shortcut="shift+e"/>
</div>
<%= button_tag "Related tags", :id => "related-tags-button", :type => "button", :class => "ui-button ui-widget ui-corner-all sub gradient" %>
<% TagCategory.related_button_list.each do |category| %>
<%= button_tag "#{TagCategory.related_button_mapping[category]}", :id => "related-#{category}-button", :type => "button", :class => "ui-button ui-widget ui-corner-all sub gradient" %>
<% end %>
<%= render "related_tags/buttons" %>
</div>
<div class="input">
<%= submit_tag "Submit", :class => "ui-button ui-widget ui-corner-all" %>
</div>
<div id="related-tags-container">
<h1>Related Tags <a href="#" id="toggle-related-tags-link" style="display: none;">&laquo;</a></h1>
<div id="related-tags" class="related-tags">
</div>
</div>
<%= render "related_tags/container" %>
<% end %>

View File

@@ -0,0 +1,5 @@
<%= button_tag "Related tags", :id => "related-tags-button", :type => "button", :class => "ui-button ui-widget ui-corner-all sub gradient" %>
<% TagCategory.related_button_list.each do |category| %>
<%= button_tag "#{TagCategory.related_button_mapping[category]}", :id => "related-#{category}-button", :type => "button", :class => "ui-button ui-widget ui-corner-all sub gradient" %>
<% end %>

View File

@@ -0,0 +1,5 @@
<div id="related-tags-container">
<h1>Related Tags <a href="#" id="toggle-related-tags-link" style="display: none;">&laquo;</a></h1>
<div id="related-tags" class="related-tags">
</div>
</div>

View File

@@ -97,22 +97,14 @@
<span id="open-edit-dialog" class="ui-icon ui-icon-arrow-1-ne" title="detach" style="display: none;" data-shortcut="shift+e"/>
</div>
<%= button_tag "Related tags", :id => "related-tags-button", :type => "button", :class => "ui-button ui-widget ui-corner-all sub gradient" %>
<% TagCategory.related_button_list.each do |category| %>
<%= button_tag "#{TagCategory.related_button_mapping[category]}", :id => "related-#{category}-button", :type => "button", :class => "ui-button ui-widget ui-corner-all sub gradient" %>
<% end %>
<%= render "related_tags/buttons" %>
</div>
<div class="input">
<%= submit_tag "Submit", :id => "submit-button", :class => "large ui-button ui-widget ui-corner-all gradient", data: {disable_with: false} %>
</div>
<div id="related-tags-container">
<h1>Related Tags <a href="#" id="toggle-related-tags-link" style="display: none;">&laquo;</a></h1>
<div id="related-tags" class="related-tags">
</div>
</div>
<%= render "related_tags/container" %>
<% end %>
<% else %>
<h2 style="margin-bottom: 1em;">You <%= CurrentUser.user.upload_limited_reason %></h2>