2019-09-25 06:53:46 +00:00
|
|
|
|
<%= stylesheet_link_tag "gallery" %>
|
|
|
|
|
<%= stylesheet_link_tag "lib/tags-groups" %>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
<!-- <div class="topnav clearfix">
|
|
|
|
|
<ul class="breadcrumb text-info pull-left">
|
2019-09-25 06:53:46 +00:00
|
|
|
|
<li><a href="/orbit_4.0.1/admin/dashboards/dashboards.shtml"><%= t('gallery.dashboard') %></a> <span class="divider">/</span></li>
|
|
|
|
|
<li><a href="<%#= panel_gallery_back_end_albums_path %>"><%= t('gallery.gallery') %></a> <span class="divider">/</span></li>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
<li class="active"><%#= @album.name %></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div> -->
|
|
|
|
|
<!-- Bottom Nav -->
|
2020-01-07 12:28:39 +00:00
|
|
|
|
<input name='all_upload_length' type="hidden">
|
2015-04-16 12:07:54 +00:00
|
|
|
|
<div class="order-edit-notification">Images re-ordering enabled.</div>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
<div class="bottomnav clearfix">
|
|
|
|
|
<div class="action pull-left">
|
2019-09-25 06:53:46 +00:00
|
|
|
|
<a href="<%= admin_galleries_path %>" class="btn btn-small"><i class="icons-back"></i> <%= t('gallery.back') %></a>
|
|
|
|
|
<a href="javascript:select_all()" class='btn btn-small'> <%= t('gallery.checked') %></a>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
</div>
|
|
|
|
|
<div class="action pull-right">
|
2020-01-09 16:14:41 +00:00
|
|
|
|
<div id="crop_div" style="text-align: center;">
|
|
|
|
|
<%= t('gallery.crop_div').html_safe %>
|
|
|
|
|
<br>
|
|
|
|
|
<span id="show_degree">0</span>°
|
|
|
|
|
<br>
|
|
|
|
|
<button onclick="change_degree(90)"><%= t('gallery.add_degree') %></button>
|
|
|
|
|
<button onclick="change_degree(-90)"><%= t('gallery.reduce_degree') %></button>
|
|
|
|
|
</div>
|
|
|
|
|
<a href="javascript:rotate()" class="btn btn-small hide crop"><%= t('gallery.rotate_images') %></a>
|
2019-09-25 06:53:46 +00:00
|
|
|
|
<a href="javascript:batch_crop()" class="btn btn-small hide crop"><%= t('gallery.batch_crop') %></a>
|
|
|
|
|
<a href="#" class="btn btn-inverse btn-small deselect hide"><%= t('gallery.deselect') %></a>
|
2014-07-31 09:12:57 +00:00
|
|
|
|
<% if can_edit_or_delete?(@album) %>
|
2019-09-25 06:53:46 +00:00
|
|
|
|
<a href="#dialog" data-toggle="modal" class="btn btn-warning btn-small deletephoto hide"><i class="icons-cross-3"></i><%= t('gallery.delete_photo') %></a>
|
|
|
|
|
<a href="#view-photo-tags" class="btn btn-primary btn-small addtags open hide" for="batch"><i class="icons-tag"></i><%= t('gallery.add_tags') %></a>
|
|
|
|
|
<a href="<%= import_admin_gallery_path(@album.id) %>" class="btn btn-small btn-info"><i class="icons-download"></i><%= t('gallery.import') %></a>
|
2016-12-20 11:43:54 +00:00
|
|
|
|
<b class="divider"></b>
|
2019-09-25 06:53:46 +00:00
|
|
|
|
<a href="<%= edit_admin_gallery_path(@album.id) %>" class="btn btn-small btn-success"><i class="icon-edit"></i> <%= t('gallery.edit') %></a>
|
|
|
|
|
<a href="#" class="btn btn-small btn-info order-btn-class" id="edit-order-btn"><%= t('gallery.edit_order') %></a>
|
2014-07-31 09:12:57 +00:00
|
|
|
|
<b class="divider"></b>
|
|
|
|
|
|
2019-09-25 06:53:46 +00:00
|
|
|
|
<a href="#" class="add-imgs btn btn-small btn-primary"><i class="icons-plus"></i><%= t('gallery.add_image') %></a>
|
2014-07-31 09:12:57 +00:00
|
|
|
|
<% end %>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
</div>
|
|
|
|
|
<form action="<%= admin_galleries_upload_image_path %>", id='fileupload'>
|
|
|
|
|
<!-- Redirect browsers with JavaScript disabled to the origin page -->
|
|
|
|
|
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
|
|
|
|
|
<div class="fileupload-buttonbar">
|
|
|
|
|
<div class="navbar">
|
|
|
|
|
<div class="navbar-inner">
|
|
|
|
|
<ul class="nav">
|
|
|
|
|
<li>
|
|
|
|
|
<div class="fileinput-button add-photo">
|
|
|
|
|
<i class="icon-plus icon-white"></i>
|
2019-09-25 06:53:46 +00:00
|
|
|
|
<span><%= t('gallery.add_files') %>...</span>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
<input type="file" name="files[]" multiple>
|
|
|
|
|
</div>
|
|
|
|
|
<input type="hidden" value="<%= @album.id.to_s %>" name="album_id" id="fileupload_aid" />
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
2019-10-26 07:36:04 +00:00
|
|
|
|
<button type="submit" class="start add-photo" onclick="form_submit()">
|
2014-05-05 06:07:18 +00:00
|
|
|
|
<i class="icon-upload icon-white"></i>
|
2019-09-25 06:53:46 +00:00
|
|
|
|
<span><%= t('gallery.start_upload') %></span>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
</button>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<button type="reset" class="cancel add-photo">
|
|
|
|
|
<i class="icon-ban-circle icon-white"></i>
|
2019-09-25 06:53:46 +00:00
|
|
|
|
<span><%= t('gallery.cancel_upload') %></span>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
</button>
|
|
|
|
|
</li>
|
|
|
|
|
<!-- <li>
|
|
|
|
|
<button type="button" class="delete">
|
|
|
|
|
<i class="icons-trash icon-white"></i>
|
2019-09-25 06:53:46 +00:00
|
|
|
|
<span><%= t('gallery.delete') %></span>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
</button>
|
|
|
|
|
</li> -->
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- The global progress information -->
|
|
|
|
|
<div class="fileupload-progress">
|
|
|
|
|
<!-- The global progress bar -->
|
|
|
|
|
<div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
|
|
|
|
|
<div class="bar" style="width:0%;"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- The extended global progress information -->
|
|
|
|
|
<div class="progress-extended"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- Drop Zone -->
|
|
|
|
|
<div id="dropzone" class="drop">
|
|
|
|
|
<div data-icons=""></div>
|
2019-09-25 06:53:46 +00:00
|
|
|
|
<%= t('gallery.drop_files_here') %>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
</div>
|
|
|
|
|
<!-- The loading indicator is shown during file processing -->
|
|
|
|
|
<div class="fileupload-loading"></div>
|
|
|
|
|
<!-- The table listing the files available for upload/download -->
|
|
|
|
|
<div id="file-list" class="nano">
|
|
|
|
|
<div class="content">
|
|
|
|
|
<ul role="presentation" class="files clearfix">
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="rgbody">
|
|
|
|
|
<div class="gallery-info">
|
|
|
|
|
<h3><%= @album.name %></h3>
|
|
|
|
|
<p class="muted"><%= @album.description.html_safe %></p>
|
|
|
|
|
</div>
|
|
|
|
|
<ul id="imgholder" class="gallery clearfix" data-gallery-id="<%= @album.id.to_s %>">
|
|
|
|
|
<% @images.each do |image| %>
|
|
|
|
|
<%= render :partial=>"image", :object=>image %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="dialog" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="Delete item" aria-hidden="true">
|
|
|
|
|
<div class="modal-header">
|
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
|
|
|
<h3>Delete Photo?</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
<span class="text-warning text-center">This action can not be restored, are you sure you want to delete?</span>
|
|
|
|
|
<div class="spinning">
|
|
|
|
|
<i class="icon-spinner icon-spin icon-4x"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
|
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
|
|
|
|
|
<button class="delete-item btn btn-danger" id="delete_selected_photos_btn">Delete</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="view-photo-tags" class="nano" style="display:none">
|
|
|
|
|
<div class="content">
|
|
|
|
|
<form>
|
2019-11-12 12:50:32 +00:00
|
|
|
|
<fieldset style="display: contents;">
|
2014-05-05 06:07:18 +00:00
|
|
|
|
<legend>Tags</legend>
|
|
|
|
|
<ul class="tags-groups">
|
|
|
|
|
<% @tags.each do |tag| %>
|
|
|
|
|
<li class="filter-item">
|
|
|
|
|
<p class="card pull-left">
|
|
|
|
|
<input type="checkbox" value="<%= tag.id.to_s %>">
|
|
|
|
|
</p>
|
|
|
|
|
<a>
|
2014-05-16 09:18:39 +00:00
|
|
|
|
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
<span class="tag"><%= tag.name_translations[locale] %></span>
|
2014-05-16 09:18:39 +00:00
|
|
|
|
<% if @site_in_use_locales.count-1 != i %>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
/
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
<div class="form-actions">
|
2019-09-25 06:53:46 +00:00
|
|
|
|
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t('gallery.cancel') %></a>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
<input type="submit" value="Save" class="btn btn-primary" />
|
|
|
|
|
</div>
|
|
|
|
|
</fieldset>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="view-photo-depiction" class="nano" style="display:none">
|
|
|
|
|
<div class="content">
|
|
|
|
|
<form for="description" method="post" data-remote="true" action="/admin/galleries/update_image">
|
|
|
|
|
<fieldset>
|
2021-04-04 05:03:24 +00:00
|
|
|
|
<div class="btn-group">
|
|
|
|
|
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
|
|
|
|
<a class="btn<%= ' active in' if i == 0 %>" id="btn-<%= locale %>-fake" data-toggle="tab" href="#form-<%= locale %>"><%= t(locale) %></a>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tab-content">
|
|
|
|
|
<% @site_in_use_locales.each_with_index do |locale, i| %>
|
|
|
|
|
<div id="form-<%= locale %>-fake" role="tabpanel" aria-labelledby="btn-<%= locale %>" class="tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
|
|
|
|
|
<legend><%= I18n.t('description') %></legend>
|
|
|
|
|
<textarea class="ckeditor_reduce description-editor" rows="10" name="album_image[description_translations][<%= locale %>]" for="<%= locale %>"></textarea>
|
|
|
|
|
|
|
|
|
|
<legend><%= I18n.t('gallery.short-description') %></legend>
|
|
|
|
|
<textarea class="ckeditor_reduce title-editor" rows="10" name="album_image[title_translations][<%= locale %>]" for="<%= locale %>"></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
<div class="form-actions">
|
2019-09-25 06:53:46 +00:00
|
|
|
|
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t('gallery.cancel') %></a>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
<input type="submit" value="Save" class="btn btn-primary" />
|
|
|
|
|
<input type="hidden" value="" name="image_id" />
|
|
|
|
|
</div>
|
|
|
|
|
</fieldset>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2014-07-21 08:28:09 +00:00
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
var photosData = <%= @photos_data.html_safe %>;
|
|
|
|
|
</script>
|
|
|
|
|
|
2014-05-05 06:07:18 +00:00
|
|
|
|
<% content_for :page_specific_javascript do %>
|
|
|
|
|
<%= javascript_include_tag "jquery.masonry.min.js" %>
|
|
|
|
|
<%= javascript_include_tag "jquery.lite.image.resize.js" %>
|
|
|
|
|
<%= javascript_include_tag "lib/checkbox.card" %>
|
|
|
|
|
<%= javascript_include_tag "file-upload/vendor/jquery.ui.widget.js" %>
|
|
|
|
|
<%= javascript_include_tag "file-upload/tmpl.min.js" %>
|
|
|
|
|
<%= javascript_include_tag "file-upload/load-image.min.js" %>
|
|
|
|
|
<%= javascript_include_tag "file-upload/canvas-to-blob.min.js" %>
|
|
|
|
|
<%= javascript_include_tag "file-upload/jquery.iframe-transport.js" %>
|
|
|
|
|
<%= javascript_include_tag "file-upload/jquery.fileupload.js" %>
|
|
|
|
|
<%= javascript_include_tag "file-upload/jquery.fileupload-fp.js" %>
|
|
|
|
|
<%= javascript_include_tag "file-upload/jquery.fileupload-ui.js" %>
|
|
|
|
|
<%= javascript_include_tag "file-upload/drop-zone.js" %>
|
|
|
|
|
<%= javascript_include_tag "gallery" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<!-- The template to display files available for upload -->
|
|
|
|
|
<script id="template-upload" type="text/x-tmpl">
|
|
|
|
|
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
|
|
|
|
<li class="template-upload fade">
|
|
|
|
|
<ul class="clearfix">
|
|
|
|
|
<li class="action-bnt">
|
|
|
|
|
{% if (o.files.valid && !i) { %}
|
|
|
|
|
<div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">
|
|
|
|
|
<div class="bar" style="width:0%;"></div>
|
|
|
|
|
</div>
|
|
|
|
|
{% if (!o.options.autoUpload) { %}
|
2019-10-26 07:36:04 +00:00
|
|
|
|
<button class="btn btn-primary start" onclick="form_only_one_submit()">
|
2014-05-05 06:07:18 +00:00
|
|
|
|
<i class="icon-upload icon-white"></i>
|
|
|
|
|
</button>
|
|
|
|
|
{% } %}
|
|
|
|
|
{% } %}
|
|
|
|
|
{% if (!i) { %}
|
|
|
|
|
<button class="btn btn-warning cancel">
|
|
|
|
|
<i class="icon-ban-circle icon-white"></i>
|
|
|
|
|
</button>
|
|
|
|
|
{% } %}
|
|
|
|
|
</li>
|
|
|
|
|
<li class="preview pull-left"><span class="fade"></span></li>
|
|
|
|
|
<li class="name-size">
|
|
|
|
|
<p>{%=file.name%}</p>
|
|
|
|
|
{% if (file.error) { %}
|
|
|
|
|
<p class="error"><span class="label label-important">Error</span> {%=file.error%}</p>
|
|
|
|
|
{% } else if (o.files.valid && !i) { %}
|
|
|
|
|
<p class="label label-info">{%=o.formatFileSize(file.size)%}</p>
|
|
|
|
|
{% } %}
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
{% } %}
|
|
|
|
|
</script>
|
|
|
|
|
<!-- The template to display files available for download -->
|
|
|
|
|
<script id="template-download" type="text/x-tmpl">
|
|
|
|
|
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
|
|
|
|
<li class="template-download fade">
|
|
|
|
|
<ul class="clearfix">
|
|
|
|
|
{% if (file.error) { %}
|
|
|
|
|
<li class="name-size">
|
|
|
|
|
<p>{%=file.name%}</p>
|
|
|
|
|
<p class="error"><span class="label label-important">Error</span> {%=file.error%}</p>
|
|
|
|
|
</li>
|
|
|
|
|
{% } else { %}
|
|
|
|
|
<li class="preview">
|
|
|
|
|
{% if (file.thumbnail_url) { %}
|
|
|
|
|
<a href="{%=file.url%}" title="{%=file.name%}" data-gallery="gallery" download="{%=file.name%}"><img src="{%=file.thumbnail_url%}"></a>
|
|
|
|
|
{% } %}
|
|
|
|
|
</li>
|
|
|
|
|
<li class="name-size">
|
|
|
|
|
<p><a href="{%=file.url%}" title="{%=file.name%}" data-gallery="{%=file.thumbnail_url&&'gallery'%}" download="{%=file.name%}">{%=file.name%}</a></p>
|
2019-09-25 06:53:46 +00:00
|
|
|
|
<p ><span class="label label-success"><%= t('gallery.success') %></span><%= t('gallery.file_uploaded_successfully') %>!</p>
|
2014-05-05 06:07:18 +00:00
|
|
|
|
<p class="label label-info">{%=o.formatFileSize(file.size)%}</p>
|
|
|
|
|
</li>
|
|
|
|
|
{% } %}
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
{% } %}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|