asciinema.org/app/views/asciicasts/show.html.slim
2016-01-11 15:45:24 +01:00

99 lines
3.6 KiB
Plaintext

- content_for(:title, page.title)
- content_for(:head) do
= render 'discovery_tags', page: page
= render 'alternate_links', page: page
.asciicast-page
= render 'share', page: page
= render 'download', page: page
section.cinema
.container
= player page.asciicast, page.playback_options
section.even.info
.container
.row
.col-md-12.col-xs-12
span.author-avatar = page.author_img_link
h2
= page.asciicast_title
- if page.show_private_label?
= render 'private_label'
- if page.show_featured_label?
= render 'featured_label'
small by #{page.author_link} #{time_ago_tag page.asciicast_created_at}
section.odd.meta
.container
.row
.col-md-8.col-xs-6
ul.meta-list
li
span.glyphicon.glyphicon-info-sign
' #{page.asciicast_env_details}
li
span.glyphicon.glyphicon-eye-open
' #{page.views_count}
.col-md-4.col-xs-6
- if page.show_admin_dropdown?
.dropdown.actions-dropdown.pull-right
button.btn.btn-default.dropdown-toggle[type="button" data-toggle="dropdown"]
span.glyphicon.glyphicon-cog
'
span.caret
ul.dropdown-menu
- if page.show_edit_link?
li
= link_to edit_asciicast_path(page.asciicast) do
span.glyphicon.glyphicon-edit
' Edit
- if page.show_set_featured_link?
li
= link_to(asciicast_path(page.asciicast, 'asciicast[featured]' => 1), method: :put) do
span.glyphicon.glyphicon-eye-open
' Make featured
- if page.show_unset_featured_link?
li
= link_to(asciicast_path(page.asciicast, 'asciicast[featured]' => 0), method: :put) do
span.glyphicon.glyphicon-eye-close
' Make not featured
- if page.show_make_public_link?
li
= link_to(asciicast_path(page.asciicast, 'asciicast[private]' => 0), method: :put) do
span.glyphicon.glyphicon-eye-open
' Make public
- if page.show_make_private_link?
li
= link_to(asciicast_path(page.asciicast, 'asciicast[private]' => 1), method: :put) do
span.glyphicon.glyphicon-eye-close
' Make private
- if page.show_delete_link?
li
= link_to(asciicast_path(page.asciicast), method: :delete, data: { confirm: 'Really delete this asciicast?' }) do
span.glyphicon.glyphicon-remove
' Delete
ul.meta-list.actions-list
li
span.glyphicon.glyphicon-share-alt
'
a href="#" id="share-link" data-toggle="modal" data-target="#share-modal" Share
li
span.glyphicon.glyphicon-download
'
a href="#" id="download-link" data-toggle="modal" data-target="#download-modal" Download
- if page.show_description?
section.odd.description
.container
.content = page.description
- unless page.other_asciicasts_by_author.empty?
section.even
.container
.other-asciicasts
h2 More by #{page.author_link}
= render 'previews', asciicasts: page.other_asciicasts_by_author, per_row: 3