Orbit/app/views/layouts/_side_bar.html.erb

200 lines
22 KiB
Plaintext

<%#= content_tag :li, :class => active_for_controllers('purchases') do -%>
<%#= link_to content_tag(:i, nil, :class => 'icons-purchase') + t('admin.purchase'), admin_purchases_path %>
<%# end -%>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "/static/kernel.js" %>
<% end %>
<%= 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 %>
<%= 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.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.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.bulletin.approval_setting') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_announcement_back_end_approval_setting_path), :class => active_for_action('approvals', 'setting') if (is_manager? rescue nil) %>
<%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "Announcement"}))), :class => active_for_app_auth('Announcement') if (is_admin? rescue nil) %>
<% end -%>
<% end -%>
<%= 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 %>
<%= 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.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.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.bulletin.approval_setting') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_news_back_end_approval_setting_path), :class => active_for_action('news_approvals', 'setting') if (is_manager? rescue nil) %>
<%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "news"}))), :class => active_for_app_auth('news') if (is_admin? rescue nil) %>
<% end -%>
<% end -%>
<%#= content_tag :li, :class => active_for_controllers('users') do -%>
<%#= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), admin_users_path %>
<%# end -%>
<%= content_tag :li, :class => active_for_controllers('users_new_interface') do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-page')+ content_tag(:span, t('admin.new_admin.user')), admin_users_new_interface_index_path %>
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('users_new_interface')) do -%>
<%= content_tag :li, link_to((t('admin.new_admin.side_bar.all_user') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, admin_users_new_interface_index_path), :class => active_for_action('users_new_interface', 'index') %>
<%= content_tag :li, link_to((t('admin.new_admin.side_bar.add_user') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, ), :class => active_for_action('users_new_interfacexx', 'index') %>
<%= content_tag :li, link_to((t('admin.new_admin.side_bar.user_roles') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, ), :class => active_for_action('users_new_interfacexx', 'index') %>
<%= content_tag :li, link_to((t('admin.new_admin.side_bar.user_info') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, ), :class => active_for_action('users_new_interfacexx', 'index') %>
<% end -%>
<% end -%>
<%= content_tag :li, :class => active_for_controllers('page_contexts') || active_for_app_auth('page_content') || active_for_ob_auths_object("PageContext") do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-page') + content_tag(:span, t('admin.page')), panel_page_content_back_end_page_contexts_path %>
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('page_contexts')) do -%>
<%#= content_tag :li, link_to(t('admin.all_articles'), panel_page_content_back_end_page_contexts_path), :class => active_for_action('page_context', 'index') %>
<%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "page_content"}))), :class => active_for_app_auth('page_content') if (is_admin? rescue nil) %>
<% end -%>
<% end -%>
<%= content_tag :li, :class => active_for_controllers('ad_banners', 'ad_images') ||active_for_ob_auths_object("AdBanner") ||active_for_app_auth('ad_banners') do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-link') + content_tag(:span, t('admin.ad_banner')), admin_ad_banners_path %>
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('ad_banners', 'ad_images') ) do -%>
<%#= 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_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %>
<%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "ad_banners"}))), :class => active_for_app_auth('ad_banners') if (is_admin? rescue nil) %>
<% end -%>
<% end %>
<%= 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 %>
<%= 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('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.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('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "web_resource"}))), :class => active_for_app_auth('web_resource') if (is_admin? rescue nil) %>
<% end -%>
<% end -%>
<%= content_tag :li, :class => active_for_controllers('albums','album_images','gallery_categories','/panel/gallery/back_end/tags') || active_for_app_auth("gallery") do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-picture') + content_tag(:span, t('admin.orbit_gallery')), panel_gallery_back_end_albums_path %>
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('albums') ) do -%>
<%#= 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_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %>
<%= content_tag :li, link_to((t('gallery.categories') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_gallery_back_end_gallery_categories_path), :class => active_for_action('gallery_categories','index') %>
<%= content_tag :li, link_to((t('gallery.tags') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, panel_gallery_back_end_tags_path), :class => active_for_action('/panel/gallery/back_end/tags', 'index') %>
<%= content_tag :li, link_to((t('admin.module.authorization') + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,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 %>
<%= content_tag :li, :class => active_for_controllers('archive_files', '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 %>
<%= 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.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') %>
<%= 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') %>
<%= 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') %>
<% end -%>
<% end -%>
<%= content_tag :li, :class => active_for_controllers('cals','calendar_categories') || active_for_app_auth("calendar") do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-calendar') + content_tag(:span, t('admin.calendar')), panel_calendar_back_end_cals_path %>
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('cals','calendar_categories') ) do -%>
<%#= 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_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %>
<%= content_tag :li, link_to((t('calendar.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('gallery.tags'), panel_gallery_back_end_tags_path), :class => active_for_action('/panel/gallery/back_end/tags', 'index') %>
<%#= 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 %>
<%= content_tag :li, :class => (active_for_controllers('writing_journals', '/panel/personal_journal/back_end/tags', 'writing_journal_categorys', 'approvals') || active_for_app_auth('PersonalJournal') ) do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-personal_journal') + t('admin.personal_journal'), panel_personal_journal_back_end_writing_journals_path %>
<%= content_tag :ul, :class => ("nav nav-list " + (visible_for_controllers('writing_journals', '/panel/personal_journal/back_end/tags', 'writing_journal_categorys', 'approvals'))) do -%>
<%= content_tag :li, link_to(t('personal_journal.all_articles'), panel_personal_journal_back_end_writing_journals_path), :class => active_for_action('writing_journals', 'index') %>
<%= content_tag :li, link_to(t('personal_journal.setting'), panel_personal_journal_back_end_writing_journal_setting_path), :class => active_for_action('writing_journal_setting', 'index') %>
<%= content_tag :li, link_to(t('personal_journal.paper_type'), panel_personal_journal_back_end_journal_paper_types_path), :class => active_for_action('paper_types', 'index') %>
<%= content_tag :li, link_to(t('personal_journal.author_type'), panel_personal_journal_back_end_journal_author_types_path), :class => active_for_action('author_types', 'index') %>
<%= content_tag :li, link_to(t('personal_journal.level_type'), panel_personal_journal_back_end_journal_level_types_path), :class => active_for_action('level_types', 'index') %>
<%= content_tag :li, link_to(t('personal_journal.tags'), panel_personal_journal_back_end_tags_path), :class => active_for_action('/panel/personal_journal/back_end/tags', 'index') %>
<% end -%>
<% end -%>
<%= content_tag :li, :class => (active_for_controllers('writing_seminars', '/panel/personal_seminar/back_end/tags', 'writing_seminar_categorys', 'approvals') || active_for_app_auth('PersonalJournal') ) do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-personal_seminar') + t('admin.personal_seminar'), panel_personal_seminar_back_end_writing_seminars_path %>
<%= content_tag :ul, :class => ("nav nav-list " + (visible_for_controllers('writing_seminars', '/panel/personal_seminar/back_end/tags', 'writing_seminar_categorys', 'approvals'))) do -%>
<%= content_tag :li, link_to(t('personal_seminar.all_articles'), panel_personal_seminar_back_end_writing_seminars_path), :class => active_for_action('writing_seminars', 'index') %>
<%= content_tag :li, link_to(t('personal_seminar.setting'), panel_personal_seminar_back_end_writing_seminar_setting_path), :class => active_for_action('writing_seminar_setting', 'index') %>
<%= content_tag :li, link_to(t('personal_seminar.paper_type'), panel_personal_seminar_back_end_seminar_paper_types_path), :class => active_for_action('paper_types', 'index') %>
<%= content_tag :li, link_to(t('personal_seminar.author_type'), panel_personal_seminar_back_end_seminar_author_types_path), :class => active_for_action('author_types', 'index') %>
<%= content_tag :li, link_to(t('personal_seminar.tags'), panel_personal_seminar_back_end_tags_path), :class => active_for_action('/panel/personal_seminar/back_end/tags', 'index') %>
<% end -%>
<% end -%>
<%= content_tag :li, :class => (active_for_controllers('writing_books', '/panel/personal_book/back_end/tags', 'writing_book_categorys', 'approvals') || active_for_app_auth('PersonalJournal') ) do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-personal_book') + t('admin.personal_book'), panel_personal_book_back_end_writing_books_path %>
<%= content_tag :ul, :class => ("nav nav-list " + (visible_for_controllers('writing_books', '/panel/personal_book/back_end/tags', 'writing_book_categorys', 'approvals'))) do -%>
<%= content_tag :li, link_to(t('personal_book.all_articles'), panel_personal_book_back_end_writing_books_path), :class => active_for_action('writing_books', 'index') %>
<%= content_tag :li, link_to(t('personal_book.setting'), panel_personal_book_back_end_writing_book_setting_path), :class => active_for_action('writing_book_setting', 'index') %>
<%= content_tag :li, link_to(t('personal_book.paper_type'), panel_personal_book_back_end_book_paper_types_path), :class => active_for_action('paper_types', 'index') %>
<%= content_tag :li, link_to(t('personal_book.author_type'), panel_personal_book_back_end_book_author_types_path), :class => active_for_action('author_types', 'index') %>
<%= content_tag :li, link_to(t('personal_book.tags'), panel_personal_book_back_end_tags_path), :class => active_for_action('/panel/personal_book/back_end/tags', 'index') %>
<% end -%>
<% end -%>
<%= content_tag :li, :class => (active_for_controllers('researchs', '/panel/personal_research/back_end/tags', 'research_categorys', 'approvals') || active_for_app_auth('PersonalJournal') ) do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-personal_research') + t('admin.personal_research'), panel_personal_research_back_end_researchs_path %>
<%= content_tag :ul, :class => ("nav nav-list " + (visible_for_controllers('researchs', '/panel/personal_research/back_end/tags', 'research_categorys', 'approvals'))) do -%>
<%= content_tag :li, link_to(t('personal_research.all_articles'), panel_personal_research_back_end_researchs_path), :class => active_for_action('researchs', 'index') %>
<%#= content_tag :li, link_to(t('personal_research.setting'), panel_personal_research_back_end_research_setting_path), :class => active_for_action('research_setting', 'index') %>
<%= content_tag :li, link_to(t('personal_research.tags'), panel_personal_research_back_end_tags_path), :class => active_for_action('/panel/personal_research/back_end/tags', 'index') %>
<% end -%>
<% end -%>
<%= content_tag :li, :class => (active_for_controllers('projects', '/panel/personal_project/back_end/tags', 'project_categorys', 'approvals') || active_for_app_auth('PersonalJournal') ) do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-personal_project') + t('admin.personal_project'), panel_personal_project_back_end_projects_path %>
<%= content_tag :ul, :class => ("nav nav-list " + (visible_for_controllers('projects', '/panel/personal_project/back_end/tags', 'project_categorys', 'approvals'))) do -%>
<%= content_tag :li, link_to(t('personal_project.all_articles'), panel_personal_project_back_end_projects_path), :class => active_for_action('projects', 'index') %>
<%= content_tag :li, link_to(t('personal_project.setting'), panel_personal_project_back_end_project_setting_path), :class => active_for_action('project_setting', 'index') %>
<%= content_tag :li, link_to(t('personal_project.project_category'), panel_personal_project_back_end_project_categorys_path), :class => active_for_action('project_categorys', 'index') %>
<%= content_tag :li, link_to(t('personal_project.tags'), panel_personal_project_back_end_tags_path), :class => active_for_action('/panel/personal_project/back_end/tags', 'index') %>
<% end -%>
<% end -%>
<%= content_tag :li, :class => (active_for_controllers('writing_patents', '/panel/personal_patent/back_end/tags', 'writing_patent_categorys', 'approvals') || active_for_app_auth('PersonalJournal') ) do -%>
<%= link_to content_tag(:i, nil, :class => 'icons-personal_patent') + t('admin.personal_patent'), panel_personal_patent_back_end_writing_patents_path %>
<%= content_tag :ul, :class => ("nav nav-list " + (visible_for_controllers('writing_patents', '/panel/personal_patent/back_end/tags', 'writing_patent_categorys', 'approvals'))) do -%>
<%= content_tag :li, link_to(t('personal_patent.all_articles'), panel_personal_patent_back_end_writing_patents_path), :class => active_for_action('writing_patents', 'index') %>
<%= content_tag :li, link_to(t('personal_patent.setting'), panel_personal_patent_back_end_writing_patent_setting_path), :class => active_for_action('writing_patent_setting', 'index') %>
<%#= content_tag :li, link_to(t('personal_patent.writing_patent_category'), panel_personal_patent_back_end_writing_patent_categorys_path), :class => active_for_action('writing_patent_categorys', 'index') %>
<%= content_tag :li, link_to(t('personal_patent.tags'), panel_personal_patent_back_end_tags_path), :class => active_for_action('/panel/personal_patent/back_end/tags', 'index') %>
<% end -%>
<% end -%>
<div class="content">
<% flash.each do |key, msg| %>
<%= content_tag :span, msg, :class => [key, "notice label label-warning"] %>
<% end%>
</div>