Sha256: 72930e90621e2a1c345e47bc5f2ab337ac3461be3df09688a09f4fe05d292a14

Contents?: true

Size: 1.91 KB

Versions: 7

Compression:

Stored size: 1.91 KB

Contents

li.entry class="#{content.kind == 'folder' ? "directory #{state || 'closed'}" : 'file'}" data-content="#{content.id}" data-at-content="#{content.id}" data-controller="#{content.kind == 'folder' ? 'upload' : ''}" data-upload-url="#{upload_admin_site_contents_url(@site)}" data-upload-param-name="content[files][]" data-upload-extra-data=%[{"content[parent_id]": "#{content.id}"}]
  - if content.kind == 'folder'
    a.list-item data-action="dblclick->tree-view#rename" data-tree-view-rename-url="#{rename_admin_site_content_url(content.site, content)}"
      span.name data-path="#{content.path}" = content.path
      .tools
        i.fal.fa-file-plus data-action="click->tree-view#create" data-kind="text" data-url="#{admin_site_contents_url(@site)}" title=I18n.t('scribo.tools.new_file')
        i.fal.fa-folder-plus data-action="click->tree-view#create" data-kind="folder" data-url="#{admin_site_contents_url(@site)}" title=I18n.t('scribo.tools.new_folder')
        i.fal.fa-trash data-action="click->tree-view#delete" data-url="#{admin_site_content_path(@site, content)}" data-confirm=I18n.t('scribo.confirm.delete_folder') title=I18n.t('scribo.tools.delete_folder')

  - else
    a.list-item data-action="click->tree-view#open dblclick->tree-view#rename" data-tree-view-url="#{edit_admin_site_content_url(content.site, content)}" data-tree-view-rename-url="#{rename_admin_site_content_url(content.site, content)}"
      span.name data-path="#{content.path}" = content.path
      .tools
        i.fal.fa-trash data-action="click->tree-view#delete" data-url="#{admin_site_content_path(@site, content)}" data-confirm=I18n.t('scribo.confirm.delete_file') title=I18n.t('scribo.tools.delete_file')
  ul data-parent="#{content.id}"
    - (content.children.where(kind: 'folder').reorder(:path) + content.children.where("kind <> 'folder'").reorder(:path)).each do |child|
      = render partial: 'scribo/shared/entry', locals: {content: child, state: 'closed'}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
scribo-1.0.44 app/views/scribo/shared/_entry.html.slim
scribo-1.0.43 app/views/scribo/shared/_entry.html.slim
scribo-1.0.42 app/views/scribo/shared/_entry.html.slim
scribo-1.0.41 app/views/scribo/shared/_entry.html.slim
scribo-1.0.40 app/views/scribo/shared/_entry.html.slim
scribo-1.0.39 app/views/scribo/shared/_entry.html.slim
scribo-1.0.38 app/views/scribo/shared/_entry.html.slim