related tags: factor partials out from post, upload edit forms.
This commit is contained in:
@@ -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;">«</a></h1>
|
||||
<div id="related-tags" class="related-tags">
|
||||
</div>
|
||||
</div>
|
||||
<%= render "related_tags/container" %>
|
||||
<% end %>
|
||||
|
||||
5
app/views/related_tags/_buttons.html.erb
Normal file
5
app/views/related_tags/_buttons.html.erb
Normal 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 %>
|
||||
5
app/views/related_tags/_container.html.erb
Normal file
5
app/views/related_tags/_container.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<div id="related-tags-container">
|
||||
<h1>Related Tags <a href="#" id="toggle-related-tags-link" style="display: none;">«</a></h1>
|
||||
<div id="related-tags" class="related-tags">
|
||||
</div>
|
||||
</div>
|
||||
@@ -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;">«</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>
|
||||
|
||||
Reference in New Issue
Block a user