Rails update. Fancybox update. Migrations from Paperclip.
This commit is contained in:
parent
1d97215591
commit
7ac69a1d8a
25 changed files with 305 additions and 115 deletions
|
|
@ -20,8 +20,17 @@ h1 =@package.name
|
|||
- screenshots_visible_to_user(@package).each do |screenshot|
|
||||
.listview
|
||||
.text-center
|
||||
a.black.fancybox href =rails_representation_url(screenshot.image.variant(resize_to_limit: [800,600])) rel='fancybox-thumb' title=screenshot.caption
|
||||
= image_tag(screenshot.image.variant(resize_to_limit: [800,600]), alt: screenshot.caption)
|
||||
/a.black.fancybox href =url_for(screenshot.image.variant(resize_to_limit: [800,600])) rel='fancybox-thumb' title=screenshot.caption
|
||||
/ Fancybox image viewer: http://fancyapps.com/fancybox/3/docs/#usage
|
||||
|
||||
a href =url_for(screenshot.large_watermarked) rel='fancybox-thumb' title=screenshot.caption data-fancybox='gallery'
|
||||
.image-with-zoom-icon-container
|
||||
.image-with-zoom-icon
|
||||
= image_tag(url_for(screenshot.image), alt: screenshot.caption)
|
||||
|
||||
.magnifying-glass-icon
|
||||
i.fa.fa-search
|
||||
|
||||
- if screenshot.description
|
||||
.imgcaption =screenshot.description
|
||||
// Has the unmoderated screenshot been uploaded by the current user?
|
||||
|
|
@ -33,7 +42,7 @@ h1 =@package.name
|
|||
|
||||
- if screenshot.version.present?
|
||||
.imgcaption
|
||||
| Screenshot was taken from version #{screenshot.upstream_version}
|
||||
| Screenshot was taken from version #{screenshot.upstream_version} #{time_ago_in_words(screenshot.created_at)} ago
|
||||
- if user_signed_in? and current_user.is_admin?
|
||||
.imgcaption
|
||||
span.label.secondary #{screenshot.adminstatus}
|
||||
|
|
@ -45,19 +54,19 @@ h1 =@package.name
|
|||
= screenshot.inspect
|
||||
|
||||
|
||||
// Is the user an admin?
|
||||
// TODO: fix dropdowns – do not enforce javascript
|
||||
- if user_signed_in? and current_user.is_admin?
|
||||
= render(partial: 'admin_dropdown', locals: {screenshot: screenshot})
|
||||
// or does the screenshot belong to the user (determined by session cookie)
|
||||
- elsif user_signed_in? and screenshot.user == current_user
|
||||
= render(partial: 'user_dropdown', locals: {screenshot: screenshot})
|
||||
// Is the user an admin?
|
||||
// TODO: fix dropdowns – do not enforce javascript
|
||||
- if user_signed_in? and current_user.is_admin?
|
||||
= render(partial: 'admin_dropdown', locals: {screenshot: screenshot})
|
||||
// or does the screenshot belong to the user (determined by session cookie)
|
||||
- elsif user_signed_in? and screenshot.user == current_user
|
||||
= render(partial: 'user_dropdown', locals: {screenshot: screenshot})
|
||||
|
||||
|
||||
// or is the user not related to the screenshot and the screenshot is public?
|
||||
// TODO: Move to a seperate page with a form
|
||||
//- elsif screenshot.approved
|
||||
// = render(partial: 'report_dropdown', locals: {screenshot: screenshot})
|
||||
// or is the user not related to the screenshot and the screenshot is public?
|
||||
// TODO: Move to a seperate page with a form
|
||||
//- elsif screenshot.approved
|
||||
// = render(partial: 'report_dropdown', locals: {screenshot: screenshot})
|
||||
|
||||
- else
|
||||
.listview
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue