99 lines
3.6 KiB
Plaintext
99 lines
3.6 KiB
Plaintext
|
|
<%= stylesheet_link_tag "gallery" %>
|
|
|
|
<div id="orbit_gallery" class="rg">
|
|
<div class="rgbody">
|
|
<div id="imgholder">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<% if is_sub_manager? #TODO 或 這類別是他自己的 %>
|
|
|
|
<!-- tag part -->
|
|
<div id="tag_panel" class="my_scroll">
|
|
<div class="scrollbar">
|
|
<div class="track">
|
|
<div class="thumb">
|
|
<div class="end"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<%
|
|
@locales = Array.new
|
|
@site_valid_locales.each do |locale|
|
|
@locales << locale
|
|
end
|
|
%>
|
|
<div class="viewport">
|
|
<div class="overview">
|
|
<ul class="tag_list" id="gallery_tag_list">
|
|
<% @tags.each do |tag| %>
|
|
<li data-content="<%= tag.id %>"><input id="tag_<%= tag.id %>" type="checkbox"><label for="tag_<%= tag.id %>"><%= tag.name %></label><span style="display:none;"><%= tag[@locales[1]] %> <%= tag[@locales[0]] %></span></li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="tag_search"><div class="icon-search"></div><input type="text" value="<%= t('gallery.search_tags') %>" onblur="if(this.value=='')this.value='<%= t('gallery.search_tags') %>';" onfocus="if(this.value=='<%= t("gallery.search_tags") %>')this.value='';" id="tag_search_box"> <div class="tag_save"><a class="btn bt-save"><i class="icon-ok"></i><%= I18n.t("gallery.save") %></a></div></div>
|
|
<%end%>
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
var $tag_panel = $('#tag_panel');
|
|
orbit_bar_height = $('#orbit-bar').outerHeight();
|
|
action_panel_height = $('.form-actions').outerHeight();
|
|
window_height = $(window).height();
|
|
|
|
|
|
$tag_panel.height( window_height - orbit_bar_height - 90 );
|
|
$tag_panel.tinyscrollbar();
|
|
|
|
$(window).resize(function(){
|
|
$tag_panel.tinyscrollbar_update('relative');
|
|
$tag_panel.height( $(window).height() - orbit_bar_height - 90 );
|
|
});
|
|
|
|
|
|
</script>
|
|
<!-- tag end -->
|
|
<div class="form-actions form-fixed pagination-right rghead">
|
|
<div class="rgfn">
|
|
<%= link_to (content_tag(:i,I18n.t("gallery.back_to_albums"),:class=>"icon-arrow-left icon-white")),panel_gallery_back_end_albums_path,:title=> I18n.t("gallery.back_to_albums") ,:class=>"bt-back btn btn-primary pull-left" %>
|
|
|
|
|
|
|
|
<%= link_to( (content_tag(:i,I18n.t("gallery.album_tag"),:class=>"icon-tag icon-white")),'',:title=> I18n.t("gallery.album_tag") ,:class=>"bt-tag btn btn-primary pull-right")if is_admin? %>
|
|
<!-- #TODO 或是類別屬於他 -->
|
|
|
|
<%= link_to (content_tag(:i,I18n.t("gallery.add_images"),:class=>"icon-plus icon-white")),'images',:title=> I18n.t("gallery.add_images") ,:class=>"bt-add btn btn-primary pull-right",:onclick=>"return false;" if is_admin?%>
|
|
<!-- #TODO 或是類別屬於他 -->
|
|
|
|
<%= link_to (content_tag(:i,I18n.t("gallery.del_album"),:class=>"icon-trash icon-white")),'delete',:title=> I18n.t("gallery.del_album") ,:class=>"bt-del btn btn-primary pull-right",:onclick=>"return false;" if is_admin?%>
|
|
<!-- #TODO 或是類別屬於他 -->
|
|
|
|
<%= link_to (content_tag(:i,I18n.t(:edit),:class=>"icon-plus icon-white")),edit_panel_gallery_back_end_album_path(@album),:title=> I18n.t(:edit) ,:class=>"bt-edit btn btn-primary pull-right" if is_admin?%>
|
|
<!-- #TODO 或是類別屬於他 -->
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<% content_for :page_specific_javascript do %>
|
|
<%= javascript_include_tag "galleryAPI" %>
|
|
<% end %>
|
|
|
|
<script type="text/javascript">
|
|
galleryAPI.prototype.locale = "<%= I18n.locale %>";
|
|
var gallery = new galleryAPI();
|
|
gallery.initialize();
|
|
gallery.loadArea = "images";
|
|
gallery.loadImages("<%= params[:id] %>");
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|