Created
November 11, 2016 14:13
-
-
Save owen2345/10eecb77a9adce02dca2b5b8321cf280 to your computer and use it in GitHub Desktop.
Sample Theme Settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- /my_theme/views/admin/settings.html.erb --> | |
<div class="panel panel-default"> | |
<div class="panel-heading"> | |
<h3 class="panel-title"><%= t('.top_offer', default: 'Top Offer') %></h3> | |
</div> | |
<div class="panel-body"> | |
<div class="form-group"> | |
<label><%= t('.top_offer_product', default: 'Offer Product') %></label><br> | |
<%= select_tag "theme_option[top_offer]", options_from_collection_for_select(post_type.posts.public_posts.decorate, :id, :the_title, current_theme.get_option('top_offer')), include_blank: true, class: 'form-control' %> | |
</div> | |
<div class="form-group"> | |
<label><%= t('.top_offer_image', default: 'Offer Image') %></label><br> | |
<%= hidden_field_tag "theme_option[top_offer_image]", current_theme.get_option('top_offer_image'), class: 'form-control input_upload', 'data-dimension' => '275x395' %> | |
</div> | |
<div class="form-group"> | |
<label><%= t('.top_offer_percentage', default: 'Percentage Disccount') %></label><br> | |
<%= text_field_tag "theme_option[top_offer_percentage]", current_theme.get_option('top_offer_percentage', 0), class: 'form-control number' %> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To use the values: