Merge branch 'make_jsFunc_for_journalP' of https://github.com/Rulingcom/orbit into make_jsFunc_for_journalP
* 'make_jsFunc_for_journalP' of https://github.com/Rulingcom/orbit: calendar js minor update Fix: - Widgets for announcement - Facebook link - AdBanner nav visitor now can browse gallery routes fixed small fix for journal_pages desktop new file created for journal pages tmp add co-author db and curd page, but it can't destory it... add co-author page and new it, but can't destory it... visitor now can browse gallery done add journals function fix and hide for visitors,except for album album and gallery is now opened fixed sutpid bug for calendar back button fix for frontend fix and hide for visitors,except for album calendar js minor update minor update for gallery and calendar backend
This commit is contained in:
commit
c0ac69fc84
|
@ -1,8 +1,12 @@
|
||||||
class Admin::UsersNewInterfaceController < ApplicationController
|
class Admin::UsersNewInterfaceController < OrbitBackendController
|
||||||
|
|
||||||
layout "new_admin"
|
layout "new_admin"
|
||||||
before_filter :authenticate_user!
|
# before_filter :authenticate_user!
|
||||||
before_filter :set_attribute, :only => [:index, :show, :new, :edit]
|
# before_filter :set_attribute, :only => [:index, :show, :new, :edit]
|
||||||
|
|
||||||
|
before_filter :force_order_for_visitor,:only=>[:index,:show]
|
||||||
|
before_filter :force_order_for_user,:except => [:index,:show]
|
||||||
|
before_filter :for_app_sub_manager,:except => [:index,:show]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
get_tags
|
get_tags
|
||||||
|
|
|
@ -260,12 +260,12 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def share_links(object, key)
|
def share_links(object, key)
|
||||||
js = ''
|
# js = ''
|
||||||
js << "<meta property='og:title' content='#{object.title}' />\n" rescue ''
|
# js << "<meta property='og:title' content='#{object.title}' />\n" rescue ''
|
||||||
js << "<meta property='og:description' content='#{object.subtitle}' />\n" rescue ''
|
# js << "<meta property='og:description' content='#{object.subtitle}' />\n" rescue ''
|
||||||
js << "<meta property='og:image' content='#{object.image.url}' />\n" rescue ''
|
# js << "<meta property='og:image' content='#{object.image.url}' />\n" rescue ''
|
||||||
content_tag :div, :class => 'fb' do
|
content_tag :div, :class => 'fb' do
|
||||||
concat social_share_button_tag(object.title, :fb_url => generate_fb_url(object,key), :image => "http://#{request.env['HTTP_HOST']}#{object.image.url}")
|
concat social_share_button_tag(object.title, :fb_url => generate_fb_url(object,key), :image => "http://#{request.env['HTTP_HOST']}#{object.image.url if !object.image.blank?}")
|
||||||
# concat javascript_tag "$('head').append('#{j js}');"
|
# concat javascript_tag "$('head').append('#{j js}');"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -61,8 +61,10 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="span1">
|
<th class="span1">
|
||||||
|
<% if is_admin? %>
|
||||||
<input type="checkbox">
|
<input type="checkbox">
|
||||||
<a href class="list-remove"><i class="icon-minus-sign"></i></a>
|
<a href class="list-remove"><i class="icon-minus-sign"></i></a>
|
||||||
|
<%end%>
|
||||||
</th>
|
</th>
|
||||||
<th id="sort-roles" class="sort span3"><%= t("admin.new_admin.attributes.roles")%><b class="web-symbol"></b></th>
|
<th id="sort-roles" class="sort span3"><%= t("admin.new_admin.attributes.roles")%><b class="web-symbol"></b></th>
|
||||||
<th id="sort-name" class="sort span1-2 select active"><%= t("admin.new_admin.attributes.name")%><b class="web-symbol"></b></th>
|
<th id="sort-name" class="sort span1-2 select active"><%= t("admin.new_admin.attributes.name")%><b class="web-symbol"></b></th>
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<div class="form-actions form-fixed pagination-right">
|
<div class="form-actions form-fixed pagination-right">
|
||||||
|
<% if is_admin? %>
|
||||||
<%= link_to(new_admin_users_new_interface_path,:class=> "btn btn-primary pull-right") do%>
|
<%= link_to(new_admin_users_new_interface_path,:class=> "btn btn-primary pull-right") do%>
|
||||||
<i class="icon-plus icon-white"></i><%= t("admin.new_admin.action.add")%>
|
<i class="icon-plus icon-white"></i><%= t("admin.new_admin.action.add")%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<%end -%>
|
||||||
<div class="paginationFixed" id="user_pagination">
|
<div class="paginationFixed" id="user_pagination">
|
||||||
<%= paginate @users, :params => {:inner => false}%>
|
<%= paginate @users, :params => {:inner => false}%>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<tr class="with_action">
|
<tr class="with_action">
|
||||||
<td class="span1"><input type="checkbox"></td>
|
<td class="span1"><% if is_admin? %><input type="checkbox"><% end%></td>
|
||||||
<td class="span3">
|
<td class="span3">
|
||||||
<div class="label-group">
|
<div class="label-group">
|
||||||
<div class="label-td"><!--
|
<div class="label-td"><!--
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
<p class="user-mail">
|
<p class="user-mail">
|
||||||
<%= @user.email %>
|
<%= @user.email %>
|
||||||
</p>
|
</p>
|
||||||
<%= link_to "<i class='icon-pencil'></i>#{t('admin.edit')}".html_safe,edit_admin_users_new_interface_path(@user),:class=>"btn btn-small"%>
|
<%= link_to("<i class='icon-pencil'></i>#{t('admin.edit')}".html_safe,edit_admin_users_new_interface_path(@user),:class=>"btn btn-small" ) if is_admin?%>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-roles my_scroll">
|
<div class="user-roles my_scroll">
|
||||||
<div class="scrollbar">
|
<div class="scrollbar">
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<a class="brand dropdown-toggle" data-toggle="dropdown" href="#">Orbit</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><%= link_to content_tag(:i, nil, :class => 'icons-dashboard') + t(:dashboard_), admin_dashboards_path %></li>
|
||||||
|
<li><%= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.new_admin.user'), admin_users_new_interface_index_path %></li>
|
||||||
|
</ul>
|
|
@ -0,0 +1,15 @@
|
||||||
|
<a class="brand dropdown-toggle" data-toggle="dropdown" href="#">Orbit</a>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><%= link_to content_tag(:i, nil, :class => 'icons-dashboard') + t(:dashboard_), admin_dashboards_path %></li>
|
||||||
|
<li><%= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.new_admin.user'), admin_users_new_interface_index_path %></li>
|
||||||
|
|
||||||
|
<li><%#= link_to content_tag(:i, nil, :class => 'icons-content') + t(:content) %></li>
|
||||||
|
<li><%#= link_to content_tag(:i, nil, :class => 'icons-member') + t(:member), admin_users_path %></li>
|
||||||
|
<li><%#= link_to content_tag(:i, nil, :class => 'icons-asset') + t(:asset), admin_assets_path %></li>
|
||||||
|
<%if (is_admin? rescue false)%>
|
||||||
|
<li class="divider"></li>
|
||||||
|
<li><%= link_to content_tag(:i, nil, :class => 'icons-structure') + t(:structure), admin_items_path %></li>
|
||||||
|
<li><%= link_to content_tag(:i, nil, :class => 'icons-cog') + t('site.settings'), admin_site_site_info_path(@site) %></li>
|
||||||
|
<% end -%>
|
||||||
|
<li><%#= link_to content_tag(:i, nil, :class => 'icons-plus-cube') + t(:add_item) %></li>
|
||||||
|
</ul>
|
|
@ -3,23 +3,9 @@
|
||||||
<div class="container clear">
|
<div class="container clear">
|
||||||
<div class="dropdown orbit-logo pull-left">
|
<div class="dropdown orbit-logo pull-left">
|
||||||
<% if !current_user.nil? %>
|
<% if !current_user.nil? %>
|
||||||
<a class="brand dropdown-toggle" data-toggle="dropdown" href="#">Orbit</a>
|
<%= render :partial=>"layouts/member_orbit_menu"%>
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-dashboard') + t(:dashboard_), admin_dashboards_path %></li>
|
|
||||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.new_admin.user'), admin_users_new_interface_index_path %></li>
|
|
||||||
|
|
||||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-content') + t(:content) %></li>
|
|
||||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-member') + t(:member), admin_users_path %></li>
|
|
||||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-asset') + t(:asset), admin_assets_path %></li>
|
|
||||||
<%if (is_admin? rescue false)%>
|
|
||||||
<li class="divider"></li>
|
|
||||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-structure') + t(:structure), admin_items_path %></li>
|
|
||||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-cog') + t('site.settings'), admin_site_site_info_path(@site) %></li>
|
|
||||||
<% end -%>
|
|
||||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-plus-cube') + t(:add_item) %></li>
|
|
||||||
</ul>
|
|
||||||
<% else %>
|
<% else %>
|
||||||
<a class="brand dropdown-toggle" data-toggle="dropdown" href="/">Orbit</a>
|
<%= render :partial=>"layouts/guest_orbit_menu"%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<%= content_tag :li, :class => (active_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals') || active_for_app_auth('Announcement') || active_for_ob_auths_object("BulletinCategory") ) do -%>
|
<%= content_tag :li, :class => (active_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals') || active_for_app_auth('Announcement') || active_for_ob_auths_object("BulletinCategory") ) do -%>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + content_tag(:span, t('admin.announcement')), panel_announcement_back_end_bulletins_path %>
|
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + content_tag(:span, t('admin.announcement')), panel_announcement_back_end_bulletins_path %>
|
||||||
<%= content_tag :ul, :class => ("nav nav-list " + (visible_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals')||active_for_ob_auths_object("BulletinCategory"))) do -%>
|
<%= content_tag :ul, :class => ("nav nav-list " + (visible_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals')||active_for_ob_auths_object("BulletinCategory"))) do -%>
|
||||||
<%= content_tag :li, link_to((t('announcement.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_bulletins_path), :class => active_for_action('bulletins', 'index') %>
|
<%= content_tag :li, link_to((t('announcement.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_bulletins_path), :class => active_for_action('bulletins', 'index')if (is_manager? rescue nil) %>
|
||||||
<%= content_tag :li, link_to((t('announcement.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_announcement_back_end_bulletin_path), :class => active_for_action('bulletins', 'new') if (is_manager? rescue nil) %>
|
<%= content_tag :li, link_to((t('announcement.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_announcement_back_end_bulletin_path), :class => active_for_action('bulletins', 'new') if (is_manager? rescue nil) %>
|
||||||
<%= content_tag :li, link_to((t('announcement.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_bulletin_categorys_path), :class =>( active_for_action('bulletin_categorys', 'index') || active_for_ob_auths_object("BulletinCategory") )if (is_manager? rescue nil) %>
|
<%= content_tag :li, link_to((t('announcement.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_bulletin_categorys_path), :class =>( active_for_action('bulletin_categorys', 'index') || active_for_ob_auths_object("BulletinCategory") )if (is_manager? rescue nil) %>
|
||||||
<%= content_tag :li, link_to((t('announcement.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_tags_path), :class => active_for_action('/panel/announcement/back_end/tags', 'index')if (is_manager? rescue nil) %>
|
<%= content_tag :li, link_to((t('announcement.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_tags_path), :class => active_for_action('/panel/announcement/back_end/tags', 'index')if (is_manager? rescue nil) %>
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<%= content_tag :li, :class =>( active_for_controllers('news_bulletins', '/panel/news/back_end/tags', 'news_bulletin_categorys', 'news_approvals')|| active_for_app_auth('news') || active_for_ob_auths_object("NewsBulletinCategory")) do -%>
|
<%= content_tag :li, :class =>( active_for_controllers('news_bulletins', '/panel/news/back_end/tags', 'news_bulletin_categorys', 'news_approvals')|| active_for_app_auth('news') || active_for_ob_auths_object("NewsBulletinCategory")) do -%>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + content_tag(:span, t('admin.news')), panel_news_back_end_news_bulletins_path %>
|
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + content_tag(:span, t('admin.news')), panel_news_back_end_news_bulletins_path %>
|
||||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('news_bulletins', '/panel/news/back_end/tags', 'news_bulletin_categorys', 'news_approvals')) do -%>
|
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('news_bulletins', '/panel/news/back_end/tags', 'news_bulletin_categorys', 'news_approvals')) do -%>
|
||||||
<%= content_tag :li, link_to((t('announcement.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_news_bulletins_path), :class => active_for_action('news_bulletins', 'index') %>
|
<%= content_tag :li, link_to((t('announcement.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_news_bulletins_path), :class => active_for_action('news_bulletins', 'index') if (is_manager? rescue nil)%>
|
||||||
<%= content_tag :li, link_to((t('announcement.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_news_back_end_news_bulletin_path), :class => active_for_action('news_bulletins', 'new') if (is_manager? rescue nil) %>
|
<%= content_tag :li, link_to((t('announcement.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_news_back_end_news_bulletin_path), :class => active_for_action('news_bulletins', 'new') if (is_manager? rescue nil) %>
|
||||||
<%= content_tag :li, link_to((t('announcement.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_news_bulletin_categorys_path), :class => active_for_action('news_bulletin_categorys', 'index') || active_for_ob_auths_object("NewsBulletinCategory") if (is_manager? rescue nil) %>
|
<%= content_tag :li, link_to((t('announcement.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_news_bulletin_categorys_path), :class => active_for_action('news_bulletin_categorys', 'index') || active_for_ob_auths_object("NewsBulletinCategory") if (is_manager? rescue nil) %>
|
||||||
<%= content_tag :li, link_to((t('announcement.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_tags_path), :class => active_for_action('/panel/news/back_end/tags', 'index') if (is_manager? rescue nil)%>
|
<%= content_tag :li, link_to((t('announcement.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_tags_path), :class => active_for_action('/panel/news/back_end/tags', 'index') if (is_manager? rescue nil)%>
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
<%= content_tag :li, :class => active_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys') || active_for_app_auth('web_resource') || active_for_ob_auths_object("WebLinkCategory") do -%>
|
<%= content_tag :li, :class => active_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys') || active_for_app_auth('web_resource') || active_for_ob_auths_object("WebLinkCategory") do -%>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icons-link') + content_tag(:span, t('admin.link')), panel_web_resource_back_end_web_links_path %>
|
<%= link_to content_tag(:i, nil, :class => 'icons-link') + content_tag(:span, t('admin.link')), panel_web_resource_back_end_web_links_path %>
|
||||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys')) do -%>
|
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys')) do -%>
|
||||||
<%= content_tag :li, link_to((t('admin.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_web_links_path), :class => active_for_action('web_links', 'index') %>
|
<%= content_tag :li, link_to((t('admin.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_web_links_path), :class => active_for_action('web_links', 'index')if (is_manager? rescue nil) %>
|
||||||
<%= content_tag :li, link_to((t('announcement.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_web_resource_back_end_web_link_path), :class => active_for_action('web_links', 'new') if (is_manager? rescue nil)%>
|
<%= content_tag :li, link_to((t('announcement.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_web_resource_back_end_web_link_path), :class => active_for_action('web_links', 'new') if (is_manager? rescue nil)%>
|
||||||
<%= content_tag :li, link_to((t('announcement.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_web_link_categorys_path), :class => (active_for_action('web_link_categorys', 'index') || active_for_ob_auths_object("WebLinkCategory")) if (is_manager? rescue nil)%>
|
<%= content_tag :li, link_to((t('announcement.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_web_link_categorys_path), :class => (active_for_action('web_link_categorys', 'index') || active_for_ob_auths_object("WebLinkCategory")) if (is_manager? rescue nil)%>
|
||||||
<%= content_tag :li, link_to((t('announcement.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_tags_path), :class => active_for_action('/panel/web_resource/back_end/tags', 'index') if (is_manager? rescue nil)%>
|
<%= content_tag :li, link_to((t('announcement.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_web_resource_back_end_tags_path), :class => active_for_action('/panel/web_resource/back_end/tags', 'index') if (is_manager? rescue nil)%>
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
<%= content_tag :li, :class => active_for_controllers('archive_files', 'panel/archive/back_end/tags', 'archive_file_categorys') do -%>
|
<%= content_tag :li, :class => active_for_controllers('archive_files', 'panel/archive/back_end/tags', 'archive_file_categorys') do -%>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icons-asset') + content_tag(:span, t('admin.archive')), panel_archive_back_end_archive_files_path %>
|
<%= link_to content_tag(:i, nil, :class => 'icons-asset') + content_tag(:span, t('admin.archive')), panel_archive_back_end_archive_files_path %>
|
||||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('archive_files', 'tags', 'archive_file_categorys')) do -%>
|
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('archive_files', 'tags', 'archive_file_categorys')) do -%>
|
||||||
<%= content_tag :li, link_to((t('admin.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_archive_files_path), :class => active_for_action('archive_file', 'index') %>
|
<%= content_tag :li, link_to((t('admin.all_articles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_archive_files_path), :class => active_for_action('archive_file', 'index')if (is_manager? rescue nil) %>
|
||||||
<%= content_tag :li, link_to((t('admin.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_archive_back_end_archive_file_path), :class => active_for_action('archive_file', 'new') if (is_admin? rescue nil)%>
|
<%= content_tag :li, link_to((t('admin.add_new') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_archive_back_end_archive_file_path), :class => active_for_action('archive_file', 'new') if (is_admin? rescue nil)%>
|
||||||
<%= content_tag(:li, link_to((t('admin.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_archive_file_categorys_path), :class => active_for_action('archive_file_categorys', 'index'))if (is_manager? rescue nil)%>
|
<%= content_tag(:li, link_to((t('admin.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_archive_file_categorys_path), :class => active_for_action('archive_file_categorys', 'index'))if (is_manager? rescue nil)%>
|
||||||
<%= content_tag :li, link_to((t('admin.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_tags_path), :class => active_for_action('tags', 'index') if (is_manager? rescue nil)%>
|
<%= content_tag :li, link_to((t('admin.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_archive_back_end_tags_path), :class => active_for_action('tags', 'index') if (is_manager? rescue nil)%>
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
<%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %>
|
<%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %>
|
||||||
<%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %>
|
<%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %>
|
||||||
<%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %>
|
<%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %>
|
||||||
<%= content_tag :li, link_to((t('admin.calendars') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_calendar_back_end_cal_path), :class => active_for_action('cals','new') %>
|
<%= content_tag :li, link_to((t('admin.calendars') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_panel_calendar_back_end_cal_path), :class => active_for_action('cals','new') if (is_manager? rescue nil)%>
|
||||||
<%= content_tag :li, link_to(t('admin.tags'), panel_calendar_back_end_tags_path), :class => active_for_action('/panel/calendar/back_end/tags', 'index')if (is_manager? rescue nil) %>
|
<%= content_tag :li, link_to(t('admin.tags'), panel_calendar_back_end_tags_path), :class => active_for_action('/panel/calendar/back_end/tags', 'index')if (is_manager? rescue nil) %>
|
||||||
<%#= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "gallery"}))), :class => active_for_app_auth('gallery') if (is_admin? rescue nil) %>
|
<%#= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "gallery"}))), :class => active_for_app_auth('gallery') if (is_admin? rescue nil) %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
|
@ -2,7 +2,7 @@ defaults: &defaults
|
||||||
host: localhost
|
host: localhost
|
||||||
# slaves:
|
# slaves:
|
||||||
# - host: slave1.local
|
# - host: slave1.local
|
||||||
port: 27017
|
port: 37017
|
||||||
# - host: slave2.local
|
# - host: slave2.local
|
||||||
# port: 27019
|
# port: 27019
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ module ParserCommon
|
||||||
delay: -1000,
|
delay: -1000,
|
||||||
fx: '#{ad_banner.ad_fx.nil? ? 'fade': ad_banner.ad_fx}',
|
fx: '#{ad_banner.ad_fx.nil? ? 'fade': ad_banner.ad_fx}',
|
||||||
timeoutFn: getTimeout,
|
timeoutFn: getTimeout,
|
||||||
pager: '#banner_nav',
|
pager: '.banner_nav-#{ad_banner.title.dehumanize}',
|
||||||
pagerAnchorBuilder: function(idx, slide) {
|
pagerAnchorBuilder: function(idx, slide) {
|
||||||
return \"<li><a href='#'></a></li>\";
|
return \"<li><a href='#'></a></li>\";
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,8 @@ module ParserCommon
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
</script>"
|
</script>"
|
||||||
res << "<ul id='banner_nav' class='clear'></ul>"
|
res << "<div style='position:relative'>"
|
||||||
|
res << "<ul id='banner_nav' class='clear banner_nav-#{ad_banner.title.dehumanize}'></ul>"
|
||||||
res << "<div id='slideshow-#{ad_banner.title.dehumanize}' class='slideshow'>"
|
res << "<div id='slideshow-#{ad_banner.title.dehumanize}' class='slideshow'>"
|
||||||
printable_ad_images = []
|
printable_ad_images = []
|
||||||
ad_banner.ad_images.each do |ad_image|
|
ad_banner.ad_images.each do |ad_image|
|
||||||
|
@ -85,6 +86,7 @@ module ParserCommon
|
||||||
res << "/>"
|
res << "/>"
|
||||||
end
|
end
|
||||||
res << "</div>"
|
res << "</div>"
|
||||||
|
res << "</div>"
|
||||||
end
|
end
|
||||||
fragment = Nokogiri::HTML::DocumentFragment.new(body, res)
|
fragment = Nokogiri::HTML::DocumentFragment.new(body, res)
|
||||||
banner.swap(fragment)
|
banner.swap(fragment)
|
||||||
|
@ -234,4 +236,25 @@ module ParserCommon
|
||||||
public_r_tags.uniq
|
public_r_tags.uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# page_counter
|
||||||
|
def parse_counter(body = nil, page = nil, edit=nil)
|
||||||
|
body.css('.page_counter').each do |counter|
|
||||||
|
res = ''
|
||||||
|
case counter['option']
|
||||||
|
when 'all'
|
||||||
|
res << display_visitors.to_s
|
||||||
|
when 'today'
|
||||||
|
res << display_visitors_today.to_s
|
||||||
|
when 'this_week'
|
||||||
|
res << display_visitors_this_week.to_s
|
||||||
|
when 'this_month'
|
||||||
|
res << display_visitors_this_month.to_s
|
||||||
|
when 'this_year'
|
||||||
|
res << display_visitors_this_year.to_s
|
||||||
|
end
|
||||||
|
fragment = Nokogiri::HTML::DocumentFragment.new(body, res)
|
||||||
|
counter.swap(fragment)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,14 +31,14 @@ class Panel::Announcement::Widget::BulletinsController < OrbitWidgetController
|
||||||
|
|
||||||
date_now = Time.now
|
date_now = Time.now
|
||||||
if !@category_id.blank?
|
if !@category_id.blank?
|
||||||
@bulletins = Bulletin.can_display.where(:bulletin_category_id => @category_id).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num)
|
@bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:bulletin_category_id => @category_id).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num)
|
||||||
@current_category = BulletinCategory.from_id(@category_id) rescue nil
|
@current_category = BulletinCategory.from_id(@category_id) rescue nil
|
||||||
elsif !params[:tag_id].blank?
|
elsif !params[:tag_id].blank?
|
||||||
@tag = AnnouncementTag.find(params[:tag_id]) rescue nil
|
@tag = AnnouncementTag.find(params[:tag_id]) rescue nil
|
||||||
@tag = AnnouncementTag.where(key: params[:tag_id])[0] unless @tag
|
@tag = AnnouncementTag.where(key: params[:tag_id])[0] unless @tag
|
||||||
@bulletins = @tag.bulletins.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num)
|
@bulletins = @tag.bulletins.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num)
|
||||||
else
|
else
|
||||||
@bulletins = Bulletin.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num)
|
@bulletins = Bulletin.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page] ).per(@page_num)
|
||||||
end
|
end
|
||||||
|
|
||||||
get_categorys
|
get_categorys
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<td>
|
<td>
|
||||||
<span class="<%= wf[1] %>">
|
<span class="<%= wf[1] %>">
|
||||||
<% if wf[1] == 'title' %>
|
<% if wf[1] == 'title' %>
|
||||||
<%= link_to post.send("#{wf[0]}")[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.send("#{post.class.to_s.underscore}_category_id")) %>
|
<%= link_to post.send("#{wf[0]}"), panel_announcement_front_end_bulletin_path(post, :category_id => post.send("#{post.class.to_s.underscore}_category_id")) %>
|
||||||
<% elsif wf[1] == 'date' %>
|
<% elsif wf[1] == 'date' %>
|
||||||
<%= display_date(post.send(wf[0])) %>
|
<%= display_date(post.send(wf[0])) %>
|
||||||
<% elsif wf[1] == 'category' %>
|
<% elsif wf[1] == 'category' %>
|
||||||
|
|
|
@ -49,7 +49,7 @@ Rails.application.routes.draw do
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
namespace :widget do
|
namespace :widget do
|
||||||
match "bulletins" => "bulletins#index"
|
match "index" => "bulletins#index"
|
||||||
match "bulletins_and_web_links" => "bulletins#bulletins_and_web_links"
|
match "bulletins_and_web_links" => "bulletins#bulletins_and_web_links"
|
||||||
match "reload_bulletins" => "bulletins#reload_bulletins"
|
match "reload_bulletins" => "bulletins#reload_bulletins"
|
||||||
match "reload_web_links" => "bulletins#reload_web_links"
|
match "reload_web_links" => "bulletins#reload_web_links"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class Panel::Archive::BackEnd::ArchiveFilesController < OrbitBackendController
|
class Panel::Archive::BackEnd::ArchiveFilesController < OrbitBackendController
|
||||||
|
before_filter :force_order_for_visitor,:only=>[:index]
|
||||||
before_filter :authenticate_user!
|
before_filter :force_order_for_user,:except => [:index]
|
||||||
before_filter :is_admin?
|
before_filter :for_app_sub_manager,:except => [:index]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
||||||
|
|
|
@ -10,12 +10,14 @@
|
||||||
<% if post.is_hidden? %>
|
<% if post.is_hidden? %>
|
||||||
<span class="label"><%= t(:hidden) %></span>
|
<span class="label"><%= t(:hidden) %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if is_manager?%>
|
||||||
<div class="quick-edit">
|
<div class="quick-edit">
|
||||||
<ul class="nav nav-pills hide">
|
<ul class="nav nav-pills hide">
|
||||||
<li><%= link_to t('archive_file.edit'), edit_panel_archive_back_end_archive_file_path(post) %></li>
|
<li><%= link_to t('archive_file.edit'), edit_panel_archive_back_end_archive_file_path(post) %></li>
|
||||||
<li><%= link_to t('archive_file.delete'), panel_archive_back_end_archive_file_path(post), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
|
<li><%= link_to t('archive_file.delete'), panel_archive_back_end_archive_file_path(post), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<%end%>
|
||||||
</td>
|
</td>
|
||||||
<td><%= post.archive_file_category.title %></td>
|
<td><%= post.archive_file_category.title %></td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -290,6 +290,7 @@ var calendarAPI = function(){
|
||||||
})
|
})
|
||||||
var doneEventArray = new Array();
|
var doneEventArray = new Array();
|
||||||
var makerow = function(events){
|
var makerow = function(events){
|
||||||
|
|
||||||
var $eventrow =null;
|
var $eventrow =null;
|
||||||
var currow = 0;
|
var currow = 0;
|
||||||
var curdate = 0;
|
var curdate = 0;
|
||||||
|
@ -320,8 +321,6 @@ var calendarAPI = function(){
|
||||||
var recordcurdate = true;
|
var recordcurdate = true;
|
||||||
|
|
||||||
if(allow){
|
if(allow){
|
||||||
if(evnt.title=="Navratri")
|
|
||||||
//console.log(pos);
|
|
||||||
if(pos == 1){
|
if(pos == 1){
|
||||||
var colspan = 0;
|
var colspan = 0;
|
||||||
if(evnt.total_days>7){
|
if(evnt.total_days>7){
|
||||||
|
@ -373,6 +372,7 @@ var calendarAPI = function(){
|
||||||
if(recordcurdate)
|
if(recordcurdate)
|
||||||
doneEventArray.push(evnt.index);
|
doneEventArray.push(evnt.index);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,7 +389,8 @@ var calendarAPI = function(){
|
||||||
this.loadWeekView = function(week,year){
|
this.loadWeekView = function(week,year){
|
||||||
$("#range_selection").hide();
|
$("#range_selection").hide();
|
||||||
$("#navigation").show();
|
$("#navigation").show();
|
||||||
$("#sec1").removeClass("span8").addClass("span3");
|
$("#sec1").removeClass("span7").addClass("span3");
|
||||||
|
$("#sec3").removeClass("span5").addClass("span4");
|
||||||
$("#sec2").show();
|
$("#sec2").show();
|
||||||
c.view = "week";
|
c.view = "week";
|
||||||
if(!week){
|
if(!week){
|
||||||
|
@ -514,6 +515,7 @@ var calendarAPI = function(){
|
||||||
$("#range_selection").hide();
|
$("#range_selection").hide();
|
||||||
$("#navigation").show();
|
$("#navigation").show();
|
||||||
$("#sec1").removeClass("span7").addClass("span3");
|
$("#sec1").removeClass("span7").addClass("span3");
|
||||||
|
$("#sec3").removeClass("span5").addClass("span4");
|
||||||
$("#sec2").show();
|
$("#sec2").show();
|
||||||
c.view = "day";
|
c.view = "day";
|
||||||
if(!day){
|
if(!day){
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
class Panel::Calendar::BackEnd::CalsController < OrbitBackendController
|
class Panel::Calendar::BackEnd::CalsController < OrbitBackendController
|
||||||
include AdminHelper
|
include AdminHelper
|
||||||
include Panel::Calendar::BackEnd::CalsHelper
|
include Panel::Calendar::BackEnd::CalsHelper
|
||||||
before_filter :force_order_for_user
|
|
||||||
|
before_filter :force_order_for_visitor,:except=>[:new,:edit,:update,:create,:destroy]
|
||||||
|
before_filter :force_order_for_user,:only => [:new,:edit,:update,:create,:destroy]
|
||||||
|
before_filter :for_app_sub_manager,:only => [:new,:edit,:update,:create,:destroy]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@calendars = Cal.all
|
@calendars = Cal.all
|
||||||
end
|
end
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="view_holder"></div>
|
<div id="view_holder"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<% if is_manager? %>
|
||||||
<div class="form-actions form-fixed">
|
<div class="form-actions form-fixed">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span8">
|
<div class="span8">
|
||||||
|
@ -67,6 +68,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<%end%>
|
||||||
<div id="event_create" class="modal" style="right: 8px; bottom: 50px; left: auto; top: auto; width: 380px; margin: 0;display:none;"></div>
|
<div id="event_create" class="modal" style="right: 8px; bottom: 50px; left: auto; top: auto; width: 380px; margin: 0;display:none;"></div>
|
||||||
|
|
||||||
<div id="event_quick_view" class="modal" style="width: 300px; display:none; margin:0 0 0 0;"></div>
|
<div id="event_quick_view" class="modal" style="width: 300px; display:none; margin:0 0 0 0;"></div>
|
||||||
|
|
|
@ -2,8 +2,10 @@ class Panel::Gallery::BackEnd::AlbumImagesController < OrbitBackendController
|
||||||
include AdminHelper
|
include AdminHelper
|
||||||
|
|
||||||
# before_filter :force_order_for_visitor,:only=>[:index]
|
# before_filter :force_order_for_visitor,:only=>[:index]
|
||||||
before_filter :force_order_for_user#,:except => [:index]
|
# before_filter :force_order_for_user#,:except => [:index]
|
||||||
|
before_filter :force_order_for_visitor,:only=>[:index,:show]
|
||||||
|
before_filter :force_order_for_user,:except => [:index,:show]
|
||||||
|
before_filter :for_app_sub_manager,:except => [:index,:show]
|
||||||
def show
|
def show
|
||||||
if is_manager? || is_admin? || is_sub_manager?
|
if is_manager? || is_admin? || is_sub_manager?
|
||||||
@authenticated = true #turn this value to false for view only
|
@authenticated = true #turn this value to false for view only
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
||||||
include AdminHelper
|
include AdminHelper
|
||||||
|
|
||||||
before_filter :force_order_for_user, :except => [:index,:get_album_json,:get_imgs_json]
|
# before_filter :force_order_for_user, :except => [:index,:get_album_json,:get_imgs_json]
|
||||||
|
|
||||||
|
before_filter :force_order_for_visitor,:only=>[:index,:show,:get_album_json,:get_imgs_json,:get_albums,:imgs]
|
||||||
|
before_filter :force_order_for_user,:except => [:index,:show,:get_album_json,:get_imgs_json,:get_albums,:imgs]
|
||||||
|
before_filter :for_app_sub_manager,:except => [:index,:show,:get_album_json,:get_imgs_json,:get_albums,:imgs]
|
||||||
|
# before_filter lambda
|
||||||
|
|
||||||
def index
|
def index
|
||||||
if is_manager? || is_admin? || is_sub_manager?
|
if is_manager? || is_admin? || is_sub_manager?
|
||||||
|
|
|
@ -10,6 +10,7 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
||||||
@album.tag_ids.each do |tag|
|
@album.tag_ids.each do |tag|
|
||||||
@tags << GalleryTag.find(tag)[I18n.locale]
|
@tags << GalleryTag.find(tag)[I18n.locale]
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_albums
|
def get_albums
|
||||||
|
@ -96,6 +97,7 @@ class Panel::Gallery::FrontEnd::AlbumsController < OrbitWidgetController
|
||||||
tags.each do |tag|
|
tags.each do |tag|
|
||||||
@tagnames << GalleryTag.find(tag)[I18n.locale]
|
@tagnames << GalleryTag.find(tag)[I18n.locale]
|
||||||
end
|
end
|
||||||
|
@back_link = panel_gallery_front_end_album_path(@albumid)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class Panel::Gallery::Widget::AlbumsController < OrbitWidgetController
|
class Panel::Gallery::Widget::AlbumsController < OrbitWidgetController
|
||||||
|
|
||||||
def widget1
|
def widget1
|
||||||
@settings = {"vertical"=>2,"horizontal"=>6}
|
@settings = {"vertical"=>2,"horizontal"=>6} #[note] horizontal has it's limitation from 2 to 6
|
||||||
@class = "c" + @settings["horizontal"].to_s
|
@class = "c" + @settings["horizontal"].to_s
|
||||||
@total = @settings["vertical"] * @settings["horizontal"]
|
@total = @settings["vertical"] * @settings["horizontal"]
|
||||||
@rnd = Random.new
|
@rnd = Random.new
|
||||||
|
|
|
@ -5,7 +5,7 @@ class GalleryAlbum
|
||||||
field :name, localize: true
|
field :name, localize: true
|
||||||
field :description, localize: true
|
field :description, localize: true
|
||||||
field :cover, default: "default"
|
field :cover, default: "default"
|
||||||
field :cover_path
|
field :cover_path #can refact
|
||||||
field :tag_names
|
field :tag_names
|
||||||
|
|
||||||
belongs_to :gallery_category
|
belongs_to :gallery_category
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% if is_admin? %>
|
||||||
|
<!-- #TODO or 類別屬於他 -->
|
||||||
<!-- tag part -->
|
<!-- tag part -->
|
||||||
<div id="tag_panel" class="my_scroll">
|
<div id="tag_panel" class="my_scroll">
|
||||||
<div class="scrollbar">
|
<div class="scrollbar">
|
||||||
|
@ -48,20 +51,22 @@
|
||||||
<div class="viewport">
|
<div class="viewport">
|
||||||
<div class="overview">
|
<div class="overview">
|
||||||
<ul class="tag_list" id="gallery_tag_list">
|
<ul class="tag_list" id="gallery_tag_list">
|
||||||
<% if @authenticated %>
|
<%# if @authenticated %>
|
||||||
<% @tags.each do |tag| %>
|
<% @tags.each do |tag| %>
|
||||||
<li data-content="<%= tag.id %>"><input id="tag_<%= tag.id %>" type="checkbox"><label for="tag_<%= tag.id %>"><%= tag[I18n.locale] %></label><span style="display:none;"><%= tag[@locales[1]] %> <%= tag[@locales[0]] %></span></li>
|
<li data-content="<%= tag.id %>"><input id="tag_<%= tag.id %>" type="checkbox"><label for="tag_<%= tag.id %>"><%= tag[I18n.locale] %></label><span style="display:none;"><%= tag[@locales[1]] %> <%= tag[@locales[0]] %></span></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<%# end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% if @authenticated %>
|
<%# if @authenticated %>
|
||||||
<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>
|
<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 %>
|
<%# end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<%end%>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var $tag_panel = $('#tag_panel');
|
var $tag_panel = $('#tag_panel');
|
||||||
orbit_bar_height = $('#orbit-bar').outerHeight();
|
orbit_bar_height = $('#orbit-bar').outerHeight();
|
||||||
|
@ -82,11 +87,14 @@
|
||||||
<!-- tag end -->
|
<!-- tag end -->
|
||||||
<div class="form-actions form-fixed pagination-right rghead">
|
<div class="form-actions form-fixed pagination-right rghead">
|
||||||
<div class="rgfn">
|
<div class="rgfn">
|
||||||
<a href="" class="bt-back btn pull-left" title="<%= I18n.t("gallery.back_to_photos") %>"><i class="icon-arrow-left icon-black"></i><%= I18n.t("gallery.back_to_photos") %></a>
|
<%= link_to (content_tag(:i,I18n.t("gallery.back_to_photos"),:class=>"icon-arrow-left icon-black")),"",:class=>"bt-back btn pull-left btn-primary",:title=>I18n.t("gallery.back_to_photos")%>
|
||||||
<% if @authenticated %>
|
|
||||||
<a class="bt-edit btn btn-primary pull-right" title="<%= I18n.t("gallery.edit") %>" href="<%= edit_panel_gallery_back_end_album_path(@album) %>" ><i class="icon-pencil icon-white"></i><%= I18n.t("gallery.edit") %></a>
|
<% if is_admin? %>
|
||||||
|
<!-- #TODO or類別屬於他 -->
|
||||||
|
<%= link_to (content_tag(:i,I18n.t("gallery.edit"),:class=>"icon-pencil icon-white")),edit_panel_gallery_back_end_album_path(@album),:class=>"bt-edit btn btn-primary pull-right",:title=>I18n.t("gallery.edit")%>
|
||||||
|
<%= link_to (content_tag(:i,I18n.t("gallery.photo_tag"),:class=>"icon-pencil icon-white")),'#tags',:class=>"bt-tag btn btn-primary pull-right",:title=>I18n.t("gallery.photo_tag")%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<a class="bt-tag btn btn-primary pull-right" title="<%= I18n.t("gallery.photo_tag") %>" href="#tags" ><i class="icon-tag icon-white"></i><%= I18n.t("gallery.photo_tag") %></a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<%= stylesheet_link_tag "gallery" %>
|
<%= stylesheet_link_tag "gallery" %>
|
||||||
|
|
||||||
<div id="filter" class="subnav">
|
<div id="filter" class="subnav">
|
||||||
|
@ -44,14 +43,17 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% if is_sub_manager? %>
|
||||||
<div class="form-actions form-fixed pagination-right rghead">
|
<div class="form-actions form-fixed pagination-right rghead">
|
||||||
<div class="rgfn">
|
<div class="rgfn">
|
||||||
<% if @authenticated %>
|
|
||||||
<a class="btn btn-primary pull-right" title="<%= I18n.t("gallery.add_album") %>" href="<%= new_panel_gallery_back_end_album_path %>" onclick="return false;"><i class="icon-plus icon-white"></i><%= I18n.t("gallery.add_album") %></a>
|
<a class="btn btn-primary pull-right" title="<%= I18n.t("gallery.add_album") %>" href="<%= new_panel_gallery_back_end_album_path %>" onclick="return false;"><i class="icon-plus icon-white"></i><%= I18n.t("gallery.add_album") %></a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<%end %>
|
<%end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% content_for :page_specific_javascript do %>
|
<% content_for :page_specific_javascript do %>
|
||||||
<%= javascript_include_tag "galleryAPI" %>
|
<%= javascript_include_tag "galleryAPI" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% if is_sub_manager? #TODO 或 這類別是他自己的 %>
|
||||||
|
|
||||||
<!-- tag part -->
|
<!-- tag part -->
|
||||||
<div id="tag_panel" class="my_scroll">
|
<div id="tag_panel" class="my_scroll">
|
||||||
<div class="scrollbar">
|
<div class="scrollbar">
|
||||||
|
@ -25,15 +28,12 @@
|
||||||
<div class="viewport">
|
<div class="viewport">
|
||||||
<div class="overview">
|
<div class="overview">
|
||||||
<ul class="tag_list" id="gallery_tag_list">
|
<ul class="tag_list" id="gallery_tag_list">
|
||||||
<% if @authenticated %>
|
|
||||||
<% @tags.each do |tag| %>
|
<% @tags.each do |tag| %>
|
||||||
<li data-content="<%= tag.id %>"><input id="tag_<%= tag.id %>" type="checkbox"><label for="tag_<%= tag.id %>"><%= tag[I18n.locale] %></label><span style="display:none;"><%= tag[@locales[1]] %> <%= tag[@locales[0]] %></span></li>
|
<li data-content="<%= tag.id %>"><input id="tag_<%= tag.id %>" type="checkbox"><label for="tag_<%= tag.id %>"><%= tag[I18n.locale] %></label><span style="display:none;"><%= tag[@locales[1]] %> <%= tag[@locales[0]] %></span></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% if @authenticated %>
|
|
||||||
<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>
|
<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%>
|
<%end%>
|
||||||
|
|
||||||
|
@ -59,13 +59,23 @@
|
||||||
<!-- tag end -->
|
<!-- tag end -->
|
||||||
<div class="form-actions form-fixed pagination-right rghead">
|
<div class="form-actions form-fixed pagination-right rghead">
|
||||||
<div class="rgfn">
|
<div class="rgfn">
|
||||||
<a class="bt-back btn btn-primary pull-left" title="<%= I18n.t("gallery.back_to_albums") %>" href="<%= panel_gallery_back_end_albums_path %>"><i class="icon-arrow-left icon-white"></i><%= I18n.t("gallery.back_to_albums") %></a>
|
<%= 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" %>
|
||||||
<a class="bt-tag btn btn-primary pull-right" title="<%= I18n.t("gallery.album_tag") %>" href="" ><i class="icon-tag icon-white"></i><%= I18n.t("gallery.album_tag") %></ a>
|
|
||||||
<% if @authenticated %>
|
|
||||||
<a class="bt-add btn btn-primary pull-right" title="<%= I18n.t("gallery.add_images") %>" href="images" onclick="return false;"><i class="icon-plus icon-white"></i><%= I18n.t("gallery.add_images") %></a>
|
|
||||||
<a class="bt-del btn btn-primary pull-right" title="<%= I18n.t("gallery.del_album") %>" href="delete" onclick="return false;"><i class="icon-trash icon-white"></i><%= I18n.t("gallery.del_album") %></a>
|
<%= 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? %>
|
||||||
<a class="bt-edit btn btn-primary pull-right" title="<%= I18n.t("gallery.edit") %>" href="<%= edit_panel_gallery_back_end_album_path(@album) %>" ><i class="icon-pencil icon-white"></i><%= I18n.t("gallery.edit") %></a>
|
<!-- #TODO 或是類別屬於他 -->
|
||||||
<% end %>
|
|
||||||
|
<%= 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("gallery.edit"),:class=>"icon-plus icon-white")),edit_panel_gallery_back_end_album_path(@album),:title=> I18n.t("gallery.edit") ,:class=>"bt-edit btn btn-primary pull-right" if is_admin?%>
|
||||||
|
<!-- #TODO 或是類別屬於他 -->
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
gallery.loadAlbums(gallery.urlVars['tag']);
|
gallery.loadAlbums(gallery.urlVars['tag']);
|
||||||
}else{
|
}else{
|
||||||
gallery.loadArea = "albums";
|
gallery.loadArea = "albums";
|
||||||
g.loadAlbums("all");
|
gallery.loadAlbums("all");
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<!-- tag end -->
|
<!-- tag end -->
|
||||||
<div class="form-actions form-fixed pagination-right rghead">
|
<div class="form-actions form-fixed pagination-right rghead">
|
||||||
<div class="rgfn">
|
<div class="rgfn">
|
||||||
<a class="bt-back rgbt" title="<%= I18n.t("gallery.back_to_albums") %>" href="gallery"><i class="icon-arrow-left"></i> <%= I18n.t("gallery.back_to_albums") %></a>
|
<a class="bt-back rgbt" title="<%= I18n.t("gallery.back_to_albums") %>" href="<%= panel_gallery_front_end_albums_path %>"><i class="icon-arrow-left"></i> <%= I18n.t("gallery.back_to_albums") %></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<!-- tag end -->
|
<!-- tag end -->
|
||||||
<div class="form-actions form-fixed pagination-right rghead">
|
<div class="form-actions form-fixed pagination-right rghead">
|
||||||
<div class="rgfn">
|
<div class="rgfn">
|
||||||
<a class="bt-back rgbt" title="<%= I18n.t("gallery.back_to_albums") %>" href="gallery?id=<%= @albumid %>"><i class="icon-arrow-left"></i> <%= I18n.t("gallery.back_to_albums") %></a>
|
<a class="bt-back rgbt" title="<%= I18n.t("gallery.back_to_albums") %>" href="<%= @back_link %>"><i class="icon-arrow-left"></i> <%= I18n.t("gallery.back_to_albums") %></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- tag part -->
|
<!-- tag part -->
|
||||||
<% if @authenticated %>
|
<%# if @authenticated %>
|
||||||
<div id="tag_panel" class="my_scroll">
|
<div id="tag_panel" class="my_scroll">
|
||||||
<div class="scrollbar">
|
<div class="scrollbar">
|
||||||
<div class="track">
|
<div class="track">
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<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>
|
<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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<%# end %>
|
||||||
<% content_for :page_specific_javascript do %>
|
<% content_for :page_specific_javascript do %>
|
||||||
<%= javascript_include_tag "jquery.tinyscrollbar" %>
|
<%= javascript_include_tag "jquery.tinyscrollbar" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -3,7 +3,7 @@ class Panel::Gprs::BackEnd::LocationsController < OrbitBackendController
|
||||||
#before_filter :clean_values, :only => [:create, :update]
|
#before_filter :clean_values, :only => [:create, :update]
|
||||||
|
|
||||||
before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :delete]
|
before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :delete]
|
||||||
before_filter :force_order_for_user,:except => :get_locations
|
before_filter :force_order_for_user,:except => [:get_locations,:index]
|
||||||
#before_filter :for_app_sub_manager,:except => [:index, :new, :edit, :delete, :get_locations]
|
#before_filter :for_app_sub_manager,:except => [:index, :new, :edit, :delete, :get_locations]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -6,8 +6,10 @@
|
||||||
<th class="span1"><%= t('location.longitude') %></th>
|
<th class="span1"><%= t('location.longitude') %></th>
|
||||||
<th class="span1"><%= t('location.latitude') %></th>
|
<th class="span1"><%= t('location.latitude') %></th>
|
||||||
<th class="span3"><%= t('location.description') %></th>
|
<th class="span3"><%= t('location.description') %></th>
|
||||||
|
<%if is_manager? %>
|
||||||
<th class="span1"><%= t('location.edit') %></th>
|
<th class="span1"><%= t('location.edit') %></th>
|
||||||
<th class="span1"><%= t('location.delete') %></th>
|
<th class="span1"><%= t('location.delete') %></th>
|
||||||
|
<% end %>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="tbody_locations" class="sort-holder">
|
<tbody id="tbody_locations" class="sort-holder">
|
||||||
|
@ -18,11 +20,15 @@
|
||||||
<td><%= location.longitude%></td>
|
<td><%= location.longitude%></td>
|
||||||
<td><%= location.latitude%></td>
|
<td><%= location.latitude%></td>
|
||||||
<td><%= location.description%></td>
|
<td><%= location.description%></td>
|
||||||
|
<%if is_manager? %>
|
||||||
<td><%= link_to 'Edit', edit_panel_gprs_back_end_location_path(location) %></td>
|
<td><%= link_to 'Edit', edit_panel_gprs_back_end_location_path(location) %></td>
|
||||||
<td><%= link_to 'Destroy', panel_gprs_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %></td>
|
<td><%= link_to 'Destroy', panel_gprs_back_end_location_path(location), method: :delete , :confirm => t(:sure?) %></td>
|
||||||
|
<%end%>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<%if is_manager? %>
|
||||||
<td><%= link_to 'New', new_panel_gprs_back_end_location_path %></td>
|
<td><%= link_to 'New', new_panel_gprs_back_end_location_path %></td>
|
||||||
|
<% end %>
|
Loading…
Reference in New Issue