Sha256: 4d864d4d2f5665b559708517292c0ea108970b16a01083c8ab5b3804c357a9f9
Contents?: true
Size: 785 Bytes
Versions: 4
Compression:
Stored size: 785 Bytes
Contents
- read ||= false - categories = [params[:categories]].flatten.compact - active = categories.flatten.member?(category.label) .category{id: dom_id(category)} - if read - active_class = active ? "btn-dark" : "btn-light" - categories = active ? categories.reject{|c| c == category.label} : categories << category.label = link_to category.label, {categories: categories}, class: "btn btn-sm #{active_class}" - else .btn-group = link_to category.label, edit_comfy_admin_cms_site_category_path(@site, category), remote: true, class: "btn btn-sm btn-light" = link_to comfy_admin_cms_site_category_path(@site, category), method: :delete, remote: true, data: {confirm: t('.are_you_sure')}, class: 'btn btn-sm btn-danger' do = fa_icon "times"
Version data entries
4 entries across 4 versions & 1 rubygems