Sha256: 227a4600a77f67175b690a90549c9aa17590fcf4ad612cfc1e56a578f8f181c9

Contents?: true

Size: 1.73 KB

Versions: 20

Compression:

Stored size: 1.73 KB

Contents

- snippet_authored_by_me = snippet.author_id == current_user.id
- row_selector = "tr[data-snippet-id='#{snippet.id}']"

tr(data={ "snippet-id" => snippet.id, invocation_url: snippet_invocations_path(snippet) })
  td
    = link_to "Toggle",
              "#{row_selector} .css-toggle-container",
              class: "button compact low-key",
              title: "Toggle the visibility of the entire content and body",
              data: { behaviour: "css-toggler" }
    |  
    = tooltip_with_block(label: t(".copy_to_clipboard")) do
      = clipboard_button_for("#{row_selector} .body")
    - if remote
      |  
      = link_to "Insert",
                 "#",
                 title: "Insert this snippet into the letter",
                 class: "insert-snippet button compact alternative"
  - unless author == :me
    td.col-width-medium.author= snippet.author
  td.css-toggle-container.title
    = tooltip_with_block(label: snippet.title) do
      = snippet.title
  td.css-toggle-container.body
    .body-content= snippet.body.html_safe
  - unless remote
    td.last_used_on
      = "#{snippet.last_used_on? ? l(snippet.last_used_on) : 'Never'} (#{snippet.times_used})"
    td.updated_at= l(snippet.updated_at)
    td.actions

      - if snippet_authored_by_me
        = link_to t(".edit"), edit_snippet_path(snippet)
        = link_to t(".duplicate"),
                   snippet_clones_path(snippet_id: snippet),
                   method: :post
        = link_to t(".delete"),
                  snippet_path(snippet),
                  method: :delete,
                  data: { confirm: delete_confirmation_msg }
      - else
         = link_to t(".clone"),
                   snippet_clones_path(snippet_id: snippet),
                   method: :post

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
renalware-core-2.0.143 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.142 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.141 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.140 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.139 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.138 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.137 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.136 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.135 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.134 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.133 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.132 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.131 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.130 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.129 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.128 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.127 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.126 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.125 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.124 app/views/renalware/snippets/snippets/_row.html.slim