Sha256: becebe2eeacb0eda81b89031f46b7bb854aa39668d48f88c7e095496e3fca479

Contents?: true

Size: 1.78 KB

Versions: 107

Compression:

Stored size: 1.78 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)
        = pipe_separator
        = link_to t(".duplicate"),
                   snippet_clones_path(snippet_id: snippet),
                   method: :post
        = pipe_separator
        = 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

107 entries across 107 versions & 1 rubygems

Version Path
renalware-core-2.0.123 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.121 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.120 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.119 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.118 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.117 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.116 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.115 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.113 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.112 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.111 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.110 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.109 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.108 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.106 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.105 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.104 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.103 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.102 app/views/renalware/snippets/snippets/_row.html.slim
renalware-core-2.0.101 app/views/renalware/snippets/snippets/_row.html.slim