Sha256: 8fc3351835852822f4dd826f043a6b392e9005ed6e0f3117797013a7644cc05b

Contents?: true

Size: 1.75 KB

Versions: 25

Compression:

Stored size: 1.75 KB

Contents

<div class="btn-group pull-left bulk-update">
    <a data-toggle="dropdown" class="btn btn-primary dropdown-toggle btn-sm" type="button"><%= t("views.admin.generic.bulk_update_options.button_title") %>
    <span class="caret"></span>
  </a>
    <ul role="menu" class="dropdown-menu">
      <% @options.each do |k, v| %>
        <% if k == 'publish' %>
          <li><a href="javascript:void(0)" data-val="<%= k %>"><i class="fa fa-refresh"></i>&nbsp;<%= v %></a></li>
        <% elsif k == 'draft' %>
          <li><a href="javascript:void(0)" data-val="<%= k %>"><i class="fa fa-edit"></i>&nbsp;<%= v %></a></li>
        <% elsif k == 'move_to_trash' || k == 'destroy' %>
          <li><a href="javascript:void(0)" data-val="<%= k %>"><i class="fa fa-trash-o"></i>&nbsp;<%= v %></a></li>
        <% elsif k == 'mark_as_spam'%>
            <li><a href="javascript:void(0)" data-val="<%= k %>"><i class="fa fa-fire"></i>&nbsp;<%= v %></a></li>
        <% elsif k == 'approve' %>
            <li><a href="javascript:void(0)" data-val="<%= k %>"><i class="fa fa-check"></i>&nbsp;<%= v %></a></li>
        <% elsif k == 'unapprove' %>
            <li><a href="javascript:void(0)" data-val="<%= k %>"><i class="fa fa-minus"></i>&nbsp;<%= v %></a></li>
        <% elsif k == 'reinstate' %>
            <li><a href="javascript:void(0)" data-val="<%= k %>"><i class="fa fa-reply"></i>&nbsp;<%= v %></a></li>
        <% else %>
        <li><a href="javascript:void(0)" data-val="<%= k %>"><%= v %></a></li>
        <% end %>
      <% end %>
    </ul>
</div>
<input type="hidden" name="to_do" />

<script type='text/javascript'>

    $('ul.dropdown-menu li a').bind('click', function(){
      $('input[name=to_do]').val($(this).attr('data-val'))
      $(this).closest('form').submit();
    });

</script>

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
roroacms-1.0.0 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.8.6.7 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.8.6.6 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.8.6.5 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.8.6.4 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.8.6.3 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.8.6.2 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.8.6.1 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.8.6 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.8.5 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.8.4 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.8.3 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.8.2 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.8.1 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.8 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.7.10 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.7.8 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.7.7 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.7.6 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb
roroacms-0.0.7.5 app/views/roroacms/admin/partials/_bulk_update_dropdown.html.erb