Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb5579c064 | ||
|
|
b1c7c1b4c8 | ||
|
|
96c3be68f7 | ||
|
|
5fb3731430 | ||
|
|
fb34dc673f | ||
|
|
14ea611f8c | ||
|
|
4f04eca74f | ||
|
|
4120be6f8e | ||
|
|
ae66e7257f | ||
|
|
55fa1cef4f | ||
|
|
5c8a57e700 | ||
|
|
7ef2dacf00 | ||
|
|
08a8d668ec | ||
|
|
b4f5fddc5c | ||
|
|
315a24556c | ||
|
|
cce68beff1 | ||
|
|
cf7f7aa29c | ||
|
|
5328a26440 |
No files matched your search
@@ -11,8 +11,8 @@ gem "net-ldap", "~> 0.3.1"
|
||||
gem 'devise', '1.5.3'
|
||||
gem 'exception_notification' # Send error trace
|
||||
gem 'execjs'
|
||||
gem 'jquery-rails', '2.1.4'
|
||||
gem 'jquery-ui-rails'
|
||||
gem 'jquery-rails', '3.0.4'
|
||||
gem 'jquery-ui-rails', "4.0.5"
|
||||
gem "select2-rails", '3.3.1'
|
||||
gem 'kaminari'
|
||||
gem 'time_difference'
|
||||
@@ -97,6 +97,8 @@ group :test, :development do
|
||||
gem "watchr"
|
||||
gem "spork"
|
||||
gem "capybara"
|
||||
#gem 'rack-mini-profiler'
|
||||
gem "better_errors"
|
||||
# gem 'yard'
|
||||
# gem "bluecloth"
|
||||
end
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
//
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require jquery-ui
|
||||
//= require jquery.ui.all
|
||||
//= require desktop/jquery.form
|
||||
//= require desktop/jquery.tinyscrollbar
|
||||
//= require desktop/jquery.miniColors.min
|
||||
|
||||
@@ -168,7 +168,7 @@ var orbitDesktop = function(dom){
|
||||
o.loadIconCache();
|
||||
var custom_load = window.location.hash;
|
||||
if(!custom_load){
|
||||
$(o.contentHolder).empty().load("/desktop/desktop",function(){
|
||||
$(o.contentHolder).empty().load("/desktop/desktop_container",function(){
|
||||
o.desktopData["d_desktop"] = "";
|
||||
o.initializeDesktop("d_desktop","",false);
|
||||
})
|
||||
@@ -605,10 +605,11 @@ var orbitDesktop = function(dom){
|
||||
|
||||
this.menu_item = function(dom,customload,submenuitem){
|
||||
if(!customload)customload=false;
|
||||
var target = dom.attr("id");
|
||||
var url = dom.attr("href");
|
||||
var target = dom.attr("id"),
|
||||
url = dom.attr("href"),
|
||||
submenu_pass = ( dom.attr("sub-menu") == "false" ? false : true);
|
||||
if(!url)return false;
|
||||
|
||||
|
||||
o.data_method = dom.attr("callback-method");
|
||||
if(o.currenthtml!=target){
|
||||
if(o.desktopData[o.currentface] == "undefined"){
|
||||
@@ -629,33 +630,37 @@ var orbitDesktop = function(dom){
|
||||
window.o[o.data_method](target,url,cache);
|
||||
}
|
||||
}
|
||||
try {
|
||||
if(!customload){
|
||||
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"),data);
|
||||
} else {
|
||||
if(submenuitem){
|
||||
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[custom-load="+submenuitem+"]"));
|
||||
} else {
|
||||
if( submenu_pass ){
|
||||
try {
|
||||
if(!customload){
|
||||
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"),data);
|
||||
} else {
|
||||
if(submenuitem){
|
||||
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[custom-load="+submenuitem+"]"));
|
||||
} else {
|
||||
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"),data);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch(EX){}
|
||||
} catch(EX){}
|
||||
}
|
||||
header_ani();
|
||||
});
|
||||
}else{
|
||||
$(o.contentHolder).html(o.desktopData[o.currentface]);
|
||||
try{
|
||||
if(!customload){
|
||||
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"),o.desktopData[o.currentface]);
|
||||
}else{
|
||||
if(submenuitem)
|
||||
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[custom-load="+submenuitem+"]"),o.desktopData[o.currentface]);
|
||||
else
|
||||
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"),o.desktopData[o.currentface]);
|
||||
}
|
||||
}catch(EX){}
|
||||
if( submenu_pass ){
|
||||
try{
|
||||
if(!customload){
|
||||
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"),o.desktopData[o.currentface]);
|
||||
}else{
|
||||
if(submenuitem)
|
||||
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[custom-load="+submenuitem+"]"),o.desktopData[o.currentface]);
|
||||
else
|
||||
o.sub_menu_item($(o.contentHolder).find("*[content-type=menu] a[load=true]"),o.desktopData[o.currentface]);
|
||||
}
|
||||
}catch(EX){}
|
||||
}
|
||||
|
||||
cache = (o.lastlink == "/desktop/app_manager" ? false : true);
|
||||
// cache = (o.lastlink == "/desktop/app_manager" ? false : true);
|
||||
if(typeof o.data_method != "undefined"){
|
||||
if(o.data_method != ""){
|
||||
window.o[o.data_method](target,url,cache);
|
||||
@@ -1095,7 +1100,7 @@ var orbitDesktop = function(dom){
|
||||
data : options,
|
||||
success : function(data){
|
||||
if(data.success == "true"){
|
||||
if(dom.is(":checked")){ console.log("true");
|
||||
if(dom.is(":checked")){
|
||||
elementSettingsData[$e.data("id")].sections.push({"id" : dom.data("section"),"name":sectionDetails.name});
|
||||
o.notify("Added to " + sectionDetails.name,"success");
|
||||
}else{
|
||||
@@ -1119,20 +1124,16 @@ var orbitDesktop = function(dom){
|
||||
var info_open = function(){
|
||||
if($appinfo.is(":hidden")){
|
||||
$('.overview').stop().animate({'width': '+=480'},0 , function(){
|
||||
$('.tinycanvas').tinyscrollbar_update();
|
||||
// $('.tinycanvas').tinyscrollbar_update('relative');
|
||||
});
|
||||
$appinfo
|
||||
.css({
|
||||
'display': 'block',
|
||||
'margin-left': -480
|
||||
})
|
||||
.delay(300)
|
||||
}).fadeIn(200)
|
||||
.animate({
|
||||
'margin-left': 0
|
||||
}, 500, 'easeInOutQuint');
|
||||
} else {
|
||||
$('.tinycanvas').tinyscrollbar_update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var info_close = function(){
|
||||
@@ -1143,13 +1144,11 @@ var orbitDesktop = function(dom){
|
||||
'margin-left': -480
|
||||
},500 , 'easeInOutQuint', function(){
|
||||
$('.overview').animate({'width': '-=480'}, 0, function(){
|
||||
$('.tinycanvas').tinyscrollbar_update();
|
||||
// $('.tinycanvas').tinyscrollbar_update();
|
||||
});
|
||||
$(this).attr("style","");
|
||||
$(this).fadeOut(300).attr("style","");
|
||||
});
|
||||
} else {
|
||||
$('.tinycanvas').tinyscrollbar_update();
|
||||
}
|
||||
}
|
||||
}
|
||||
$(window).on('keydown', function(){
|
||||
if($('#searchbox').val() == 'Search'){
|
||||
|
||||
@@ -44,7 +44,13 @@ $(function(){
|
||||
startCollapsed: true,
|
||||
disableNesting: 'no-nest',
|
||||
update: function(event, ui) {
|
||||
$.post("<%= Rails.application.routes.url_helpers.admin_update_position_path %>", { id: ui.item.attr('id'), parent_id: (ui.item.parent().closest('li').attr('id') || ui.item.parent().closest('ol').attr('id')), position: ui.item.index() } );
|
||||
var position = null;
|
||||
if($(ui.item).closest('ol').hasClass('item-groups')) {
|
||||
position = $(ui.item).index() - 1;
|
||||
} else {
|
||||
position = $(ui.item).index();
|
||||
};
|
||||
$.post("<%= Rails.application.routes.url_helpers.admin_update_position_path %>", { id: ui.item.attr('id'), parent_id: (ui.item.parent().closest('li').attr('id') || ui.item.parent().closest('ol').attr('id')), position: position } );
|
||||
}
|
||||
});
|
||||
$(".sortable").delegate(".brand, .delete", clickEvent, function(e){
|
||||
|
||||
@@ -55,6 +55,13 @@
|
||||
} else {
|
||||
$viewPage.find('.content').load(url, function(){
|
||||
$viewPage.clone(true).appendTo( $pageslide.empty() ).show();
|
||||
if($('#filter-default-tag').length) {
|
||||
$('#filter-default-tag').fastLiveFilter('.add-default-tags-list', '.filter-item', '.tag');
|
||||
addTagsTab();
|
||||
$('#view-page .card').cardCheck({
|
||||
item: $('#view-page input[type="checkbox"]'),
|
||||
});
|
||||
};
|
||||
if(callback)callback.call(this,$viewPage,element);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class Admin::ItemsController < OrbitBackendController
|
||||
|
||||
def update_position
|
||||
item = Item.find(params[:id])
|
||||
item.shift_to(params[:parent_id], params[:position].to_i - 1)
|
||||
item.shift_to(params[:parent_id], params[:position].to_i)
|
||||
render :nothing => true, status: 200
|
||||
end
|
||||
|
||||
|
||||
@@ -274,8 +274,6 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
|
||||
else
|
||||
user.move_below(user_at_position)
|
||||
end
|
||||
elsif to_go > User.count
|
||||
user.move_to_bottom
|
||||
end
|
||||
end
|
||||
render nothing: true, status: 200
|
||||
|
||||
@@ -19,7 +19,7 @@ class DesktopController< ApplicationController
|
||||
render :layout => "compatibility"
|
||||
end
|
||||
|
||||
def desktop
|
||||
def desktop_container
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
|
||||
@@ -12,7 +12,16 @@ class FrontController < ApplicationController
|
||||
end
|
||||
|
||||
def show_footer
|
||||
render :text => @site.footer
|
||||
@page = Page.find(:all, :conditions => {:name => /terms/i})
|
||||
@name = @page.first.name
|
||||
@url = "/#{@name}"
|
||||
|
||||
if !@site.enable_terms_of_use
|
||||
render :text => (@site.footer + "<a href='#{@url}'>Terms of Use</a>")
|
||||
else
|
||||
render :text => @site.footer
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def show_menu
|
||||
@@ -21,7 +30,15 @@ class FrontController < ApplicationController
|
||||
end
|
||||
|
||||
def show_site_sub_menu
|
||||
render :text => @site.sub_menu
|
||||
@page = Page.find(:all, :conditions => {:name => /sitemap/i})
|
||||
@name = @page.first.name
|
||||
@url = "/#{@name}"
|
||||
|
||||
if !@site.sitemap_menu_in_header
|
||||
render :text => (@site.sub_menu + "<a href='#{@url}'>Sitemap</a>")
|
||||
else
|
||||
render :text => @site.sub_menu
|
||||
end
|
||||
end
|
||||
|
||||
def show_sitemap
|
||||
@@ -43,6 +60,11 @@ class FrontController < ApplicationController
|
||||
@tags = module_app.sorted_tags_for_cloud
|
||||
end
|
||||
|
||||
def show_terms_of_use
|
||||
@site = Site.first rescue nil
|
||||
@terms = @site.terms_of_use
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def menu_level(page, current_page, current, menu)
|
||||
|
||||
@@ -43,7 +43,7 @@ class MobileController < ApplicationController
|
||||
|
||||
def page
|
||||
@page_title = t('mobile.page')
|
||||
@page_contexts = PageContext.where(:archived => false).page(params[:page_main]).per(15)
|
||||
@page_contexts = get_sorted_page_from_structure
|
||||
end
|
||||
|
||||
def page_content
|
||||
@@ -57,4 +57,12 @@ class MobileController < ApplicationController
|
||||
@no_footer = true if request.path =~ /app/
|
||||
end
|
||||
|
||||
def get_sorted_page_from_structure
|
||||
page_contexts = Item.structure_ordered_items.inject([]){ |pages, page|
|
||||
pages << page.page_contexts.where(archived: false).limit(1)[0] if page.is_a?(Page) && !page.page_contexts.blank?
|
||||
pages
|
||||
}
|
||||
Kaminari.paginate_array(page_contexts).page(params[:page]).per(15)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -9,7 +9,7 @@ class PagesController < ApplicationController
|
||||
|
||||
if @item
|
||||
delayed_impressionist(@item)
|
||||
render_page
|
||||
render_page
|
||||
else
|
||||
redirect_to '/admin/dashboards',:notice=>t(:need_home)
|
||||
# render :text => t(:need_home)
|
||||
@@ -19,6 +19,7 @@ class PagesController < ApplicationController
|
||||
def show
|
||||
#begin
|
||||
@item = Item.first(:conditions => {:path => params[:page_name]})
|
||||
|
||||
if @item && @item.is_published && (@item.enabled_for.nil? ? true : @item.enabled_for.include?(I18n.locale.to_s))
|
||||
delayed_impressionist(@item)
|
||||
case @item.class.to_s
|
||||
@@ -26,7 +27,7 @@ class PagesController < ApplicationController
|
||||
if params[:clicked_field_name]
|
||||
render_page({"clicked_field_name"=>params["clicked_field_name"]}) unless save_from_no_lang_for_page
|
||||
else
|
||||
render_page(params) unless save_from_no_lang_for_page
|
||||
render_page(params.except(:controller, :action, :page_name)) unless save_from_no_lang_for_page
|
||||
end
|
||||
when 'Link'
|
||||
redirect_to(@item[:url]) unless save_from_no_lang_for_page
|
||||
@@ -113,7 +114,7 @@ class PagesController < ApplicationController
|
||||
end
|
||||
|
||||
def check_frontend_open
|
||||
if !Site.first.frontend_closed && current_user.nil? #Need to be change
|
||||
if Site.first.frontend_open && current_user.nil? #Need to be change
|
||||
redirect_to '/admin/dashboards'
|
||||
end
|
||||
end
|
||||
|
||||
+10
-8
@@ -46,15 +46,17 @@ class Item
|
||||
|
||||
def shift_to(new_parent, position)
|
||||
position = position.to_i
|
||||
unless self.parent_id.to_s.eql?(new_parent) && self.position == position
|
||||
new_parent = Item.find(new_parent)
|
||||
current_position_sibling = find_by_parent_and_position(new_parent, position)
|
||||
if current_position_sibling
|
||||
move_above(current_position_sibling)
|
||||
elsif self.parent != new_parent
|
||||
self.parent = new_parent
|
||||
save
|
||||
new_parent = Item.find(new_parent)
|
||||
current_position_sibling = find_by_parent_and_position(new_parent, position)
|
||||
if current_position_sibling
|
||||
if self.position > current_position_sibling.position
|
||||
self.move_above(current_position_sibling)
|
||||
else
|
||||
self.move_below(current_position_sibling)
|
||||
end
|
||||
elsif self.parent != new_parent
|
||||
self.parent = new_parent
|
||||
save
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+4
-2
@@ -12,9 +12,11 @@ class Site
|
||||
field :private_key, :type => Binary
|
||||
field :public_key, :type => Binary
|
||||
|
||||
field :frontend_closed, :type => Boolean, :default => false
|
||||
field :frontend_open, :type => Boolean, :default => true
|
||||
field :backend_openness_on, :type => Boolean, :default => false
|
||||
field :desktop_closed, :type => Boolean, :default => false
|
||||
field :sitemap_menu_in_header, :type => Boolean, :default => false
|
||||
field :enable_terms_of_use, :type => Boolean, :default => false
|
||||
|
||||
field :title_always_on, :type => Boolean, :default => false
|
||||
field :dashbroad_allow_visitor, :type => Boolean, :default => false
|
||||
@@ -34,7 +36,7 @@ class Site
|
||||
field :title, localize: true
|
||||
field :footer, localize: true
|
||||
field :sub_menu, localize: true
|
||||
field :terms_of_user, localize: true
|
||||
field :terms_of_use, localize: true
|
||||
field :google_analytics
|
||||
field :default_locale
|
||||
|
||||
|
||||
@@ -5,6 +5,6 @@ $("#tags_index").html("<%= j render 'index' %>")
|
||||
$.pageslide.close();
|
||||
openSlide();
|
||||
$('.card').cardCheck({
|
||||
check: $('.card input[type="checkbox"]'),
|
||||
item: $('.card input[type="checkbox"]'),
|
||||
});
|
||||
checkedLength()
|
||||
@@ -7,6 +7,7 @@
|
||||
<%= f.hidden_field :public_r_tag_object_id, :value => @part.page.id %>
|
||||
<%#= f.select :public_r_tag_object_id, options_for_select([t(:horizontal), t(:vertical)], t(:horizontal)) %>
|
||||
<% elsif @r_tag.eql?('sitemap') %>
|
||||
<% elsif @r_tag.eql?('terms_of_use') %>
|
||||
<% elsif @r_tag.eql?('breadcrumb') %>
|
||||
<% else %>
|
||||
<%= f.select :public_r_tag_object_id, options_from_collection_for_select(@tag_objects, :id, :title, :selected => @part.public_r_tag_object_id) %>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<li>
|
||||
<li class="map-block <%= 'disabled' if !sitemap_block.show_in_sitemap_for(temp_locale) %>">
|
||||
<h6>
|
||||
<input type="checkbox" class="toggle-check" data-deploy="right">
|
||||
<input type="checkbox" id="<%= sitemap_block.id %>" class="toggle-check onoff" temp_locale="<%= temp_locale %>" data-deploy="right">
|
||||
<span><%= sitemap_block_counter + 1 %> <%= sitemap_block.title_translations[temp_locale] %></span>
|
||||
</h6>
|
||||
<ul>
|
||||
<% sitemap_block.children.each_with_index do |child, i| %>
|
||||
<li "<%= 'disabled' if !child.show_in_sitemap_for(temp_locale) %>">
|
||||
<li "clear <%= 'disabled' if !child.show_in_sitemap_for(temp_locale) %>">
|
||||
<h6>
|
||||
<input type="checkbox" class="toggle-check" data-deploy="right">
|
||||
<input type="checkbox" id="<%= child.id %>" class="toggle-check onoff" temp_locale="<%= temp_locale %>" data-deploy="right">
|
||||
<span><%= "#{sitemap_block_counter + 1}-#{i + 1}" %> <%= child.title_translations[temp_locale] %></span>
|
||||
</h6>
|
||||
</li>
|
||||
|
||||
@@ -20,8 +20,7 @@
|
||||
|
||||
<!-- Input Area -->
|
||||
<div class="input-area">
|
||||
|
||||
<div class="nav-name"><strong>Classification</strong></div>
|
||||
<div class="nav-name"><strong>Classification</strong></div>
|
||||
<ul class="nav nav-pills language-nav">
|
||||
<li class="active">
|
||||
<a href="#sidebar-nav" data-toggle="tab">Sidebar Nav</a>
|
||||
@@ -114,10 +113,10 @@
|
||||
<!-- Openness -->
|
||||
<div id="openness" class="tab-pane fade">
|
||||
<div class="control-group">
|
||||
<label class="control-label muted"><%= I18n.t('site.frontend_closed')%></label>
|
||||
<label class="control-label muted"><%= I18n.t('site.frontend_open')%></label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :frontend_closed , :class=>"toggle-check"%>
|
||||
<span class="help-block">Only can be viewed by users logged in</span>
|
||||
<%= f.check_box :frontend_open , :class=>"toggle-check"%>
|
||||
<span class="help-block">If Checked, the frontend will be open for all users.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
@@ -191,7 +190,7 @@
|
||||
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Cancel</a>
|
||||
<div class="controls" data-toggle="buttons-checkbox">
|
||||
<label class="checkbox inline btn btn-danger fileupload-remove">
|
||||
<% if @site.default_image.file %>
|
||||
<% if @site.default_image.file.present? %>
|
||||
<label class="checkbox">
|
||||
<%= check_box_tag 'site[remove_default_image]' %>
|
||||
<%= t(:delete_) %>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
<!-- Always shoe in the title bar -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Always show in the title bar
|
||||
<label class="control-label muted"><%= t :always_display_title %>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :title_always_on, :class => "toggle-check" %>
|
||||
@@ -70,12 +70,28 @@
|
||||
<%end%>
|
||||
<%end%>
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- CKeditor Site Footer -->
|
||||
<% @site_valid_locales.each do |locale|%>
|
||||
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
|
||||
<label class="control-label muted"><%= t('site.footer')%></label>
|
||||
<div class="controls">
|
||||
<div class="textarea">
|
||||
<%= f.fields_for :footer_translations do |f| %>
|
||||
<%= f.text_area locale, :class => "ckeditor input-block-level", :value => (@site.footer_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%end%>
|
||||
<%end%>
|
||||
|
||||
<!-- Sitemap menu in Header -->
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Sitemap menu in header
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input type="checkbox" class="toggle-check" data-disabled="true">
|
||||
<%= f.check_box :sitemap_menu_in_header, :class => "toggle-check" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -86,27 +102,25 @@
|
||||
<label class="control-label muted">Terms of Use
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input type="checkbox" class="toggle-check terms" data-disabled="true" checked="checked">
|
||||
<%= f.check_box :enable_terms_of_use, :class => "toggle-check" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CKeditor Default Terms of Use -->
|
||||
<div class="control-group input-content hide">
|
||||
<!-- CKeditor Site Footer -->
|
||||
<% @site_valid_locales.each do |locale|%>
|
||||
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
|
||||
<label class="control-label muted">Default Terms of Use</label>
|
||||
<label class="control-label muted"><%= t('site.default_terms_of_use')%></label>
|
||||
<div class="controls">
|
||||
<div class="textarea">
|
||||
<%= f.fields_for :terms_of_user_translations do |f| %>
|
||||
<%= f.text_area locale, :class => "ckeditor input-block-level", :value => (@site.terms_of_user_translations[locale] rescue nil) %>
|
||||
<%= f.fields_for :terms_of_use_translations do |f| %>
|
||||
<%= f.text_area locale, :class => "ckeditor input-block-level", :value => (@site.terms_of_use_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%end%>
|
||||
</div>
|
||||
<%end%>
|
||||
<%end%>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- Form Actions -->
|
||||
<div class="form-actions">
|
||||
<%= f.submit t("submit"), :class => "btn btn-primary" %>
|
||||
|
||||
@@ -12,28 +12,67 @@
|
||||
<% content_for :side_bar do %>
|
||||
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %>
|
||||
<% end %>
|
||||
|
||||
<section>
|
||||
<h3>Sitemap</h3>
|
||||
<div>
|
||||
|
||||
<div id="sitemap">
|
||||
|
||||
<ul id="map-tree-language" class="nav nav-pills">
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<li <%= ( i == 0 ) ? " class=active" : '' %>><a data-toggle="tab" href="#<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% @site_valid_locales.each_with_index do |locale, i| %>
|
||||
<li <%= ( i == 0 ) ? "class=active" : '' %>>
|
||||
<a data-toggle="tab" href="#<%= locale %>">
|
||||
<%= I18nVariable.from_locale(locale) %>
|
||||
</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content map-tree-content">
|
||||
<div class="line"></div>
|
||||
|
||||
<% @site_valid_locales.each_with_index do |temp_locale, i| %>
|
||||
<ul id="<%= temp_locale %>" class="map-tree tab-pane fade in active">
|
||||
<ul id="<%= temp_locale %>" class="map-tree tab-pane fade in <%= ( i == 0 ) ? "in active" : '' %>">
|
||||
<%= render :partial => 'sitemap_block', :collection => @items, :locals => {:temp_locale => temp_locale} %>
|
||||
</ul>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('.site-map').masonry({
|
||||
itemSelector: '.map-block',
|
||||
columnWidth: 260
|
||||
});
|
||||
$('a[data-toggle="tab"]').on('shown', function (e) {
|
||||
$('.site-map').masonry({
|
||||
itemSelector: '.map-block',
|
||||
columnWidth: 260
|
||||
});
|
||||
})
|
||||
});
|
||||
$(document).on('click', 'li .onoff', function () {
|
||||
$(this).parents("li").toggleClass("disabled");
|
||||
if($(this).parents("li").attr("class").indexOf("disabled") > 0){
|
||||
$(this).text("<%= t('off_upcase') %>")
|
||||
} else {
|
||||
$(this).text("<%= t('on_upcase') %>")
|
||||
}
|
||||
$.getScript('<%= admin_sites_path %>' + '/' + $(this).attr('id') + '/sitemap_toggle?temp_locale=' + $(this).attr('temp_locale'));
|
||||
});
|
||||
$(document).on('click', 'h6 .onoff', function () {
|
||||
$(this).parents(".map-block").toggleClass("disabled");
|
||||
if($(this).parents("h6").parents("li").attr("class").indexOf("disabled") > 0){
|
||||
$(this).text("<%= t('off_upcase') %>")
|
||||
$(this).parents(".map-block").find('li').addClass('disabled')
|
||||
$(this).parents(".map-block").find('checkbox').text("<%= t('off_upcase') %>")
|
||||
// $(this).parents(".map-block").find('li checkbox').attr('disabled', 'disabled')
|
||||
} else {
|
||||
$(this).text("<%= t('on_upcase') %>")
|
||||
$(this).parents(".map-block").find('li').removeClass('disabled')
|
||||
$(this).parents(".map-block").find('checkbox').text("<%= t('on_upcase') %>")
|
||||
// $(this).parents(".map-block").find('li checkbox').removeAttr("disabled")
|
||||
}
|
||||
$.getScript('<%= admin_sites_path %>' + '/' + $(this).attr('id') + '/sitemap_toggle?parent=true&temp_locale=' + $(this).attr('temp_locale'));
|
||||
});
|
||||
</script>
|
||||
<% end %>
|
||||
@@ -4,6 +4,6 @@ $("#tags_index").html("<%= j render 'index' %>")
|
||||
$.pageslide.close();
|
||||
openSlide();
|
||||
$('.card').cardCheck({
|
||||
check: $('.card input[type="checkbox"]'),
|
||||
item: $('.card input[type="checkbox"]'),
|
||||
});
|
||||
checkedLength()
|
||||
@@ -1,8 +1,9 @@
|
||||
<%= render :partial => 'shared/search_header',:locals=>{:items=>@data} %>
|
||||
|
||||
<%= render @partial %>
|
||||
<% if @paginate and !@data.blank? %>
|
||||
<%= paginate @data, :param_name => :page_main, :params => {:same_page_id => @page_id} %>
|
||||
<% elsif @page_part.module_app %>
|
||||
<%= @page_part.module_app.get_registration.default_widget_setting.link_to_more_tag(request,params) %>
|
||||
<% if @data.present? %>
|
||||
<%= render :partial => 'shared/search_header',:locals=>{:items=>@data} %>
|
||||
<%= render @partial %>
|
||||
<% if @paginate %>
|
||||
<%= paginate @data, :param_name => :page_main, :params => {:same_page_id => @page_id} %>
|
||||
<% elsif @page_part.module_app %>
|
||||
<%= @page_part.module_app.get_registration.default_widget_setting.link_to_more_tag(request,params) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
File renamed without changes.
@@ -2,9 +2,9 @@
|
||||
<div id="side">
|
||||
<div id="rwidget" class="wh2 thmc4">
|
||||
<ul class="docklist">
|
||||
<li class="d_cate"><a callback-method='initializeDesktop' href="desktop/desktop" class="widget_fn wh2 hh2" id='home' onclick="return false;"><span class="widget_icon"><img src="" alt="Home" id="home_icon" width="30" height="30"/></span></a>
|
||||
<li class="d_cate"><a callback-method='initializeDesktop' href="desktop/desktop_container" class="widget_fn wh2 hh2" id='home' onclick="return false;" sub-menu="false"><span class="widget_icon"><img src="" alt="Home" id="home_icon" width="30" height="30"/></span></a>
|
||||
<ul class="dock_child hh2 thmc4" style="width: 120px;">
|
||||
<li class="dock_item"><a callback-method='initializeAppManager' href="<%= desktop_app_manager_path %>" class="widget_fn wh2 hh2" id="d_app_manager" onclick="return false;"><span class="widget_icon"><img src="" alt="App Manager" id="app_manager_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='initializeAppManager' href="<%= desktop_app_manager_path %>" class="widget_fn wh2 hh2" id="d_app_manager" onclick="return false;" sub-menu="false"><span class="widget_icon"><img src="" alt="App Manager" id="app_manager_icon" width="30" height="30"/></span></a></li>
|
||||
<li class="dock_item"><a callback-method='initializeSettings' href="<%= desktop_settings_path %>" custom-load="settings" class="widget_fn wh2 hh2" id="d_settings" onclick="return false;"><span class="widget_icon"><img src="" alt="Settings" id="settings_icon" width="30" height="30"/></span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -92,10 +92,22 @@
|
||||
orbitDesktop.prototype.sectionId = "<%= @section.id %>";
|
||||
orbitDesktop.prototype.currentLanguage = "<%= I18n.locale %>";
|
||||
orbitDesktop.prototype.currentUsername = "<%= @currentusername %>";
|
||||
//uselessfunction();
|
||||
var od = new orbitDesktop("#ajax_container");
|
||||
if($.browser.msie){
|
||||
if($.browser.version < 9){
|
||||
var getInternetExplorerVersion = function(){
|
||||
var rv = -1; // Return value assumes failure.
|
||||
if (navigator.appName == 'Microsoft Internet Explorer')
|
||||
{
|
||||
var ua = navigator.userAgent;
|
||||
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
|
||||
if (re.exec(ua) != null)
|
||||
rv = parseFloat( RegExp.$1 );
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
var version = getInternetExplorerVersion();
|
||||
if( version != -1){
|
||||
if(version < 9){
|
||||
$.fx.off = true;
|
||||
o.notify("We turn off the animation (javascript) for you, but still you can turn it on",10);
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<%= @terms.html_safe %>
|
||||
@@ -27,4 +27,20 @@
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</ul>
|
||||
<% @url_path = "#{request.fullpath}".scan(/admin/)%>
|
||||
<% if (@site.default_image.present? && (!@url_path.include? "admin"))%>
|
||||
<style>
|
||||
#orbit-bar .orbitlogo {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-size: 70%;
|
||||
display: inline-block;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-image: url(<%= @site.default_image %>);
|
||||
/* For Suck IE */
|
||||
background-image: url(<%= @site.default_image%>)\9;
|
||||
}
|
||||
</style>
|
||||
<% end %>
|
||||
@@ -44,6 +44,7 @@ public_r_tags:
|
||||
- sitemap
|
||||
- breadcrumb
|
||||
- tag_cloud
|
||||
- terms_of_use
|
||||
|
||||
page_part_kinds:
|
||||
- text
|
||||
|
||||
@@ -390,6 +390,7 @@ en:
|
||||
footer: Site footer
|
||||
footer_help: Footer Guide
|
||||
frontend_closed: Frontend Closed
|
||||
frontend_open: Frontend Open
|
||||
header: Site header
|
||||
info: Site information
|
||||
keywords: Site keywords
|
||||
|
||||
@@ -2,6 +2,7 @@ en:
|
||||
add_category: Add category
|
||||
add_link: Add link
|
||||
add_page: Add page
|
||||
add_tags: Add Tags
|
||||
add_to_default: Add to default
|
||||
alternative: Alternative
|
||||
approval_setting: Approval Setting
|
||||
@@ -70,4 +71,5 @@ en:
|
||||
error:
|
||||
tag: Error when updating category
|
||||
tag: Error when updating tag
|
||||
url_alt: Alternative text
|
||||
url_alt: Alternative text
|
||||
use_default: Use Default
|
||||
@@ -2,6 +2,7 @@ zh_tw:
|
||||
add_category: 新增類別
|
||||
add_link: 新增連結
|
||||
add_page: 新增頁面
|
||||
add_tags: Add Tags
|
||||
add_to_default: 加入預設
|
||||
alternative: 註解
|
||||
approval_setting: 審核設定
|
||||
@@ -71,3 +72,4 @@ zh_tw:
|
||||
tag: 更新類別時發生錯誤
|
||||
tag: 更新標籤時發生錯誤
|
||||
url_alt: 註解
|
||||
use_default: Use Default
|
||||
@@ -385,6 +385,7 @@ zh_tw:
|
||||
thumbnail: 縮圖
|
||||
site:
|
||||
frontend_closed: 前台關閉?
|
||||
frontend_open: 前台關閉 ?
|
||||
backend_openness_on: 開啟開放式後台(訪客可遊覽)
|
||||
default_image: 預設圖像
|
||||
description: 網站描述
|
||||
|
||||
+2
-2
@@ -273,7 +273,7 @@ Orbit::Application.routes.draw do
|
||||
|
||||
match "/desktop/compatibility" => "desktop#compatibility"
|
||||
match "desktop" => "desktop#index"
|
||||
match "/desktop/desktop" => "desktop#desktop"
|
||||
match "/desktop/desktop_container" => "desktop#desktop_container"
|
||||
match '/desktop/appactivation'=>'desktop#appactivation'
|
||||
match '/desktop/app_manager'=>'desktop#app_manager'
|
||||
match '/desktop/allsections'=>'desktop#allsections'
|
||||
@@ -328,7 +328,7 @@ Orbit::Application.routes.draw do
|
||||
end
|
||||
end
|
||||
|
||||
controller_paths :front, %w[show_breadcrumb show_banner show_footer show_menu show_page_sub_menu show_site_sub_menu show_sitemap show_tag_cloud]
|
||||
controller_paths :front, %w[show_breadcrumb show_banner show_footer show_menu show_page_sub_menu show_site_sub_menu show_sitemap show_tag_cloud show_terms_of_use]
|
||||
# controller_paths :mobile, %w[index announcement announcement_content dialog_contact dialog_copyright dialog_language map page page_content]
|
||||
|
||||
# scope 'app' do
|
||||
|
||||
+41
-27
@@ -197,37 +197,48 @@ module OrbitCoreLib
|
||||
end
|
||||
end
|
||||
|
||||
def skip_authorization(arg = nil)
|
||||
if arg
|
||||
key = arg.shift
|
||||
prepend_before_filter key[0] => key[1] {|f| f.no_authorization}
|
||||
else
|
||||
prepend_before_filter {|f| f.no_authorization}
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
module InstanceMethods
|
||||
protected
|
||||
def can_use
|
||||
setup_vars
|
||||
set_current_user
|
||||
if @user_type
|
||||
@user_type.each do |user_type|
|
||||
open = false
|
||||
visitor = false
|
||||
case user_type
|
||||
when :admin
|
||||
open ||= check_admin
|
||||
when :manager
|
||||
open ||= check_manager
|
||||
when :sub_manager
|
||||
open ||= check_sub_manager
|
||||
when :approver
|
||||
open ||= check_sub_manager
|
||||
when :visitor
|
||||
open ||= true
|
||||
visitor ||= true
|
||||
unless @no_authorization
|
||||
if @user_type
|
||||
@user_type.each do |user_type|
|
||||
open = false
|
||||
visitor = false
|
||||
case user_type
|
||||
when :admin
|
||||
open ||= check_admin
|
||||
when :manager
|
||||
open ||= check_manager
|
||||
when :sub_manager
|
||||
open ||= check_sub_manager
|
||||
when :approver
|
||||
open ||= check_sub_manager
|
||||
when :visitor
|
||||
set_current_user
|
||||
open ||= true
|
||||
visitor ||= true
|
||||
end
|
||||
check_backend_openness if visitor
|
||||
authenticate_user! unless visitor
|
||||
redirect_to root_url unless open
|
||||
end
|
||||
check_backend_openness if visitor
|
||||
authenticate_user! unless visitor
|
||||
redirect_to root_url unless open
|
||||
else
|
||||
authenticate_user!
|
||||
check_user_can_use
|
||||
end
|
||||
else
|
||||
authenticate_user!
|
||||
check_user_can_use
|
||||
end
|
||||
end
|
||||
|
||||
@@ -248,10 +259,14 @@ module OrbitCoreLib
|
||||
end
|
||||
|
||||
def open_for(var)
|
||||
@user_type ||= []
|
||||
@user_type ||= []
|
||||
@user_type << var
|
||||
end
|
||||
|
||||
def no_authorization
|
||||
@no_authorization = true
|
||||
end
|
||||
|
||||
def check_user_can_use
|
||||
unless current_or_guest_user.admin? || @module_app.is_manager?(current_or_guest_user) || @module_app.is_sub_manager?(current_or_guest_user) || @module_app.can_approve?(current_or_guest_user)
|
||||
redirect_to root_url
|
||||
@@ -259,9 +274,8 @@ module OrbitCoreLib
|
||||
end
|
||||
|
||||
def setup_vars
|
||||
@app_title ||= controller_path.split('/')[1].singularize
|
||||
@module_app ||= ModuleApp.first(conditions: {:key => @app_title} )
|
||||
# raise ModuleAppError, 'Can not find ModuleApp' if @module_app.nil?
|
||||
@app_title ||= controller_path.split('/')[1].singularize rescue nil
|
||||
@module_app ||= ModuleApp.first(conditions: {:key => @app_title} ) rescue nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -125,6 +125,7 @@ module ParserCommon
|
||||
def parse_sub_menus_edit(body = nil, page = nil, edit=nil)
|
||||
body.css('sub_menu').each do |sub_menu|
|
||||
menu_page = Page.find(sub_menu['id']) rescue nil
|
||||
|
||||
res = ''
|
||||
if menu_page && menu_page.visible_children.size > 0
|
||||
res << "<div class='category_list'>"
|
||||
@@ -245,6 +246,15 @@ module ParserCommon
|
||||
sitemap.swap(fragment)
|
||||
end
|
||||
|
||||
# terms_of_use
|
||||
def parse_terms_of_uses_edit(body = nil, page = nil, edit=nil)
|
||||
terms_of_use = body.css('terms_of_use').first
|
||||
url = front_show_terms_of_use_path
|
||||
options = "?inner=true"
|
||||
fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load' path='#{url + options}'></div>")
|
||||
terms_of_use.swap(fragment)
|
||||
end
|
||||
|
||||
# page_contents
|
||||
def parse_contents_edit(body, page, edit=nil)
|
||||
public_r_tags = []
|
||||
@@ -286,8 +296,8 @@ module ParserCommon
|
||||
when 'default_widget'
|
||||
"/panel/orbit_app/widget/#{part.widget_style}?inner=true"
|
||||
else
|
||||
raise ModuleAppError,"PagePart can't find ModuleApp" if part.module_app.nil?
|
||||
"/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true"
|
||||
# raise ModuleAppError,"PagePart can't find ModuleApp" if part.module_app.nil?
|
||||
"/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true" rescue ''
|
||||
end
|
||||
|
||||
categories_str=(!part[:category].blank? ? part[:category] : category).collect{|t| "category_id[]=#{t}"}.join('&')
|
||||
|
||||
@@ -222,4 +222,9 @@ module ParserFrontEnd
|
||||
def generate_tag_clouds(*args)
|
||||
"<div class='dymanic_load' path='#{front_show_tag_cloud_path(args[0])}'></div>"
|
||||
end
|
||||
|
||||
# tag_cloud
|
||||
def generate_terms_of_uses(*args)
|
||||
"<div class='dymanic_load' path='#{front_show_terms_of_use_path}'></div>"
|
||||
end
|
||||
end
|
||||
+2
-2
@@ -71,11 +71,11 @@ module Panel::PersonalBook::Desktop::PersonalBooksHelper
|
||||
def link_publication_file publication
|
||||
publication.writing_book_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"),
|
||||
content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank",
|
||||
"title" => file.title_translations[I18n.locale.to_s])
|
||||
"title" => (file.title_translations[I18n.locale.to_s] rescue nil))
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
|
||||
@@ -83,13 +83,14 @@ class WritingBook
|
||||
end
|
||||
|
||||
def create_link
|
||||
|
||||
title = ["\"#{self.extracted_chapters}\""]
|
||||
title << self.book_title
|
||||
title << self.publisher
|
||||
title << self.pages
|
||||
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
|
||||
title.join(', ')
|
||||
title = []
|
||||
# title = ["#{self.extracted_chapters}"] if self.extracted_chapters.present?
|
||||
title << self.paper_title if self.paper_title.present?
|
||||
title << self.book_title if self.book_title.present?
|
||||
title << self.publisher if self.publisher.present?
|
||||
title << self.pages if self.pages.present?
|
||||
# title << "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})"
|
||||
title.join(', ')
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
+2
-2
@@ -71,11 +71,11 @@ module Panel::PersonalConference::Desktop::ConferencePagesHelper
|
||||
def link_publication_file publication
|
||||
publication.writing_conference_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"),
|
||||
content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank",
|
||||
"title" => file.title_translations[I18n.locale.to_s])
|
||||
"title" => (file.title_translations[I18n.locale.to_s] rescue nil))
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
|
||||
+6
-8
@@ -84,15 +84,13 @@ class WritingConference
|
||||
end
|
||||
|
||||
def create_link
|
||||
|
||||
title = ["\"#{self.paper_title}\""]
|
||||
title << self.conference_title
|
||||
title << self.sponsor
|
||||
title << self.location
|
||||
title << "#{period_start_date}-#{period_end_date}"
|
||||
title = ["#{self.paper_title}"]
|
||||
title << self.conference_title if self.conference_title.present?
|
||||
title << self.sponsor if self.sponsor.present?
|
||||
title << self.location if self.location.present?
|
||||
title << "#{period_start_date}-#{period_end_date}" if (self.period_start_date.present? && self.period_end_date.present?)
|
||||
# title << "(#{self.conference_paper_types.collect{|x| x.title}.join(', ')})"
|
||||
title.join(', ')
|
||||
|
||||
title.join(', ')
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
+2
-2
@@ -71,11 +71,11 @@ module Panel::PersonalDiploma::Desktop::PersonalDiplomasHelper
|
||||
def link_publication_file publication
|
||||
publication.writing_conference_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"),
|
||||
content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank",
|
||||
"title" => file.title_translations[I18n.locale.to_s])
|
||||
"title" => (file.title_translations[I18n.locale.to_s] rescue nil))
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
|
||||
+2
-2
@@ -71,11 +71,11 @@ module Panel::PersonalExperience::Desktop::PersonalExperiencesHelper
|
||||
def link_publication_file publication
|
||||
publication.writing_conference_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"),
|
||||
content_tag(:span, file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank",
|
||||
"title" => file.title_translations[I18n.locale.to_s])
|
||||
"title" => file.title_translations[I18n.locale.to_s] rescue nil))
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
|
||||
+2
-2
@@ -64,11 +64,11 @@ module Panel::PersonalHonor::Desktop::PersonalHonorsHelper
|
||||
def link_publication_file publication
|
||||
publication.writing_book_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"),
|
||||
content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank",
|
||||
"title" => file.title_translations[I18n.locale.to_s])
|
||||
"title" => (file.title_translations[I18n.locale.to_s] rescue nil))
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
|
||||
+4
-2
@@ -1,5 +1,6 @@
|
||||
module Panel::PersonalJournal::Desktop::JournalPagesHelper
|
||||
def publication_record publication, view
|
||||
|
||||
content_tag :li,
|
||||
"item" => "true",
|
||||
"data-id" => publication.id.to_s,
|
||||
@@ -88,12 +89,13 @@ module Panel::PersonalJournal::Desktop::JournalPagesHelper
|
||||
|
||||
def link_publication_file publication
|
||||
publication.writing_journal_files.map{|file|
|
||||
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"),
|
||||
content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank",
|
||||
"title" => file.title_translations[I18n.locale.to_s])
|
||||
"title" => (file.title_translations[I18n.locale.to_s] rescue nil))
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
|
||||
@@ -90,11 +90,13 @@ class WritingJournal
|
||||
end
|
||||
|
||||
def create_link
|
||||
title = ["\"#{self.paper_title}\""]
|
||||
title << self.journal_title
|
||||
title.join(', ')
|
||||
title = ["#{self.paper_title}"]
|
||||
title << self.journal_title if self.journal_title.present?
|
||||
title << ( !self.journal_level_types.blank? ? "(#{self.journal_level_types.collect{|x| x.title}.join(', ')})" : nil)
|
||||
title.join(', ')
|
||||
title << "Volume No: "+self.vol_no if (self.vol_no.present? && self.vol_no != "0")
|
||||
title << "From Page: "+self.form_to_start if (self.form_to_start.present? && self.form_to_start != "0")
|
||||
title << "To Page: "+self.form_to_end if (self.form_to_end.present? && self.form_to_end != "0")
|
||||
title.join(', ')
|
||||
end
|
||||
|
||||
def new_writing_journal_files=(var)
|
||||
|
||||
Vendored
+2
-2
@@ -71,11 +71,11 @@ module Panel::PersonalLab::Desktop::PersonalLabsHelper
|
||||
def link_publication_file publication
|
||||
publication.lab_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"),
|
||||
content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank",
|
||||
"title" => file.title_translations[I18n.locale.to_s])
|
||||
"title" => (file.title_translations[I18n.locale.to_s] rescue nil))
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
|
||||
+2
-2
@@ -71,11 +71,11 @@ module Panel::PersonalPatent::Desktop::PersonalPatentsHelper
|
||||
def link_publication_file publication
|
||||
publication.writing_patent_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"),
|
||||
content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank",
|
||||
"title" => file.title_translations[I18n.locale.to_s])
|
||||
"title" => (file.title_translations[I18n.locale.to_s] rescue nil))
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
|
||||
+2
-2
@@ -72,11 +72,11 @@ module Panel::PersonalProject::Desktop::PersonalProjectsHelper
|
||||
def link_publication_file publication
|
||||
publication.project_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"),
|
||||
content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank",
|
||||
"title" => file.title_translations[I18n.locale.to_s])
|
||||
"title" => (file.title_translations[I18n.locale.to_s] rescue nil))
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
|
||||
+2
-2
@@ -72,11 +72,11 @@ module Panel::PersonalResearch::Desktop::PersonalResearchsHelper
|
||||
def link_publication_file publication
|
||||
publication.research_files.map{|file|
|
||||
link_to(image_tag(check_file_type(file.file.url)) + \
|
||||
content_tag(:span, file.title_translations[I18n.locale.to_s], :class => "filetitle"),
|
||||
content_tag(:span, (file.title_translations[I18n.locale.to_s] rescue nil), :class => "filetitle"),
|
||||
file.file.url,
|
||||
:class => "file",
|
||||
"target" => "_blank",
|
||||
"title" => file.title_translations[I18n.locale.to_s])
|
||||
"title" => (file.title_translations[I18n.locale.to_s] rescue nil))
|
||||
}.inject(:+)
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user