Sha256: c903fdc20a4ff4b6556229b68d00f2184b0ca2cf3dfe0245e2a397844bee8172
Contents?: true
Size: 961 Bytes
Versions: 2
Compression:
Stored size: 961 Bytes
Contents
<div id="filter_bar"> <h2><%= Alchemy.t('Filter') %></h2> <%= select_tag( 'picture_filter', options_for_select([ [Alchemy.t(:all_pictures), ''], [Alchemy.t(:last_upload_only), 'last_upload'], [Alchemy.t(:recently_uploaded_only), 'recent'], [Alchemy.t(:without_tag), 'without_tag'] ], search_filter_params[:filter]), :data => { :remote => !!request.xhr? }, :class => 'alchemy_selectbox' ) %> </div> <script type="text/javascript"> $(function() { $('#picture_filter').on('change', function(e) { var $this = $(this); var url = '<%= alchemy.admin_pictures_path(search_filter_params.except(:filter).to_h) %>'; if ($this.data('remote') === true) { $.get(url, {filter: $this.val()}, null, 'script'); } else { delimiter = url.match(/\?/) ? '&' : '?'; Turbolinks.visit(url + delimiter + 'filter=' + $this.val()); } return false; }); }); </script>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
alchemy_cms-4.1.0.rc1 | app/views/alchemy/admin/pictures/_filter_bar.html.erb |
alchemy_cms-4.1.0.beta | app/views/alchemy/admin/pictures/_filter_bar.html.erb |