Remove news and fix default_url in ImageUploader
This commit is contained in:
1 parent
0d26f48c9a
commit
475642d375
163 files changed
+46
-8582
No files matched your search
@@ -1,29 +0,0 @@
|
||||
<%#= encoding: utf-8 %>
|
||||
$(document).ready(function(){
|
||||
//alert("News Loaded");
|
||||
|
||||
$('.news_bulletin_links_block a.delete').live('click', function(){
|
||||
$(this).parents('.list_item').remove();
|
||||
});
|
||||
|
||||
$('.news_bulletin_files_block a.delete').live('click', function(){
|
||||
$(this).parents('.list_item').remove();
|
||||
});
|
||||
|
||||
$(document).on('click', '.action a.remove_existing_record', function(){
|
||||
if(confirm("<%= I18n.t(:sure?)%>")){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#" + $(this).prev().attr('value')).hide();
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.quick_edit_cancel', function(){
|
||||
tr = $(this).attr('rel');
|
||||
$('#' + tr).hide();
|
||||
$("tr#news_bulletin_file_" + $(this).prev().attr('value')).hide();
|
||||
$("tr#news_bulletin_link_" + $(this).prev().attr('value')).hide();
|
||||
});
|
||||
$('.reject_info').tooltip({
|
||||
placement : 'bottom'
|
||||
});
|
||||
});
|
||||
@@ -5,9 +5,9 @@ class Admin::DashboardsController < OrbitBackendController
|
||||
# before_filter :is_admin?
|
||||
|
||||
def index
|
||||
@module_app_contents, @module_app_contents_total = get_module_app_count('bulletin', 'news_bulletin', 'page_context', 'web_link')
|
||||
@recent_updated = get_recently_updated('bulletin', 'news_bulletin', 'page_context', 'web_link')
|
||||
@most_visited = get_most_visited('bulletin', 'news_bulletin', 'page_context')
|
||||
@module_app_contents, @module_app_contents_total = get_module_app_count('bulletin', 'page_context', 'web_link')
|
||||
@recent_updated = get_recently_updated('bulletin', 'page_context', 'web_link')
|
||||
@most_visited = get_most_visited('bulletin', 'page_context')
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
@@ -4,8 +4,6 @@ module Admin::DashboardsHelper
|
||||
case title
|
||||
when 'bulletin'
|
||||
panel_announcement_front_end_bulletins_path
|
||||
when 'news_bulletin'
|
||||
panel_news_front_end_news_bulletins_path
|
||||
when'page_context'
|
||||
panel_page_content_front_end_page_contexts_path
|
||||
when'web_link'
|
||||
@@ -17,8 +15,6 @@ module Admin::DashboardsHelper
|
||||
case object.class.to_s.underscore
|
||||
when 'bulletin'
|
||||
panel_announcement_front_end_bulletin_path(object)
|
||||
when 'news_bulletin'
|
||||
panel_news_front_end_news_bulletin_path(object)
|
||||
when'page_context'
|
||||
"/#{object.page.path}"
|
||||
when'web_link'
|
||||
|
||||
@@ -260,13 +260,8 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def share_links(object, key)
|
||||
# js = ''
|
||||
# js << "<meta property='og:title' content='#{object.title}' />\n" rescue ''
|
||||
# js << "<meta property='og:description' content='#{object.subtitle}' />\n" rescue ''
|
||||
# js << "<meta property='og:image' content='#{object.image.url}' />\n" rescue ''
|
||||
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 if !object.image.blank?}")
|
||||
# concat javascript_tag "$('head').append('#{j js}');"
|
||||
concat social_share_button_tag(object.title, :fb_url => generate_fb_url(object,key), :image => "http://#{request.env['HTTP_HOST']}#{object.image_url}")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ class ImageUploader < CarrierWave::Uploader::Base
|
||||
# "/images/fallback/" + [version_name, "default.png"].compact.join('_')
|
||||
# end
|
||||
def default_url
|
||||
Site.first.default_image.url rescue "-sign-in-logo.png"
|
||||
[version_name, (Site.first.default_image.file.url rescue "sign-in-logo.png")].compact.join('_')
|
||||
end
|
||||
|
||||
# Process files as they are uploaded:
|
||||
|
||||
@@ -20,19 +20,6 @@
|
||||
|
||||
<% 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') 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.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 -%>
|
||||
|
||||
Reference in new issue
Block a user