Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
498d57ee5e | ||
|
|
df5cda7a98 | ||
|
|
fbea249782 | ||
|
|
279ac774d4 | ||
|
|
11b880752d | ||
|
|
76ba7087b2 | ||
|
|
b9fbba2962 |
No files matched your search
@@ -11,13 +11,14 @@ 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'
|
||||
gem "acts_as_unvlogable"
|
||||
gem 'youtube_it'
|
||||
gem 'gotcha'
|
||||
|
||||
# gem "memcached", "~> 1.4.3"
|
||||
# gem "memcache-client"
|
||||
|
||||
@@ -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'){
|
||||
|
||||
@@ -1,30 +1,58 @@
|
||||
var banners = [];
|
||||
var banner_index = 0;
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$.each($(".dymanic_load"),function(){
|
||||
if($(this).attr("path")==''){$(this).html("App setting Failed");}
|
||||
|
||||
if($(this).attr("path")!=''){
|
||||
ajax_load_proc($(this),$(this).attr("path"));
|
||||
}
|
||||
if($(this).attr("path")==''){
|
||||
$(this).html("App setting Failed");
|
||||
}else{
|
||||
// Check if this App is AD_Banner
|
||||
if($(this).attr("path").indexOf("show_banner")>0){
|
||||
ajax_load_proc($(this),$(this).attr("path"),"true");
|
||||
}else{
|
||||
ajax_load_proc($(this),$(this).attr("path"),$(this).attr("path"));
|
||||
}
|
||||
);
|
||||
$("#main_content").addClass("module");
|
||||
}
|
||||
});
|
||||
|
||||
function ajax_load_proc(wapper,url){
|
||||
$("#main_content").addClass("module");
|
||||
});
|
||||
|
||||
function ajax_load_proc(wapper,url,isBanner){
|
||||
$.get(encodeURI(url), {}, function(respText,textSta,XML){
|
||||
if (textSta == 'success') {
|
||||
wapper.html(respText);
|
||||
};
|
||||
if(textSta == 'error')
|
||||
wapper.html("Loading Failed<br/> <a href='"+$(this).attr('path')+"'>Go See</a>");
|
||||
if (textSta == 'success') {
|
||||
if(isBanner=="true"){
|
||||
wapper.html(respText);
|
||||
var banner = banners[banner_index];
|
||||
$(banner.banner_name+" > img").each(function(){
|
||||
$(this).load(function(){ banner.image_loaded++; });
|
||||
});
|
||||
BannerCycle(banner_index);
|
||||
banner_index++;
|
||||
}else{
|
||||
wapper.html(respText);
|
||||
}
|
||||
};
|
||||
if(textSta == 'error')
|
||||
wapper.html("Loading Failed<br/> <a href='"+$(this).attr('path')+"'>Go See</a>");
|
||||
});
|
||||
}
|
||||
|
||||
// Ad Banner FX code [start]
|
||||
function getTimeout() {
|
||||
return $(this).attr('time_to_next');
|
||||
}
|
||||
function BannerCycle(banner_index){
|
||||
var banner = banners[banner_index];
|
||||
// Wait untill all images are loaded
|
||||
if (banner.image_loaded==$(banner.banner_name+" img").length){
|
||||
$(banner.banner_name).cycle({
|
||||
delay: -1000,
|
||||
fx: banner.banner_fx,
|
||||
timeout: banner.time_to_next,
|
||||
pager: banner.banner_pager,
|
||||
pagerAnchorBuilder: function(idx, slide) { return "<li><a href='#'></a></li>"; }
|
||||
});
|
||||
}else{
|
||||
setTimeout("BannerCycle("+banner_index+")",500);
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).on('click', '.slideshow img', function()
|
||||
|
||||
@@ -40,6 +40,7 @@ class Admin::AdBannersController < OrbitBackendController
|
||||
|
||||
def edit
|
||||
@ad_banner = AdBanner.find(params[:id])
|
||||
render layout: false
|
||||
end
|
||||
|
||||
def update
|
||||
|
||||
@@ -34,38 +34,30 @@ class Admin::AuthorizationsController < OrbitBackendController
|
||||
end
|
||||
|
||||
def add_roles
|
||||
roles = Role.find(params[:role_ids]) rescue []
|
||||
users = []
|
||||
roles.each do |role|
|
||||
users += role.users.all.entries
|
||||
end
|
||||
unless roles.blank?
|
||||
roles = Role.find(params[:role_ids]) rescue nil
|
||||
unless roles.nil?
|
||||
authorization = get_or_create_authorization
|
||||
add_roles_to_auth(authorization, roles) unless @error
|
||||
add_roles_to_auth(authorization, roles)
|
||||
end
|
||||
@users = authorization.authorized_users
|
||||
render 'admin/authorizations/reload_users'
|
||||
end
|
||||
|
||||
def add_sub_roles
|
||||
sub_roles = SubRole.find(params[:sub_role_ids]) rescue []
|
||||
users = []
|
||||
sub_roles.each do |sub_role|
|
||||
users += sub_role.users.all.entries
|
||||
end
|
||||
unless sub_roles.blank?
|
||||
sub_roles = SubRole.find(params[:sub_role_ids]) rescue nil
|
||||
unless sub_roles.nil?
|
||||
authorization = get_or_create_authorization
|
||||
add_sub_roles_to_auth(authorization, sub_roles) unless @error
|
||||
add_sub_roles_to_auth(authorization, sub_roles)
|
||||
end
|
||||
@users = authorization.authorized_users
|
||||
render 'admin/authorizations/reload_users'
|
||||
end
|
||||
|
||||
def add_users
|
||||
users = User.find(params[:user_ids]) rescue []
|
||||
unless users.blank?
|
||||
users = User.find(params[:user_ids]) rescue nil
|
||||
unless users.nil?
|
||||
authorization = get_or_create_authorization
|
||||
add_users_to_auth(authorization, users) unless @error
|
||||
add_users_to_auth(authorization, users)
|
||||
end
|
||||
@users = authorization.authorized_users
|
||||
render 'admin/authorizations/reload_users'
|
||||
@@ -120,10 +112,6 @@ class Admin::AuthorizationsController < OrbitBackendController
|
||||
|
||||
protected
|
||||
|
||||
def add_managers_to_auth(users)
|
||||
@module_app.add_managers(users)
|
||||
end
|
||||
|
||||
def add_roles_to_auth(authorization, roles)
|
||||
authorization.add_roles(roles)
|
||||
end
|
||||
@@ -151,7 +139,7 @@ class Admin::AuthorizationsController < OrbitBackendController
|
||||
@error = t(:no_data)
|
||||
end
|
||||
when nil
|
||||
@module_app.auth_manager || @module_app.create_auth_manager(module_app_id: @module_app.id, title: "#{@type}_#{@module_app.key}")
|
||||
@module_app.auth_manager || @module_app.create_auth_manager(module_app_id: @module_app.id, title: @module_app.key)
|
||||
else
|
||||
auth = @object.get_authorization_by_title("#{@type}_#{@module_app.key}")
|
||||
unless auth
|
||||
@@ -162,10 +150,6 @@ class Admin::AuthorizationsController < OrbitBackendController
|
||||
end
|
||||
end
|
||||
|
||||
def remove_managers_from_auth(users)
|
||||
@module_app.remove_manager(users)
|
||||
end
|
||||
|
||||
def remove_roles_form_auth(authorization, roles)
|
||||
authorization.remove_roles(roles)
|
||||
end
|
||||
|
||||
@@ -19,7 +19,7 @@ class DesktopController< ApplicationController
|
||||
render :layout => "compatibility"
|
||||
end
|
||||
|
||||
def desktop
|
||||
def desktop_container
|
||||
render :layout => false
|
||||
end
|
||||
|
||||
|
||||
@@ -199,7 +199,7 @@ module OrbitBackendHelper
|
||||
objects.join(' ')
|
||||
else
|
||||
objects = Array(objects).map do |object|
|
||||
display_value(object.send(field))
|
||||
display_value(object.send(field)) rescue ''
|
||||
end
|
||||
objects.join(', ')
|
||||
end
|
||||
|
||||
@@ -2,8 +2,8 @@ class AdBanner
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
include Mongoid::MultiParameterAttributes
|
||||
include OrbitCoreLib::ObjectAuthable
|
||||
include OrbitTag::Taggable
|
||||
include OrbitModel::Authorizable
|
||||
|
||||
field :title
|
||||
field :transition_msec,type: Integer
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
class AuthManager < Authorization
|
||||
# belongs_to :manager_authorizable, polymorphic: true
|
||||
has_and_belongs_to_many :authorized_users, class_name: 'User', inverse_of: 'managing_apps'
|
||||
end
|
||||
@@ -7,6 +7,7 @@ class ModuleApp
|
||||
field :auth_approval_users, type: Array, default: nil
|
||||
field :auth_manager_users, type: Array, default: nil
|
||||
field :auth_sub_manager_users, type: Array, default: nil
|
||||
field :has_category, type: Boolean, default: false
|
||||
field :key
|
||||
field :title
|
||||
field :sidebar_order,type: Integer,default: 0
|
||||
@@ -189,7 +190,8 @@ class ModuleApp
|
||||
end
|
||||
|
||||
def update_auth_manager_users
|
||||
self.update_attribute(:auth_manager_users, self.auth_manager_authorized_users.map{|user| user.id})
|
||||
users = self.auth_manager_authorized_users
|
||||
self.update_attribute(:auth_manager_users, users.map{|user| user.id}) if users
|
||||
end
|
||||
|
||||
def update_auth_sub_manager_users
|
||||
@@ -207,21 +209,6 @@ class ModuleApp
|
||||
managers.include?(user)
|
||||
end
|
||||
|
||||
def add_managers(users)
|
||||
users = Array(users)
|
||||
if auth_manager = self.auth_manager
|
||||
auth_manager.update_attribute(:authorized_users, (auth_manager.authorized_users + users).uniq)
|
||||
else
|
||||
self.create_auth_manager(authorized_users: users)
|
||||
end
|
||||
end
|
||||
|
||||
def remove_managers(users)
|
||||
users = Array(users)
|
||||
users = users.delete_if{|user| user == current_user || is_admin?}
|
||||
self.auth_manager.update_attribute(:authorized_users, auth_manager.authorized_users - users)
|
||||
end
|
||||
|
||||
def is_manager?(user)
|
||||
if user && !auth_manager_users.blank?
|
||||
auth_manager_users.include?(user.id)
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
# class Tag < ProtoTag
|
||||
# belongs_to :module_app
|
||||
|
||||
# end
|
||||
|
||||
class Tag
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
|
||||
@@ -1,25 +1,31 @@
|
||||
<div class="content">
|
||||
<%= form_for(:ad_banner, :url => admin_ad_banner_path(:ad_banner), :remote => true) do |f| %>
|
||||
<fieldset>
|
||||
<legend>Ad Banner</legend>
|
||||
<label>Banner Name</label>
|
||||
<%= f.text_field :title, :class=>"input-large", :placeholder=>"Banner Name" %>
|
||||
<span class="help-block">Banner Name only english</span>
|
||||
<label for="timeout">Ste</label>
|
||||
<%= f.text_field :transition_sec, :class => 'input-large', :placeholder => 'Time' %>
|
||||
<span class="help-block">Please enter the number of seconds</span>
|
||||
<label>Best Size</label>
|
||||
<%= f.text_field :best_size, :class=>"input-large", :placeholder=>"Banner Size" %>
|
||||
<span class="help-block">Best Size EX:120x30 </span>
|
||||
<label>Effect</label>
|
||||
<%= f.select :ad_fx ,AdBanner::FX_TYPES %>
|
||||
<div class="preview">
|
||||
<%= image_tag "slideshow_preview_A.png", :width=>220 %>
|
||||
<%= image_tag "slideshow_preview_B.png", :width=>220 %>
|
||||
</div>
|
||||
<span class="help-block">Effect</span>
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:create_), class: 'btn btn-primary btn-small' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= form_for @ad_banner, url: admin_ad_banner_path(@ad_banner) do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t("ad_banner.banner") %></legend>
|
||||
<label><%= t("ad_banner.banner_name") %></label>
|
||||
<%= f.text_field :title, :class=>"input-large", :placeholder=>"Banner Name" %>
|
||||
<span class="help-block"><%= t("ad_banner.banner_name_note") %></span>
|
||||
<label for="timeout"><%= t("ad_banner.ste") %></label>
|
||||
<%= f.text_field :transition_sec, :class => 'input-large', :placeholder => 'Time' %>
|
||||
<span class="help-block"><%= t("ad_banner.ste_note") %></span>
|
||||
<label><%= t("ad_banner.best_size") %></label>
|
||||
<%= f.text_field :best_size, :class=>"input-large", :placeholder=>"Banner Size" %>
|
||||
<span class="help-block"><%= t("ad_banner.best_size") %> EX:120x30 </span>
|
||||
<label><%= t("ad_banner.effect") %></label>
|
||||
<%= f.select :ad_fx ,AdBanner::FX_TYPES %>
|
||||
<div class="preview">
|
||||
<%= image_tag "slideshow_preview_A.png", :width=>220 %>
|
||||
<%= image_tag "slideshow_preview_B.png", :width=>220 %>
|
||||
</div>
|
||||
<span class="help-block"><%= t("ad_banner.effect") %></span>
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:update_), class: 'btn btn-primary btn-small' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
<script type="text/javascript">
|
||||
$('select').on('change', function() {
|
||||
$(".preview").cycle({
|
||||
delay: -3000,
|
||||
fx: $(this).val()
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -1,3 +1,5 @@
|
||||
<%= javascript_include_tag "lib/jquery.cycle.all.latest.js"%>
|
||||
|
||||
<table class="table main-list">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -13,7 +15,7 @@
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills">
|
||||
<% if is_admin?%>
|
||||
<li><%= link_to t(:edit), edit_admin_ad_banner_path(ad_banner)%></li>
|
||||
<li><%= link_to t(:edit), edit_admin_ad_banner_path(ad_banner), :class => "open-slide" %></li>
|
||||
<li><%= link_to 'Destroy', admin_ad_banner_path(ad_banner), method: :delete , :confirm => t(:sure?) %></li>
|
||||
|
||||
<% end %>
|
||||
@@ -30,12 +32,8 @@
|
||||
<!-- footer -->
|
||||
<div class="bottomnav clearfix">
|
||||
<div class="action pull-right">
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add_new), "#add-banner", :class => "btn btn-primary open-slide"%>
|
||||
<%= link_to content_tag(:i, nil, class: "icons-plus") + " " + t(:add_new), new_admin_ad_banner_path, :class => "btn btn-primary open-slide"%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="add-banner" class="nano" style="display:none">
|
||||
<%= render 'new' %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
@@ -1,25 +1,31 @@
|
||||
<div class="content">
|
||||
<%= form_for(:ad_banner, :url => admin_ad_banners_path) do |f| %>
|
||||
<fieldset>
|
||||
<legend>Ad Banner</legend>
|
||||
<label>Banner Name</label>
|
||||
<%= f.text_field :title, :class=>"input-large", :placeholder=>"Banner Name" %>
|
||||
<span class="help-block">Banner Name only english</span>
|
||||
<label for="timeout">Ste</label>
|
||||
<%= f.text_field :transition_sec, :class => 'input-large', :placeholder => 'Time' %>
|
||||
<span class="help-block">Please enter the number of seconds</span>
|
||||
<label>Best Size</label>
|
||||
<%= f.text_field :best_size, :class=>"input-large", :placeholder=>"Banner Size" %>
|
||||
<span class="help-block">Best Size EX:120x30 </span>
|
||||
<label>Effect</label>
|
||||
<%= f.select :ad_fx ,AdBanner::FX_TYPES %>
|
||||
<div class="preview">
|
||||
<%= image_tag "slideshow_preview_A.png", :width=>220 %>
|
||||
<%= image_tag "slideshow_preview_B.png", :width=>220 %>
|
||||
</div>
|
||||
<span class="help-block">Effect</span>
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:create_), class: 'btn btn-primary btn-small' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= form_for(:ad_banner, :url => admin_ad_banners_path) do |f| %>
|
||||
<fieldset>
|
||||
<legend><%= t("ad_banner.banner") %></legend>
|
||||
<label><%= t("ad_banner.banner_name") %></label>
|
||||
<%= f.text_field :title, :class=>"input-large", :placeholder=>"Banner Name" %>
|
||||
<span class="help-block"><%= t("ad_banner.banner_name_note") %></span>
|
||||
<label for="timeout"><%= t("ad_banner.ste") %></label>
|
||||
<%= f.text_field :transition_sec, :class => 'input-large', :placeholder => 'Time' %>
|
||||
<span class="help-block"><%= t("ad_banner.ste_note") %></span>
|
||||
<label><%= t("ad_banner.best_size") %></label>
|
||||
<%= f.text_field :best_size, :class=>"input-large", :placeholder=>"Banner Size" %>
|
||||
<span class="help-block"><%= t("ad_banner.best_size") %> EX:120x30 </span>
|
||||
<label><%= t("ad_banner.effect") %></label>
|
||||
<%= f.select :ad_fx ,AdBanner::FX_TYPES %>
|
||||
<div class="preview">
|
||||
<%= image_tag "slideshow_preview_A.png", :width=>220 %>
|
||||
<%= image_tag "slideshow_preview_B.png", :width=>220 %>
|
||||
</div>
|
||||
<span class="help-block"><%= t("ad_banner.effect") %></span>
|
||||
<a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
|
||||
<%= f.submit t(:create_), class: 'btn btn-primary btn-small' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
<script type="text/javascript">
|
||||
$('select').on('change', function() {
|
||||
$(".preview").cycle({
|
||||
delay: -3000,
|
||||
fx: $(this).val()
|
||||
});
|
||||
});
|
||||
</script>
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<%= javascript_include_tag "lib/jquery.cycle.all.latest.js"%>
|
||||
<div style='position:relative'>
|
||||
<ul id='banner_nav' class='clear banner_nav-<%= @ad_banner.title.dehumanize %>'></ul>
|
||||
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class='slideshow'>
|
||||
@@ -10,18 +9,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<script type='text/javascript'>
|
||||
$(document).ready(function(){
|
||||
jQuery(function( $ ){
|
||||
|
||||
$('#slideshow-<%= @ad_banner.title.dehumanize %>').cycle({
|
||||
delay: -1000,
|
||||
fx: "<%= @ad_banner.ad_fx.nil? ? 'fade': @ad_banner.ad_fx %>",
|
||||
timeoutFn: getTimeout,
|
||||
pager: '.banner_nav-<%= @ad_banner.title.dehumanize %>',
|
||||
pagerAnchorBuilder: function(idx, slide) {
|
||||
return "<li><a href='#'></a></li>";
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
var banner = {"banner_name":"#slideshow-<%= @ad_banner.title.dehumanize %>",
|
||||
"banner_fx":"<%= @ad_banner.ad_fx.nil? ? 'fade': @ad_banner.ad_fx %>",
|
||||
"banner_pager":".banner_nav-<%= @ad_banner.title.dehumanize %>",
|
||||
"image_count":"<%= @ad_banner.ad_images.length %>",
|
||||
"image_loaded":0,
|
||||
"time_to_next":<%= @ad_banner.transition_msec %>,
|
||||
};
|
||||
banners.push(banner);
|
||||
</script>
|
||||
+1
-1
@@ -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'
|
||||
|
||||
@@ -7,6 +7,7 @@ module OrbitModel
|
||||
has_one :auth_approval, as: :approval_authorizable, dependent: :destroy
|
||||
has_one :auth_sub_manager, as: :sub_manager_authorizable, dependent: :destroy
|
||||
delegate :authorized_users, to: :auth_approval, prefix: true, allow_nil: true
|
||||
delegate :authorized_users, to: :auth_manager, prefix: true, allow_nil: true
|
||||
delegate :authorized_users, to: :auth_sub_manager, prefix: true, allow_nil: true
|
||||
send :include, InstanceMethods
|
||||
end
|
||||
|
||||
+177
-80
@@ -1,96 +1,193 @@
|
||||
namespace :new_ui do
|
||||
|
||||
MODULE_APPS = [ %w(announcement bulletin),
|
||||
%w(archive archive_file),
|
||||
%w(ask ask_question ask_category),
|
||||
%w(asset asset),
|
||||
%w(faq qa),
|
||||
%w(gallery gallery_album gallery_category),
|
||||
%w(location location),
|
||||
%w(personal_book writing_book),
|
||||
%w(personal_conference writing_conference),
|
||||
%w(personal_experience experience),
|
||||
%w(personal_honor honor),
|
||||
%w(personal_journal writing_journal),
|
||||
%w(personal_patent writing_patent),
|
||||
%w(personal_project project),
|
||||
%w(web_resource web_link)
|
||||
] # app_key, model_name, category_name
|
||||
|
||||
task :migrate => :environment do
|
||||
@db = Mongoid.database
|
||||
migrate_tags
|
||||
migrate_categories
|
||||
migrate_approval_on_object
|
||||
migrate_managers
|
||||
end
|
||||
|
||||
# :category_name is optional, depends on the naming of the category model: if no conventional, specify it
|
||||
task :migrate_categories, [:app_key, :model_name, :category_name] => :environment do |t, args|
|
||||
@db = Mongoid.database
|
||||
if args[:app_key] && args[:model_name]
|
||||
migrate_category(args[:app_key], args[:model_name], args[:category_name])
|
||||
else
|
||||
module_apps = [ %w(announcement bulletin),
|
||||
%w(archive archive_file),
|
||||
%w(ask ask_question ask),
|
||||
%w(asset asset),
|
||||
%w(faq qa),
|
||||
%w(gallery gallery_album gallery),
|
||||
%w(personal_book writing_book),
|
||||
%w(personal_conference writing_conference),
|
||||
%w(personal_experience experience),
|
||||
%w(personal_honor honor),
|
||||
%w(personal_journal writing_journal),
|
||||
%w(personal_patent writing_patent),
|
||||
%w(personal_project project),
|
||||
%w(web_resource web_link)
|
||||
]
|
||||
module_apps.each{|value_array| migrate_category(value_array[0], value_array[1], value_array[2])}
|
||||
end
|
||||
end
|
||||
|
||||
def migrate_category(app_key, model_name, category_name=nil)
|
||||
category_name = model_name unless category_name
|
||||
# # coll_cat = @db["#{category_name}_categories"]
|
||||
# # categories = coll_cat.find if coll_cat
|
||||
module_app = ModuleApp.where(key: app_key)[0]
|
||||
if module_app.has_category
|
||||
categories = "#{category_name}_categories".classify.constantize.admin_manager_all rescue nil
|
||||
categories = "#{category_name}_categories".classify.constantize.all if categories.blank?
|
||||
categories.each do |category|
|
||||
new_category = module_app.categories.build
|
||||
new_category.title_translations = category['title']
|
||||
new_category.disable = category['disable']
|
||||
new_category.save
|
||||
model_name.classify.constantize.where("#{category_name}_category_id" => category['_id']).each do |object|
|
||||
if object.id.is_a?(String)
|
||||
object.destroy
|
||||
else
|
||||
object.category = new_category.id
|
||||
object.remove_attribute("#{category_name}_category_id")
|
||||
object.save
|
||||
end
|
||||
end
|
||||
if object_auths = ObjectAuth.where(obj_authable_type: "#{category_name.classify}Category")
|
||||
object_auths.each do |object_auth|
|
||||
case object_auth.title
|
||||
when 'fact_check'
|
||||
new_object_auth = new_category.get_object_auth_by_title("approval_#{module_app.key}")
|
||||
else
|
||||
new_object_auth = new_category.get_object_auth_by_title("category_#{module_app.key}")
|
||||
end
|
||||
object_auth.auth_users.each do |user|
|
||||
new_object_auth.add_user_to_privilege_list(user)
|
||||
end
|
||||
object_auth.destroy
|
||||
end
|
||||
end
|
||||
category.destroy
|
||||
end
|
||||
end
|
||||
migrate_categories(args)
|
||||
end
|
||||
|
||||
task :migrate_tags => :environment do
|
||||
tags = Tag.where(_type: 'Tag')
|
||||
tags.each do |tag|
|
||||
module_app = ModuleApp.find(tag.module_tag_id)
|
||||
new_tag = module_app.module_tags.build
|
||||
new_tag.name_translations = tag['name']
|
||||
new_tag.is_default = tag['is_default']
|
||||
new_tag.save
|
||||
n_tag = new_tag.tag
|
||||
n_tag.cloud_view_count = tag['cloud_view_count']
|
||||
n_tag.view_count = tag['view_count']
|
||||
n_tag.save
|
||||
tag.taggings.each do |tagging|
|
||||
tagging.taggable.taggings.create(tag_id: n_tag.id)
|
||||
end
|
||||
tag.destroy
|
||||
migrate_tags
|
||||
end
|
||||
|
||||
task :fix_tagged_ids => :environment do
|
||||
fix_tagged_ids
|
||||
end
|
||||
|
||||
def migrate_categories(args = nil)
|
||||
if args && args[:app_key] && args[:model_name]
|
||||
migrate_category(args[:app_key], args[:model_name], args[:category_name])
|
||||
else
|
||||
MODULE_APPS.each{|value_array| migrate_category(value_array[0], value_array[1], value_array[2])}
|
||||
end
|
||||
end
|
||||
|
||||
task :change_auth_naming => :environment do
|
||||
ObjectAuth.where(title: /submit_/).each do |auth|
|
||||
auth.update_attribute(:title, auth.title.gsub('submit_', 'category_'))
|
||||
def migrate_category(app_key, model_name, category_name = nil)
|
||||
@db ||= Mongoid.database
|
||||
category_name = "#{model_name}_category" unless category_name
|
||||
collection_category = @db[category_name.pluralize]
|
||||
categories = collection_category.find.entries if collection_category
|
||||
collection_model = @db[model_name.pluralize]
|
||||
collection_buffer_category = @db['buffer_categories']
|
||||
collection_prototype_auth = @db['prototype_auths']
|
||||
if categories.present?
|
||||
module_app = ModuleApp.where(key: app_key).first
|
||||
if module_app.try(:has_category)
|
||||
categories.each do |category|
|
||||
new_category = module_app.categories.build
|
||||
new_category.title_translations = category['title']
|
||||
new_category.disable = category['disable']
|
||||
new_category.save
|
||||
collection_model.find("#{category_name}_id" => category['_id']).each do |object|
|
||||
object['category_id'] = new_category.id
|
||||
object.delete("#{category_name}_id")
|
||||
collection_model.save object
|
||||
collection_buffer_category.save ({ '_type' => 'BufferCategory', 'category_id' => new_category.id, 'categorizable_type' => model_name.camelize, 'categorizable_id' => object['_id'] })
|
||||
end
|
||||
object_auths = collection_prototype_auth.find(_type: 'ObjectAuth', obj_authable_id: category['_id'], '$or' => [{privilege_user_ids: {'$not' => {'$size' => 0}}}, {role_ids: {'$not' => {'$size' => 0}}}, {sub_role_ids: {'$not' => {'$size' => 0}}}]).entries
|
||||
if object_auths.present?
|
||||
object_auths.each do |object_auth|
|
||||
if object_auth['title'].eql?('fact_check')
|
||||
authorization = new_category.auth_approval || new_category.create_auth_approval(module_app_id: module_app.id, title: "category_approval_#{module_app.key}")
|
||||
else
|
||||
authorization = new_category.auth_sub_manager || new_category.create_auth_sub_manager(module_app_id: module_app.id, title: "category_authorization_#{module_app.key}")
|
||||
end
|
||||
add_users(object_auth, authorization)
|
||||
collection_prototype_auth.remove(object_auth)
|
||||
end
|
||||
end
|
||||
end
|
||||
collection_category.drop
|
||||
collection_prototype_auth.remove(obj_authable_type: category_name.classify)
|
||||
end
|
||||
else
|
||||
collection_category.drop
|
||||
collection_prototype_auth.remove(obj_authable_type: category_name.classify)
|
||||
end
|
||||
end
|
||||
|
||||
def fix_tagged_ids
|
||||
Tag.all.each do |tag|
|
||||
tag.taggings.each do |tagging|
|
||||
tagged_ids = tagging.taggable.tagged_ids
|
||||
unless tagged_ids.include?(tag.id.to_s)
|
||||
tagged_ids << tag.id.to_s
|
||||
tagging.taggable.update_attribute(:tagged_ids, tagged_ids)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def migrate_tags
|
||||
@db ||= Mongoid.database
|
||||
tags = Tag.where(_type: 'Tag').entries
|
||||
tags.each_with_index do |tag, i|
|
||||
unless tag.tag_lease
|
||||
if module_app = ModuleApp.find(tag[:module_tag_id])
|
||||
new_tag = module_app.module_tags.build
|
||||
new_tag.name_translations = tag['name']
|
||||
new_tag.is_default = tag['is_default']
|
||||
new_tag.save
|
||||
n_tag = new_tag.tag
|
||||
n_tag.cloud_view_count = tag['cloud_view_count']
|
||||
n_tag.view_count = tag['view_count']
|
||||
n_tag.save
|
||||
tag.taggings.each do |tagging|
|
||||
tagged_ids = tagging.taggable.tagged_ids
|
||||
unless tagged_ids.include?(tag.id.to_s)
|
||||
tagged_ids << tag.id.to_s
|
||||
tagging.taggable.update_attribute(:tagged_ids, tagged_ids)
|
||||
end
|
||||
tagging.taggable.taggings.create(tag_id: n_tag.id)
|
||||
end
|
||||
end
|
||||
tag.destroy
|
||||
end
|
||||
end
|
||||
old_tags = Tag.where(_type: {'$ne' => 'Tag'}).delete
|
||||
@db = Mongoid.database
|
||||
@db['proto_tags'].drop
|
||||
end
|
||||
|
||||
def migrate_approval_on_object
|
||||
@db ||= Mongoid.database
|
||||
collection_prototype_auth = @db['prototype_auths']
|
||||
object_auths = collection_prototype_auth.find({_type: 'ObjectAuth', obj_authable_type: {'$in' => ["AdBanner", "PageContext"]}, '$or' => [{privilege_user_ids: {'$not' => {'$size' => 0}}}, {role_ids: {'$not' => {'$size' => 0}}}, {sub_role_ids: {'$not' => {'$size' => 0}}}]}).entries
|
||||
object_auths.each do |object_auth|
|
||||
case object_auth['obj_authable_type']
|
||||
when 'AdBanner'
|
||||
module_app = ModuleApp.where(key: 'ad_banner').first
|
||||
when 'PageContext'
|
||||
module_app = ModuleApp.where(key: 'page_content').first
|
||||
end
|
||||
if module_app
|
||||
object = object_auth['obj_authable_type'].constantize.find(object_auth['obj_authable_id']) rescue nil
|
||||
if object
|
||||
authorization = object.create_auth_sub_manager(module_app_id: module_app.id, title: "#{object_auth['obj_authable_type'].underscore}_authorization_#{module_app.key}")
|
||||
add_users(object_auth, authorization) if authorization
|
||||
end
|
||||
end
|
||||
collection_prototype_auth.remove(object_auth)
|
||||
end
|
||||
collection_prototype_auth.remove(obj_authable_type: {'$in' => ["AdBanner", "PageContext"]})
|
||||
end
|
||||
|
||||
def add_users(object_auth, authorization)
|
||||
if authorization
|
||||
if object_auth['role_ids'].present?
|
||||
roles = Role.find(object_auth['role_ids']) rescue nil
|
||||
authorization.add_roles(roles) if roles
|
||||
end
|
||||
if object_auth['sub_role_ids'].present?
|
||||
sub_roles = SubRole.find(object_auth['sub_role_ids']) rescue nil
|
||||
authorization.add_sub_roles(sub_roles) if sub_roles
|
||||
end
|
||||
if object_auth['privilege_user_ids'].present?
|
||||
users = User.find(object_auth['privilege_user_ids']) rescue nil
|
||||
authorization.add_users(users) if users
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def migrate_managers
|
||||
@db ||= Mongoid.database
|
||||
collection_app_manager = @db['app_managers']
|
||||
app_managers = collection_app_manager.find(managing_app_id: {'$not' => {'$size' => 0}}).entries
|
||||
app_managers.each do |app_manager|
|
||||
module_app = ModuleApp.find(app_manager['managing_app_id']) rescue nil
|
||||
user = User.find(app_manager['user_id']) rescue nil
|
||||
if module_app && user
|
||||
authorization = module_app.auth_manager || module_app.create_auth_manager(module_app_id: module_app.id, title: module_app.key)
|
||||
authorization.add_users(user)
|
||||
end
|
||||
end
|
||||
collection_app_manager.drop
|
||||
end
|
||||
|
||||
task :reset_user_position => :environment do
|
||||
User.where(email: /guest/).each{|d|d.update_attribute(:position, nil)}
|
||||
User.not_guest_user.each_with_index do |user, i|
|
||||
|
||||
@@ -3,6 +3,12 @@ en:
|
||||
ad_banner:
|
||||
ad_banner: Ad Banner
|
||||
banner: Banner
|
||||
banner_name: Banner Name
|
||||
banner_name_note: Banner Name only english
|
||||
ste: Transition Interval
|
||||
ste_note: Please enter the number of seconds
|
||||
best_size: Best Size
|
||||
effect: Effect
|
||||
all: All
|
||||
categories: Categories
|
||||
add: Add
|
||||
@@ -3,6 +3,12 @@ zh_tw:
|
||||
ad_banner:
|
||||
ad_banner: 廣告輪播
|
||||
banner: 橫幅
|
||||
banner_name: 橫幅名稱
|
||||
banner_name_note: 橫幅名稱只能為英文
|
||||
ste: 轉換間隔時間
|
||||
ste_note: 請輸入秒數
|
||||
best_size: 最佳尺寸
|
||||
effect: 效果
|
||||
all: 全部
|
||||
categories: 類別
|
||||
add: 新增
|
||||
+3
-1
@@ -11,7 +11,9 @@ module AdBanner
|
||||
update_info 'some update_info'
|
||||
|
||||
taggable
|
||||
authorizable
|
||||
authorizable do
|
||||
authorizable_on('AdBanner')
|
||||
end
|
||||
|
||||
# front_end do
|
||||
# app_page 'bulletins'
|
||||
|
||||
Vendored
+11
-5
@@ -9,27 +9,33 @@ class Panel::Ask::FrontEnd::AskQuestionsController < OrbitWidgetController
|
||||
|
||||
def index
|
||||
@ask_question = AskQuestion.new
|
||||
@categories = @module_app.categories.enabled
|
||||
end
|
||||
|
||||
def create
|
||||
@ask_question = AskQuestion.new(params[:ask_question])
|
||||
if gotcha_valid? && @ask_question.save
|
||||
@acknowledgement = AskAcknowledgement.last
|
||||
@acknowledgement = AskAcknowledgement.last
|
||||
@ask_acknowledgement = AskAcknowledgement.first || AskAcknowlegement.new
|
||||
#@ask_question.save
|
||||
#redirect_to root_path
|
||||
|
||||
AskAdmin.all.each do |ask_admin|
|
||||
AskMailer.notice(ask_admin, @ask_question).deliver
|
||||
Resque.enqueue(SendAskNoticeMail, ask_admin.id, @ask_question.id)
|
||||
end
|
||||
# redirect_to panel_ask_front_end_thank_you_path
|
||||
|
||||
# Render to create.js.erb
|
||||
respond_to do |format|
|
||||
format.js
|
||||
# format.js { render :thank_you, notice: 'Your question has been successfully sent.' }
|
||||
end
|
||||
else
|
||||
# Render to index.js.erb
|
||||
respond_to do |format|
|
||||
format.js { render :index }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def thank_you
|
||||
@acknowledgement = AskAcknowledgement.last
|
||||
@item = Page.find(params[:page_id]) rescue nil
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ $(document).ready(function(){
|
||||
<div class="control-group">
|
||||
<%= f.label :ask_category_id, class: 'control-label required' %>
|
||||
<div class="controls">
|
||||
<%= f.collection_select :ask_category_id, AskCategory.all, :id, :name %>
|
||||
<%= f.select :category_id, @categories.collect{|t| [ t.title, t.id ]} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.location.href = "<%= panel_ask_front_end_sorry_path %>";
|
||||
+1
@@ -0,0 +1 @@
|
||||
<h3><%= t(:ask_fail, :scope => :ask) %> !</h3>
|
||||
@@ -19,8 +19,10 @@ Rails.application.routes.draw do
|
||||
|
||||
namespace :front_end do
|
||||
match "ask_questions/thank_you" => "ask_questions#thank_you", :as => 'thank_you'
|
||||
match "ask_questions/sorry" => "ask_questions#sorry", :as => 'sorry'
|
||||
resources :ask_questions
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user