Sha256: 0ee2a2a2d097197116a903f434ccc38ffeddf233530becf12a5331b6f842651a
Contents?: true
Size: 1.58 KB
Versions: 18
Compression:
Stored size: 1.58 KB
Contents
- for_context ||= context /! admin_it_#{for_context.resource.name}_toolbar - if for_context.collection? - new_context = for_context.resource.contexts.find do |c| - c <= AdminIt::NewContext / add button - unless new_context.nil? - opts = { add_class: 'btn-success', icon: 'plus' } - if for_context.child? - opts[:dialog] = '#child_modal' - opts[:link] = new_context.url(parent: for_context.parent, layout: :dialog) - else - opts[:link] = new_context.url = for_context.toolbar.button t('admin_it.action.create'), opts / collection context select - if resource.collections.size > 1 && !for_context.child? - for_context.toolbar.buttons(class: 'pull-right') do |buttons| - resource.collections.each do |collection| - btn_class = ['btn-default'] - btn_class << 'active' if collection.context_name == for_context.name = buttons.button add_class: btn_class, \ link: collection.path, \ icon: collection.icon / filters - unless for_context.all_filters.empty? || for_context.child? - for_context.toolbar.buttons(class: 'pull-right admin-it-filters') do |buttons| = buttons.button add_class: 'btn-info dropdown-toggle', \ add_data: { toggle: 'dropdown' }, \ link: '#', icon: 'filter' do |button| = t('admin_it.filters') span.caret< ul.dropdown-menu role="menu" - for_context.all_filters.each do |filter| li: a href=for_context.url_for(filters: filter.filter_name) = filter.display_name
Version data entries
18 entries across 18 versions & 1 rubygems