Merge branch 'master' of github.com:Rulingcom/NCCU
Conflicts: vendor/built_in_modules/announcement/app/models/bulletin.rb
This commit is contained in:
commit
7ca0d2a62b
14
Gemfile.lock
14
Gemfile.lock
|
@ -58,7 +58,7 @@ GEM
|
|||
ruby2ruby (~> 1.2)
|
||||
ruport (~> 1.6)
|
||||
sass (~> 3.0)
|
||||
bson (1.6.1)
|
||||
bson (1.6.4)
|
||||
bson_ext (1.6.1)
|
||||
bson (~> 1.6.1)
|
||||
builder (3.0.0)
|
||||
|
@ -130,18 +130,18 @@ GEM
|
|||
mime-types (1.17.2)
|
||||
mini_magick (3.4)
|
||||
subexec (~> 0.2.1)
|
||||
mongo (1.6.1)
|
||||
bson (~> 1.6.1)
|
||||
mongo (1.6.2)
|
||||
bson (~> 1.6.2)
|
||||
mongo_session_store-rails3 (3.0.5)
|
||||
actionpack (>= 3.0)
|
||||
mongo
|
||||
mongoid (2.4.6)
|
||||
mongoid (2.4.12)
|
||||
activemodel (~> 3.1)
|
||||
mongo (~> 1.3)
|
||||
mongo (<= 1.6.2)
|
||||
tzinfo (~> 0.3.22)
|
||||
mongoid-tree (0.7.0)
|
||||
mongoid (~> 2.0)
|
||||
multi_json (1.1.0)
|
||||
multi_json (1.3.6)
|
||||
mysql2 (0.3.11)
|
||||
mysql2 (0.3.11-x86-mingw32)
|
||||
net-ldap (0.3.1)
|
||||
|
@ -301,7 +301,7 @@ GEM
|
|||
treetop (1.4.10)
|
||||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
tzinfo (0.3.32)
|
||||
tzinfo (0.3.33)
|
||||
uglifier (1.2.3)
|
||||
execjs (>= 0.3.0)
|
||||
multi_json (>= 1.0.2)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<%#= encoding: utf-8 %>
|
||||
$(document).on('click', '#ajax_form_submit', function(){
|
||||
// $(document).on('click', '#ajax_form_submit', function(){
|
||||
// $('#ajaxForm').ajaxSubmit({
|
||||
// beforeSubmit: function(a,f,o) {
|
||||
// o.dataType = 'script';
|
||||
|
@ -20,92 +20,102 @@ $(document).on('click', '#ajax_form_submit', function(){
|
|||
// });
|
||||
|
||||
|
||||
var o = {
|
||||
// dataType: 'script',
|
||||
dataType: 'html',
|
||||
url:$("#ajaxForm").attr("action"),
|
||||
beforeSubmit: function(){
|
||||
var sub = true;
|
||||
$("span.error").remove();
|
||||
$("#dyn_error").empty();
|
||||
$("#ajaxForm input").each(function(){
|
||||
if($(this).val() == ""){
|
||||
$("<span class='error'> *</span>").insertAfter($(this));
|
||||
sub = false;
|
||||
}
|
||||
})
|
||||
if(!sub){
|
||||
$("#dyn_error").text("Cannot be empty.");
|
||||
$("#dyn_error").text("<%= I18n.t('cant_empty_star') %>");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
success: function(response,status,xhr){
|
||||
if(typeof tinyMCEPopup != "undefined"){
|
||||
var x = response.split("#");
|
||||
var returnurl = x[0],
|
||||
returntitle = x[1],
|
||||
returndescription = x[2];
|
||||
var win = tinyMCEPopup.getWindowArg("window");
|
||||
win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = returnurl;
|
||||
win.document.getElementById(tinyMCEPopup.getWindowArg("alt")).value = returndescription;
|
||||
win.document.getElementById(tinyMCEPopup.getWindowArg("title")).value = returntitle;
|
||||
if (typeof(win.ImageDialog) != "undefined") {
|
||||
// we are, so update image dimensions...
|
||||
if (win.ImageDialog.getImageData)
|
||||
win.ImageDialog.getImageData();
|
||||
// var o = {
|
||||
// // dataType: 'script',
|
||||
// dataType: 'html',
|
||||
// url:$("#ajaxForm").attr("action"),
|
||||
// beforeSubmit: function(){
|
||||
// var sub = true;
|
||||
// $("span.error").remove();
|
||||
// $("#dyn_error").empty();
|
||||
// $("#ajaxForm input").each(function(){
|
||||
// if($(this).val() == ""){
|
||||
// $("<span class='error'> *</span>").insertAfter($(this));
|
||||
// sub = false;
|
||||
// }
|
||||
// })
|
||||
// if(!sub){
|
||||
// $("#dyn_error").text("Cannot be empty.");
|
||||
// $("#dyn_error").text("<%= I18n.t('cant_empty_star') %>");
|
||||
// return false;
|
||||
// }
|
||||
// },
|
||||
// success: function(response,status,xhr){
|
||||
// if(typeof tinyMCEPopup != "undefined"){
|
||||
// var x = response.split("#");
|
||||
// var returnurl = x[0],
|
||||
// returntitle = x[1],
|
||||
// returndescription = x[2];
|
||||
// var win = tinyMCEPopup.getWindowArg("window");
|
||||
// win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = returnurl;
|
||||
// win.document.getElementById(tinyMCEPopup.getWindowArg("alt")).value = returndescription;
|
||||
// win.document.getElementById(tinyMCEPopup.getWindowArg("title")).value = returntitle;
|
||||
// if (typeof(win.ImageDialog) != "undefined") {
|
||||
// // we are, so update image dimensions...
|
||||
// if (win.ImageDialog.getImageData)
|
||||
// win.ImageDialog.getImageData();
|
||||
|
||||
// ... and preview if necessary
|
||||
if (win.ImageDialog.showPreviewImage)
|
||||
win.ImageDialog.showPreviewImage(returnurl);
|
||||
}
|
||||
tinyMCEPopup.close();
|
||||
}else{
|
||||
//incase if we want to do something for quick edit file upload
|
||||
// var modalvalues = "";
|
||||
// var r = "";
|
||||
// if(rcom.getInternetExplorerVersion() > -1){
|
||||
// r = "<tr><td>" + response + "</td></tr>";
|
||||
// r = r.replace("**","</td><td>");
|
||||
// r = r.replace("**","</td><td>");
|
||||
// r = $(r);
|
||||
// modalvalues = r.find("span").attr("data-content").split("#");
|
||||
// r.attr("id",r.find("span").attr("for"));
|
||||
// var table=document.getElementById(modalvalues[0]);
|
||||
// //var tbody = table.getElementsByTagName("tbody");
|
||||
// var row = table.insertRow(table.rows.length-1);
|
||||
// var c1 = row.insertCell(0),
|
||||
// c2 = row.insertCell(1),
|
||||
// c3 = row.insertCell(2);
|
||||
// c1.innerHTML = r.find("td").eq(0).html();
|
||||
// c2.innerHTML = r.find("td").eq(1).html();
|
||||
// c3.innerHTML = r.find("td").eq(2).html();
|
||||
// var trow = $("#bulletin_files tfoot").find("tr").eq(0);
|
||||
// $("#bulletin_files tbody").append(trow);
|
||||
// }else{
|
||||
// // ... and preview if necessary
|
||||
// if (win.ImageDialog.showPreviewImage)
|
||||
// win.ImageDialog.showPreviewImage(returnurl);
|
||||
// }
|
||||
// tinyMCEPopup.close();
|
||||
// }else{
|
||||
// //incase if we want to do something for quick edit file upload
|
||||
// // var modalvalues = "";
|
||||
// // var r = "";
|
||||
// // if(rcom.getInternetExplorerVersion() > -1){
|
||||
// // r = "<tr><td>" + response + "</td></tr>";
|
||||
// // r = r.replace("**","</td><td>");
|
||||
// // r = r.replace("**","</td><td>");
|
||||
// // r = $(r);
|
||||
// // modalvalues = r.find("span").attr("data-content").split("#");
|
||||
// // r.attr("id",r.find("span").attr("for"));
|
||||
// // var table=document.getElementById(modalvalues[0]);
|
||||
// // //var tbody = table.getElementsByTagName("tbody");
|
||||
// // var row = table.insertRow(table.rows.length-1);
|
||||
// // var c1 = row.insertCell(0),
|
||||
// // c2 = row.insertCell(1),
|
||||
// // c3 = row.insertCell(2);
|
||||
// // c1.innerHTML = r.find("td").eq(0).html();
|
||||
// // c2.innerHTML = r.find("td").eq(1).html();
|
||||
// // c3.innerHTML = r.find("td").eq(2).html();
|
||||
// // var trow = $("#bulletin_files tfoot").find("tr").eq(0);
|
||||
// // $("#bulletin_files tbody").append(trow);
|
||||
// // }else{
|
||||
|
||||
// response = response.replace("**","");
|
||||
// response = response.replace("**","");
|
||||
// r = $(response);
|
||||
// modalvalues = r.find("span").attr("data-content").split("#");
|
||||
// $('#' + modalvalues[0]+ ' tbody').append(r);
|
||||
// }
|
||||
// console.log(modalvalues[1]);
|
||||
// $("#"+modalvalues[1]).modal('hide');
|
||||
//$('#bulletin_files tbody').append(r);
|
||||
//$(response).fadeIn();
|
||||
}
|
||||
},
|
||||
error:function(){
|
||||
alert("error");
|
||||
}
|
||||
}
|
||||
// // response = response.replace("**","");
|
||||
// // response = response.replace("**","");
|
||||
// // r = $(response);
|
||||
// // modalvalues = r.find("span").attr("data-content").split("#");
|
||||
// // $('#' + modalvalues[0]+ ' tbody').append(r);
|
||||
// // }
|
||||
// // console.log(modalvalues[1]);
|
||||
// // $("#"+modalvalues[1]).modal('hide');
|
||||
// //$('#bulletin_files tbody').append(r);
|
||||
// //$(response).fadeIn();
|
||||
// }
|
||||
// },
|
||||
// error:function(){
|
||||
// alert("error");
|
||||
// }
|
||||
// }
|
||||
|
||||
if (o.dataType == 'script') {
|
||||
o.url = o.url.split('?'); // split on GET params
|
||||
if (o.url[0].substr(-3) != '.js') o.url[0] += '.js'; // force rails to respond to respond to the request with :format = js
|
||||
o.url = o.url.join('?'); // join on GET params
|
||||
}
|
||||
$('#ajaxForm').ajaxSubmit(o);
|
||||
// if (o.dataType == 'script') {
|
||||
// o.url = o.url.split('?'); // split on GET params
|
||||
// if (o.url[0].substr(-3) != '.js') o.url[0] += '.js'; // force rails to respond to respond to the request with :format = js
|
||||
// o.url = o.url.join('?'); // join on GET params
|
||||
// }
|
||||
// $('#ajaxForm').ajaxSubmit(o);
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
$('#ajaxForm').ajaxForm({
|
||||
beforeSubmit: function(a,f,o) {
|
||||
o.dataType = 'script';
|
||||
|
||||
},
|
||||
success: function(data) {
|
||||
|
||||
}
|
||||
});
|
|
@ -10,7 +10,7 @@ $('.bulletin_files_block a.delete').live('click', function(){
|
|||
});
|
||||
|
||||
$(document).on('click', '.action a.remove_existing_record', function(){
|
||||
if(confirm("<%= I18n.t('announcement.sure?')%>")){
|
||||
if(confirm("<%= I18n.t(:sure?)%>")){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#" + $(this).prev().attr('value')).hide();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
jQuery(document).ajaxStart(function(){
|
||||
$('<div class="modal-backdrop fade in" id="sys_modal"><img src="/assets/ajax-loader.gif" style="margin-top: 25%;margin-left: 50%;"></div>').appendTo('body');
|
||||
});
|
||||
// jQuery(document).ajaxStart(function(){
|
||||
// $('<div class="modal-backdrop fade in" id="sys_modal"><img src="/assets/ajax-loader.gif" style="margin-top: 25%;margin-left: 50%;"></div>').appendTo('body');
|
||||
// });
|
||||
|
||||
jQuery(document).ajaxComplete(function(){
|
||||
$("#sys_modal").hide().remove();
|
||||
});
|
||||
// jQuery(document).ajaxComplete(function(){
|
||||
// $("#sys_modal").hide().remove();
|
||||
// });
|
||||
|
|
|
@ -40,11 +40,11 @@ $(".nav-tabs").find(".icons-pencil").click(function(){
|
|||
data: { body: content_holder.html() },
|
||||
success: function(json) {
|
||||
$(selector).attr("contenteditable",false)
|
||||
alert("<%= I18n.t('admin.contenteditable.update_done') %>");
|
||||
alert("<%= I18n.t('update.success_') %>");
|
||||
//content_holder.effect('highlight', {'color': '#0f0'}, 3000);
|
||||
},
|
||||
error: function() {
|
||||
alert("<%= I18n.t('admin.contenteditable.update_failed') %>");
|
||||
alert("<%= I18n.t('update.fail') %>");
|
||||
//content_holder.effect('highlight', {'color': '#f00'}, 3000);
|
||||
content_holder.html(content);
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ $('.news_bulletin_files_block a.delete').live('click', function(){
|
|||
});
|
||||
|
||||
$(document).on('click', '.action a.remove_existing_record', function(){
|
||||
if(confirm("<%= I18n.t('news.sure?')%>")){
|
||||
if(confirm("<%= I18n.t(:sure?)%>")){
|
||||
$(this).next('.should_destroy').attr('value', 1);
|
||||
$("tr#" + $(this).prev().attr('value')).hide();
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ class Admin::AdImagesController < OrbitBackendController
|
|||
@ad_banner = AdBanner.find params[:ad_banner_id]
|
||||
@ad_image = @ad_banner.ad_images.find params[:id]
|
||||
if @ad_image.destroy
|
||||
flash[:notice] = t('admin.success_destroy_ad_image')
|
||||
flash[:notice] = t('ad.success_destroy_ad_image')
|
||||
redirect_to admin_ad_banner_path @ad_banner
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ class Admin::AssetCategoriesController < OrbitBackendController
|
|||
|
||||
respond_to do |format|
|
||||
if @asset_category.save
|
||||
format.html { redirect_to(admin_asset_categories_url, :notice => t('announcement.create_asset_category_success')) }
|
||||
format.html { redirect_to(admin_asset_categories_url, :notice => t('create.success.asset_category')) }
|
||||
format.js
|
||||
else
|
||||
format.html { render :action => "new" }
|
||||
|
@ -41,8 +41,8 @@ class Admin::AssetCategoriesController < OrbitBackendController
|
|||
|
||||
respond_to do |format|
|
||||
if @asset_category.update_attributes(params[:asset_category])
|
||||
# format.html { redirect_to(panel_announcement_back_end_asset_category_url(@asset_category), :notice => t('asset_category.update_asset_category_success')) }
|
||||
# format.html { redirect_to(panel_announcement_back_end_asset_categories_url, :notice => t('asset_category.update_asset_category_success')) }
|
||||
# format.html { redirect_to(panel_announcement_back_end_asset_category_url(@asset_category), :notice => t('create.success')) }
|
||||
# format.html { redirect_to(panel_announcement_back_end_asset_categories_url, :notice => t('create.success')) }
|
||||
# format.xml { head :ok }
|
||||
format.js
|
||||
else
|
||||
|
|
|
@ -44,7 +44,7 @@ class Admin::AssetsController < OrbitBackendController
|
|||
# render :json=>{"url"=>@asset.data.url,"title"=>"xxx","desc"=>"sss"}.to_json
|
||||
render :layout=>false
|
||||
else
|
||||
flash[:error] = t(:create_fail)
|
||||
flash[:error] = t('create.fail')
|
||||
@asset_categories = AssetCategory.all
|
||||
@tags = AssetTag.all
|
||||
respond_to do |format|
|
||||
|
@ -67,7 +67,7 @@ class Admin::AssetsController < OrbitBackendController
|
|||
format.js { render 'js/remove_pop_up_and_reload_content', :locals => {:function => 'replaceWith', :id => "asset_#{@asset.id}", :value => @asset, :values => nil, :partial => 'admin/assets/asset', :locals => nil} }
|
||||
end
|
||||
else
|
||||
flash[:error] = t(:update_fail)
|
||||
flash[:error] = t('update.fail')
|
||||
@asset_categories = AssetCategory.all
|
||||
@tags = AssetTag.all
|
||||
respond_to do |format|
|
||||
|
|
|
@ -4,7 +4,6 @@ class Admin::ItemsController < ApplicationController
|
|||
|
||||
before_filter :authenticate_user!
|
||||
before_filter :find_parent_item
|
||||
before_filter :find_snippets, :only => :index
|
||||
before_filter :is_admin?
|
||||
before_filter :set_current_item
|
||||
|
||||
|
@ -22,10 +21,4 @@ class Admin::ItemsController < ApplicationController
|
|||
render :nothing => true
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def find_snippets
|
||||
@snippets = Snippet.where( { :parent_id => @parent_item.id } ) rescue nil
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@ class Admin::LinksController < ApplicationController
|
|||
@item = Link.new(params[:link])
|
||||
|
||||
if @item.save
|
||||
flash.now[:notice] = t('admin.create_success_link')
|
||||
flash.now[:notice] = t('create.success.link')
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_link_url(@item)
|
||||
|
@ -31,7 +31,7 @@ class Admin::LinksController < ApplicationController
|
|||
format.js {}
|
||||
end
|
||||
else
|
||||
flash.now[:error] = t('admin.create_error_link')
|
||||
flash.now[:error] = t('create.error.link')
|
||||
render :action => "new"
|
||||
end
|
||||
end
|
||||
|
@ -40,7 +40,7 @@ class Admin::LinksController < ApplicationController
|
|||
@item = Link.find(params[:id])
|
||||
|
||||
if @item.update_attributes(params[:link])
|
||||
flash.now[:notice] = t('admin.update_success_link')
|
||||
flash.now[:notice] = t('update.success.link')
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_link_url(@item)
|
||||
|
@ -48,7 +48,7 @@ class Admin::LinksController < ApplicationController
|
|||
format.js {}
|
||||
end
|
||||
else
|
||||
flash.now[:error] = t('admin.update_error_link')
|
||||
flash.now[:error] = t('update.error.link')
|
||||
render :action => "edit"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -58,14 +58,14 @@ class Admin::ModuleAppsController < ApplicationController
|
|||
def assign_sub_manager
|
||||
unless @assign_to_user.nil? || @assign_to_user.admin?
|
||||
if @module_app.assign_sub_manager(@assign_to_user,current_user)
|
||||
flash[:notice] = t('admin.app_auth.assigning_manager.add_sub_manager_ok')
|
||||
flash[:notice] = t('app_auth.assigning_manager.add_manager_ok')
|
||||
else
|
||||
flash[:notice] = t('admin.app_auth.assigning_manager.add_sub_manager_fail')
|
||||
flash[:notice] = t('app_auth.assigning_manager.add_manager_fail')
|
||||
end
|
||||
else
|
||||
flash[:notice] = t('admin.app_auth.assigning_manager.failed_no_user')
|
||||
flash[:notice] = t('app_auth.failed_no_user')
|
||||
end
|
||||
flash[:notice] = t('admin.app_auth.can_not_add_this_user')
|
||||
flash[:notice] = t('app_auth.can_not_add_this_user')
|
||||
redirect_to :action => "edit"
|
||||
end
|
||||
|
||||
|
@ -73,14 +73,14 @@ class Admin::ModuleAppsController < ApplicationController
|
|||
def assign_manager
|
||||
unless @assign_to_user.nil? || @assign_to_user.admin?
|
||||
if @module_app.assign_manager(@assign_to_user,current_user)
|
||||
flash[:notice] = t('admin.app_auth.assigning_sub_manager.add_manager_ok')
|
||||
flash[:notice] = t('app_auth.assigning_sub_manager.add_sub_manager_ok')
|
||||
else
|
||||
flash[:notice] = t('admin.app_auth.assigning_sub_manager.add_manager_fail')
|
||||
flash[:notice] = t('app_auth.assigning_sub_manager.add_sub_manager_fail')
|
||||
end
|
||||
else
|
||||
flash[:notice] = t('admin.app_auth.assigning_sub_manager.failed_no_user')
|
||||
flash[:notice] = t('app_auth.failed_no_user')
|
||||
end
|
||||
flash[:notice] = t('admin.app_auth.can_not_add_this_user')
|
||||
flash[:notice] = t('app_auth.can_not_add_this_user')
|
||||
redirect_to :action => "edit"
|
||||
end
|
||||
|
||||
|
@ -88,9 +88,9 @@ class Admin::ModuleAppsController < ApplicationController
|
|||
def remove_manager
|
||||
@app_manager = AppManager.find(params[:app_manager_id])
|
||||
if @module_app.remove_manager(@app_manager.user)
|
||||
flash[:notice] = t('admin.app_auth.delete_manager.success')
|
||||
flash[:notice] = t('app_auth.delete_manager.success')
|
||||
else
|
||||
flash[:notice] = t('admin.app_auth.delete_manager.fail')
|
||||
flash[:notice] = t('app_auth.delete_manager.fail')
|
||||
end
|
||||
redirect_to :action => "edit"
|
||||
end
|
||||
|
@ -99,9 +99,9 @@ class Admin::ModuleAppsController < ApplicationController
|
|||
def remove_sub_manager
|
||||
@app_sub_manager = AppManager.find(params[:app_sub_manager_id])
|
||||
if @module_app.remove_sub_manager(@app_sub_manager.user)
|
||||
flash[:notice] = t('admin.app_auth.delete_sub_manager.success')
|
||||
flash[:notice] = t('app_auth.delete_sub_manager.success')
|
||||
else
|
||||
flash[:notice] = t('admin.app_auth.delete_sub_manager.fail')
|
||||
flash[:notice] = t('app_auth.delete_sub_manager.fail')
|
||||
end
|
||||
redirect_to :action => "edit"
|
||||
end
|
||||
|
@ -115,7 +115,7 @@ class Admin::ModuleAppsController < ApplicationController
|
|||
return
|
||||
end
|
||||
#user is not permited to do that
|
||||
flash[:notice] = t('admin.app_auth.operation_not_permitted')
|
||||
flash[:notice] = t('app_auth.operation_not_permitted')
|
||||
render :nothing => true, :status => 403
|
||||
end
|
||||
|
||||
|
@ -127,7 +127,7 @@ class Admin::ModuleAppsController < ApplicationController
|
|||
return
|
||||
end
|
||||
#user is not permited to do that
|
||||
flash[:notice] = t('admin.app_auth.operation_not_permitted')
|
||||
flash[:notice] = t('app_auth.operation_not_permitted')
|
||||
render :nothing => true, :status => 403
|
||||
end
|
||||
|
||||
|
|
|
@ -25,9 +25,9 @@ class Admin::ModuleAppsNewInterfaceController < OrbitBackendController
|
|||
def update_setting
|
||||
module_app = update_setting_by_params
|
||||
if module_app.save!
|
||||
flash[:notice] = t("admin.object_auth.update_done")
|
||||
flash[:notice] = t('update.success_')
|
||||
else
|
||||
flash[:notice] = t("admin.object_auth.update_failed")
|
||||
flash[:notice] = t('update.fail')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ class Admin::ObjectAuthsController < ApplicationController
|
|||
if @object_auth.save
|
||||
redirect_to edit_admin_object_auth_path(@object_auth)
|
||||
else
|
||||
flash[:error] = t('admin.object.a_object_must_have_only_one_object_auth_profile_for_each_action')
|
||||
flash[:error] = t('object.a_object_must_have_only_one_object_auth_profile_for_each_action')
|
||||
redirect_to (:back)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,9 +18,9 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController
|
|||
def update_setting
|
||||
ob_auth = update_setting_by_params
|
||||
if ob_auth.save!
|
||||
flash[:notice] = t("admin.object_auth.update_done")
|
||||
flash[:notice] = t('update.success_')
|
||||
else
|
||||
flash[:notice] = t("admin.object_auth.update_failed")
|
||||
flash[:notice] = t('update.fail')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class Admin::PagePartsController < ApplicationController
|
|||
@part = PagePart.find(params[:id])
|
||||
if @part.update_attributes(params[:page_part])
|
||||
set_children_sub_menu(@part) if @part.public_r_tag && @part.public_r_tag.eql?('sub_menu')
|
||||
flash.now[:notice] = t('admin.update_success_content')
|
||||
flash.now[:notice] = t('update.success.content')
|
||||
|
||||
if @part.page.name == 'home'
|
||||
expire_page '/'
|
||||
|
|
|
@ -56,7 +56,7 @@ class Admin::PagesController < ApplicationController
|
|||
end
|
||||
|
||||
if @item.save
|
||||
flash.now[:notice] = t('admin.create_success_page')
|
||||
flash.now[:notice] = t('create.success.page')
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_page_url(@item)
|
||||
|
@ -64,7 +64,7 @@ class Admin::PagesController < ApplicationController
|
|||
format.js {}
|
||||
end
|
||||
else
|
||||
flash.now[:error] = t('admin.create_error_page')
|
||||
flash.now[:error] = t('create.error.page')
|
||||
@apps = ModuleApp.all
|
||||
@designs = Design.all.entries
|
||||
@design = Design.first
|
||||
|
@ -80,7 +80,7 @@ class Admin::PagesController < ApplicationController
|
|||
end
|
||||
|
||||
if @item.update_attributes(params[:page])
|
||||
flash[:notice] = t('admin.update_success_page')
|
||||
flash[:notice] = t('update.success.page')
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
redirect_to admin_page_url(@item)
|
||||
|
|
|
@ -1,81 +0,0 @@
|
|||
class Admin::TranslationsController < ApplicationController
|
||||
|
||||
layout "admin"
|
||||
before_filter :authenticate_user!
|
||||
before_filter :is_admin?
|
||||
|
||||
def index
|
||||
set_variables
|
||||
end
|
||||
|
||||
def edit
|
||||
set_variables
|
||||
end
|
||||
|
||||
# Update either the i18n_variables or the languages
|
||||
def update
|
||||
begin
|
||||
case params[:id]
|
||||
# Update the i18n_variables
|
||||
when 'all'
|
||||
params[:i18n_variables].each do |id, var|
|
||||
i18n_variable = I18nVariable.find(id)
|
||||
i18n_variable.update_attributes(var)
|
||||
end
|
||||
# Add a language
|
||||
when 'add'
|
||||
site = Site.find(session[:site])
|
||||
if !site.valid_locales.include?(params[:language])
|
||||
site.valid_locales << params[:language]
|
||||
site.save
|
||||
I18nVariable.create({:key => params[:language], :document_class => 'language'})
|
||||
end
|
||||
# Enable a language
|
||||
when 'enable'
|
||||
site = Site.find(session[:site])
|
||||
if !site.in_use_locales.include?(params[:enable_language])
|
||||
site.in_use_locales << params[:enable_language]
|
||||
site.save
|
||||
end
|
||||
# Disable a language
|
||||
when 'disable'
|
||||
site = Site.find(session[:site])
|
||||
if site.in_use_locales.include?(params[:disable_language])
|
||||
site.in_use_locales.delete(params[:disable_language])
|
||||
site.save
|
||||
end
|
||||
# Delete a language and the corresponding i18n_variables
|
||||
when 'delete'
|
||||
site = Site.find(session[:site])
|
||||
site.in_use_locales.delete(params[:delete_language])
|
||||
site.valid_locales.delete(params[:delete_language])
|
||||
site.save
|
||||
I18nVariable.destroy_all(:conditions => {:document_class => 'language', :key => params[:delete_language]})
|
||||
end
|
||||
redirect_to admin_translations_url
|
||||
rescue
|
||||
set_variables
|
||||
render :action => :edit
|
||||
end
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
# Get the i18n_variables and languages
|
||||
def set_variables
|
||||
@i18n_variables = I18nVariable.all.entries
|
||||
@language_i18n_variables = @i18n_variables.inject([]) do |result, var|
|
||||
result << var if var.document_class.eql?('language')
|
||||
result
|
||||
end
|
||||
@role_i18n_variables = @i18n_variables.inject([]) do |result, var|
|
||||
result << var if var.document_class.eql?('Role')
|
||||
result
|
||||
end
|
||||
@info_i18n_variables = @i18n_variables.inject([]) do |result, var|
|
||||
result << var if var.document_class.eql?('UserInfoModel')
|
||||
result
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -22,7 +22,7 @@ class Admin::UsersController < ApplicationController
|
|||
puts params.to_yaml
|
||||
@user = User.new(params[:user])
|
||||
if @user.save
|
||||
flash[:notice] = t('admin.create_success_user')
|
||||
flash[:notice] = t('create.success.user')
|
||||
redirect_to :action => :index
|
||||
else
|
||||
render :action => :new
|
||||
|
@ -42,10 +42,10 @@ class Admin::UsersController < ApplicationController
|
|||
@user.avatar = params[:file] if params[:file]
|
||||
|
||||
if @user.id.to_s.eql?(session['warden.user.user.key'][1].to_s) && @user.admin != params[:user][:admin].to_i.to_b
|
||||
flash.now[:error] = t('admin.cant_revoke_self_admin')
|
||||
flash.now[:error] = t(:cant_revoke_self_admin)
|
||||
end
|
||||
if !flash[:error] && @user.update_attributes(params[:user])
|
||||
flash[:notice] = t('admin.update_success_user')
|
||||
flash[:notice] = t('update.success.user')
|
||||
redirect_to :action => :index
|
||||
else
|
||||
get_info_and_roles
|
||||
|
@ -55,7 +55,7 @@ class Admin::UsersController < ApplicationController
|
|||
|
||||
def destroy
|
||||
if params[:id].eql?(session['warden.user.user.key'][1].to_s)
|
||||
flash[:error] = t('admin.cant_delete_self')
|
||||
flash[:error] = t(:cant_delete_self)
|
||||
else
|
||||
@user = User.find(params[:id])
|
||||
@user.destroy
|
||||
|
|
|
@ -61,7 +61,7 @@ class ApplicationController < ActionController::Base
|
|||
if is_admin?
|
||||
true
|
||||
else
|
||||
flash[:error] = t("admin.access.denied.not_admin")
|
||||
flash[:error] = t("access.denied.not_admin")
|
||||
auth_failed_in_backend
|
||||
end
|
||||
end
|
||||
|
@ -70,7 +70,7 @@ class ApplicationController < ActionController::Base
|
|||
if is_manager?
|
||||
true
|
||||
else
|
||||
flash[:error] = t("admin.access.denied.app.not_manager")
|
||||
flash[:error] = t("access.denied.app.not_manager")
|
||||
auth_failed_in_backend
|
||||
end
|
||||
end
|
||||
|
@ -79,7 +79,7 @@ class ApplicationController < ActionController::Base
|
|||
if (@module_app.sub_managing_users.include?(current_user) || is_manager?)
|
||||
true
|
||||
else
|
||||
flash[:error] = t("admin.access.denied.app.not_sub_manager")
|
||||
flash[:error] = t("access.denied.app.not_sub_manager")
|
||||
auth_failed_in_backend
|
||||
end
|
||||
end
|
||||
|
@ -88,13 +88,13 @@ class ApplicationController < ActionController::Base
|
|||
if (@module_app.app_auth.auth_users.include?(current_user) || for_app_sub_manager )
|
||||
true
|
||||
else
|
||||
flash[:error] = t("admin.access.denied.app.not_authed_user")
|
||||
flash[:error] = t("access.denied.app.not_authed_user")
|
||||
auth_failed_in_backend
|
||||
end
|
||||
end
|
||||
|
||||
def check_object_premission(obj,title)
|
||||
flash[:error] = t("admin.access.denied.object")
|
||||
flash[:error] = t("access.denied.object")
|
||||
auth_failed_in_backend unless (obj.get_object_auth_by_title(title).auth_users.include?(current_user) || is_manager? || is_admin? )
|
||||
end
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ class SessionsController < Devise::SessionsController
|
|||
result = false
|
||||
ldap_filter = "(uid=#{login_uid})"
|
||||
if /@rulingcom.com$/.match(login_uid).nil?
|
||||
MiddleSiteConnection.establish
|
||||
# MiddleSiteConnection.establish
|
||||
NccuLdapConnection.establish
|
||||
|
||||
if ($nccu_ldap_connection.bind rescue false)
|
||||
|
|
|
@ -22,8 +22,8 @@ module Admin::AdBannerHelper
|
|||
ad_banner.object_auths.new(title: type ).save
|
||||
oa = ad_banner.get_object_auth_by_title(type)
|
||||
end
|
||||
# link_to t('announcement.bulletin.cate_auth'), edit_admin_object_auth_path(oa)
|
||||
link_to t('admin.ad.cate_auth'),admin_object_auth_ob_auth_path(oa),:class => "btn btn-warning"
|
||||
# link_to t(:category_auth), edit_admin_object_auth_path(oa)
|
||||
link_to t(:category_auth),admin_object_auth_ob_auth_path(oa),:class => "btn btn-warning"
|
||||
end
|
||||
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@ module Admin::ItemHelper
|
|||
ret << "<div class='with_action'><i class='icons-moves'></i>"
|
||||
ret << (link_to node.title, dest, :class => 'js_history')
|
||||
ret << "<div class='quick-edit hide'>"
|
||||
ret << (link_to t('admin.edit'), eval("edit_admin_#{node.class.to_s.downcase}_path(node)"), :class => 'js_history') if node.class.to_s.eql?('Page')
|
||||
ret << (link_to t('admin.new_page'), new_admin_page_path(:parent_id => node.id), :class => 'new_page js_history') if node.class.to_s.eql?('Page')
|
||||
ret << (link_to t('admin.new_link'), new_admin_link_path(:parent_id => node.id), :class => 'new_link js_history') if node.class.to_s.eql?('Page')
|
||||
ret << (link_to t(:edit), eval("edit_admin_#{node.class.to_s.downcase}_path(node)"), :class => 'js_history') if node.class.to_s.eql?('Page')
|
||||
ret << (link_to t('new.page'), new_admin_page_path(:parent_id => node.id), :class => 'new_page js_history') if node.class.to_s.eql?('Page')
|
||||
ret << (link_to t('new.link'), new_admin_link_path(:parent_id => node.id), :class => 'new_link js_history') if node.class.to_s.eql?('Page')
|
||||
ret << (link_to t(:delete), eval("delete_admin_#{node.class.to_s.downcase}_path(node, :authenticity_token => form_authenticity_token)"), :confirm => t('sure?'), :class => 'delete js_history')
|
||||
ret << "</div>"
|
||||
ret << "</div>"
|
||||
|
|
|
@ -15,6 +15,6 @@ module Admin::ModuleAppHelper
|
|||
|
||||
def get_auth_by(manager_obj)
|
||||
showing_name = manager_obj.rule_creator==current_user ? t('me') : manager_obj.rule_creator.name
|
||||
t("admin.user_role.auth.auth_by",:user_display_name => showing_name)
|
||||
t("auth.auth_by",:user_display_name => showing_name)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,8 +11,8 @@ include ActionView::Helpers::UrlHelper
|
|||
page_context.object_auths.new(title: type ).save rescue
|
||||
oa = page_context.get_object_auth_by_title(type)
|
||||
end
|
||||
# link_to t('announcement.bulletin.cate_auth'), edit_admin_object_auth_path(oa)
|
||||
link_to t('admin.page_context.ob_auth.edit'),admin_object_auth_ob_auth_path(oa)
|
||||
# link_to t(:category_auth), edit_admin_object_auth_path(oa)
|
||||
link_to t(:category_auth),admin_object_auth_ob_auth_path(oa)
|
||||
end
|
||||
|
||||
end
|
|
@ -6,6 +6,6 @@ module Admin::WebLinkHelper
|
|||
web_link.object_auths.new(title: type ).save
|
||||
oa = web_link.get_object_auth_by_title(type)
|
||||
end
|
||||
link_to t('web_resource.cate_auth'),admin_object_auth_ob_auth_path(oa)
|
||||
link_to t(:category_auth),admin_object_auth_ob_auth_path(oa)
|
||||
end
|
||||
end
|
|
@ -43,7 +43,7 @@ module OrbitBackendHelper
|
|||
end
|
||||
|
||||
def show_toggle_archive_btn(object)
|
||||
object.disable ? t("object_disable.change_to_false") : t("object_disable.change_to_true")
|
||||
object.disable ? t(:disable) : t(:enable)
|
||||
end
|
||||
|
||||
end
|
|
@ -2,26 +2,26 @@
|
|||
<% if at_least_module_manager || sub_manager?(ad_banner_tab)%>
|
||||
<%= form_for ad_banner_tab,:url=> admin_ad_banner_path(ad_banner_tab),:method => :put,:class=>"input-medium" do |f| -%>
|
||||
<div class="adbanner-setup well">
|
||||
<!--<p><%#= t("admin.ad.banner_best_size") %>:</p>-->
|
||||
<%= f.label :ad_fx, t('admin.ad.ab_fx') %>
|
||||
<!--<p><%#= t("ad.banner_best_size") %>:</p>-->
|
||||
<%= f.label :ad_fx, t('ad.ab_fx') %>
|
||||
<%= f.select :ad_fx ,AdBanner::FX_TYPES %>
|
||||
<%= f.label :transition_sec, t('admin.ad.transition_sec') %>
|
||||
<%= f.text_field :transition_sec,:placeholder=>t('admin.ad.sec_place_holder'),:class=> "span3" %> <%= t("admin.ad.trans_unit_sec") %>
|
||||
<%= f.label :transition_sec, t('ad.transition_sec') %>
|
||||
<%= f.text_field :transition_sec,:placeholder=>t('ad.sec_place_holder'),:class=> "span3" %> <%= t("ad.trans_unit_sec") %>
|
||||
<%if at_least_module_manager%>
|
||||
<%= f.label :best_size, t('admin.ad.best_size') %>
|
||||
<%= f.label :best_size, t('ad.best_size') %>
|
||||
<%= f.text_field :best_size %> Ex: 500px x 300px
|
||||
<% end -%>
|
||||
<br>
|
||||
<%= f.submit t("admin.ad.update_banner"), :class => 'btn' %>
|
||||
<%= f.submit t("ad.update_banner"), :class => 'btn' %>
|
||||
<%= f.submit t("cancel"),:type=>'reset', :class => 'btn' %>
|
||||
</div>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<h3><%= t("admin.ad.picture_list")%></h3>
|
||||
<h3><%= t("ad.picture_list")%></h3>
|
||||
<div class="adbanner-list">
|
||||
<%if (at_least_module_manager || ad_banner_tab.cur_user_is_sub_manager_of(:edit) )%>
|
||||
<%= content_tag :div ,:class=>'adbanner-action' do%>
|
||||
<%= link_to t("admin.ad.new_image"),new_admin_ad_banner_ad_image_path(ad_banner_tab) ,:class => "btn btn-primary"%>
|
||||
<%= link_to t("ad.new_image"),new_admin_ad_banner_ad_image_path(ad_banner_tab) ,:class => "btn btn-primary"%>
|
||||
<%= link_to t("modal.preview"), admin_realtime_preview_ad_banner_path(ad_banner_tab.id) , :class=>'preview_trigger btn btn-success'%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
@ -30,7 +30,7 @@
|
|||
</ul>
|
||||
<% if at_least_module_manager %>
|
||||
<%= show_ad_banner_permission_link ad_banner_tab%>
|
||||
<%= link_to t('admin.ad.delete_banner'),admin_ad_banner_path(ad_banner_tab),:class => 'btn',:method => :delete,:confirm => t('sure?') %>
|
||||
<%= link_to t(:delete),admin_ad_banner_path(ad_banner_tab),:class => 'btn',:method => :delete,:confirm => t('sure?') %>
|
||||
<% end -%>
|
||||
|
||||
<%#= render :partial => 'new_add_banner_file', :object => ad_banner_tab.ad_images.build, :locals => { :field_name => "new_ad_images[]", :f => f, :classes => "r_destroy" } %>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<li class="span3">
|
||||
<%= image_tag ad_image.file rescue nil%>
|
||||
<p>
|
||||
<%= ad_image.display? ? "[#{t('admin.ad.showing')}]" : "[#{t('admin.ad.not_showing')}]" %>
|
||||
<%= ad_image.display? ? "[#{t('ad.showing')}]" : "[#{t('ad.not_showing')}]" %>
|
||||
<%= "#{ad_image.post_date ||'NeedReset' }~#{ad_image.unpost_date || 'NeedReset'}" %>
|
||||
</p>
|
||||
<%if at_least_module_manager || sub_manager?(ad_image.ad_banner) %>
|
||||
|
|
|
@ -4,33 +4,33 @@
|
|||
|
||||
<div class="modal-header">
|
||||
<a class="close" data-dismiss="modal">×</a>
|
||||
<h3><%= t("admin.ad.new_banner") %></h3>
|
||||
<h3><%= t('new.banner') %></h3>
|
||||
</div>
|
||||
|
||||
<div class="modal-body form-horizontal">
|
||||
<div class="control-group">
|
||||
<%= f.label :title,t('admin.ad.title'),:class => "control-label" %>
|
||||
<%= f.label :title, t(:title),:class => "control-label" %>
|
||||
<div class="controls">
|
||||
<%= f.text_field :title %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :transition_sec, t('admin.ad.transition_sec'),:class => "control-label" %>
|
||||
<%= f.label :transition_sec, t('ad.transition_sec'),:class => "control-label" %>
|
||||
<div class="controls">
|
||||
<%= f.text_field :transition_sec %> <%= t("admin.ad.trans_unit_sec") %>
|
||||
<%= f.text_field :transition_sec %> <%= t("ad.trans_unit_sec") %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :best_size, t('admin.ad.best_size'),:class => "control-label" %>
|
||||
<%= f.label :best_size, t('ad.best_size'),:class => "control-label" %>
|
||||
<div class="controls">
|
||||
<%= f.text_field :best_size %> Ex: 500px x 300px
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :ad_fx, t('admin.ad.ab_fx') %>
|
||||
<%= f.label :ad_fx, t('ad.ab_fx') %>
|
||||
<div class="controls">
|
||||
<%= f.select :ad_fx ,AdBanner::FX_TYPES %>
|
||||
</div>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li,link_to(t("admin.ad.new_banner"),"#new-a-banner",:data=>{:toggle=>"modal"}),:id=>'new_ad_banner_tab_but',:class => (@active.nil? ? 'active' : nil ) if at_least_module_manager%>
|
||||
<%= content_tag :li,link_to(t('new.banner'),"#new-a-banner",:data=>{:toggle=>"modal"}),:id=>'new_ad_banner_tab_but',:class => (@active.nil? ? 'active' : nil ) if at_least_module_manager%>
|
||||
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<div class="widget-action clear">
|
||||
<a href="#" class="action"><i title="Set the announcement to start and end dates" class="icon-exclamation-sign icon-white tip"></i></a>
|
||||
</div>
|
||||
<h3 class="widget-title"><i class="icons-calendar icons-white"></i> Date</h3>
|
||||
<h3 class="widget-title"><i class="icons-calendar icons-white"></i><%= t('nccu.date') %></h3>
|
||||
<div class="widget-content clear">
|
||||
<div id="calendarRange">
|
||||
<div class="input-append">
|
||||
|
@ -73,7 +73,7 @@
|
|||
<div class="widget-action clear">
|
||||
<a class="action"><i title="Upload pictures" class="icon-exclamation-sign icon-white tip"></i></a>
|
||||
</div>
|
||||
<h3 class="widget-title"><i class="icons-picture icons-white"></i>Picture</h3>
|
||||
<h3 class="widget-title"><i class="icons-picture icons-white"></i><%= t('nccu.picture') %></h3>
|
||||
<div class="widget-content clear">
|
||||
<div class="control-group">
|
||||
<div class="upload-picture">
|
||||
|
@ -81,7 +81,7 @@
|
|||
<%= image_tag @ad_image.file rescue ''%>
|
||||
</div>
|
||||
<% if !@ad_image.ad_banner.best_size.empty?%>
|
||||
<span class="alert widgetInfo"><%= t("admin.ad.widget_info_for_ad_image_size",:best_size=> @ad_image.ad_banner.best_size) %>
|
||||
<span class="alert widgetInfo"><%= t("ad.widget_info_for_ad_image_size",:best_size=> @ad_image.ad_banner.best_size) %>
|
||||
</span>
|
||||
<% end -%>
|
||||
<div class="controls file-upload input-prepend">
|
||||
|
@ -101,7 +101,7 @@
|
|||
<div class="widget-action clear">
|
||||
<a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="Upload pictures"></i></a>
|
||||
</div>
|
||||
<h3 class="widget-title"><i class="icons-star-thin icons-white"></i>Type</h3>
|
||||
<h3 class="widget-title"><i class="icons-star-thin icons-white"></i><%= t(:type) %></h3>
|
||||
<div class="widget-content clear">
|
||||
<%= f.select :link_open ,AdImage::LINK_OPEN_TYPES%>
|
||||
</div>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<div class="widget-action clear">
|
||||
<a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="Set the range time"></i></a>
|
||||
</div>
|
||||
<h3 class="widget-title"><i class="icons-time icons-white"></i>FEQ</h3>
|
||||
<h3 class="widget-title"><i class="icons-time icons-white"></i><%= t(:frequency) %></h3>
|
||||
<div class="widget-content clear">
|
||||
<%= f.text_field :weight ,:class=> 'span3',:placeholder=>"在套圖中出現次數 1次請輸入1" %>
|
||||
</div>
|
||||
|
@ -121,7 +121,7 @@
|
|||
<div class="widget-action clear">
|
||||
<a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="Add a reference link"></i></a>
|
||||
</div>
|
||||
<h3 class="widget-title"><i class="icons-link icons-white"></i>Link</h3>
|
||||
<h3 class="widget-title"><i class="icons-link icons-white"></i><%= t(:link) %></h3>
|
||||
<div class="widget-content clear">
|
||||
<%= f.text_field :out_link ,:class=> 'span3',:placeholder => "輸入連結"%>
|
||||
</div>
|
||||
|
|
|
@ -5,18 +5,18 @@
|
|||
<div class="main_list">
|
||||
<%= flash_messages %>
|
||||
<div class="button_bar up">
|
||||
<% #link_to t('admin.new_user'), new_admin_user_path, :class => 'new' %>
|
||||
<% #link_to t('new.user'), new_admin_user_path, :class => 'new' %>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><%= t('admin.app.title') %></td>
|
||||
<td><%= t('admin.app.description') %></td>
|
||||
<td><%= t('admin.app.use_status') %></td>
|
||||
<td><%= t('admin.app.autdor') %></td>
|
||||
<td><%= t('admin.app.organization') %></td>
|
||||
<td><%= t('admin.app.version') %></td>
|
||||
<td class="action"><%= t('admin.action') %></td>
|
||||
<td><%= t(:title) %></td>
|
||||
<td><%= t(:description) %></td>
|
||||
<td><%= t(:use_status) %></td>
|
||||
<td><%= t(:author) %></td>
|
||||
<td><%= t(:organization) %></td>
|
||||
<td><%= t(:version) %></td>
|
||||
<td class="action"><%= t(:action) %></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -47,6 +47,6 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<div class="button_bar">
|
||||
<%# link_to t('admin.new_user'), new_admin_user_path, :class => 'new' %>
|
||||
<%# link_to t('new.user'), new_admin_user_path, :class => 'new' %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
|
||||
<li><%= link_to t('asset_category.edit'), edit_admin_asset_category_path(asset_category), :remote => true %></li>
|
||||
<li><%= link_to t('asset_category.delete'), admin_asset_category_path(asset_category), :confirm => t('announcement.sure?'), :method => :delete, :remote => true %></li>
|
||||
<li><%= link_to t(:edit), edit_admin_asset_category_path(asset_category), :remote => true %></li>
|
||||
<li><%= link_to t(:delete), admin_asset_category_path(asset_category), :confirm => t(:sure?), :method => :delete, :remote => true %></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<table class="table main-list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="span2"><%= t('asset_category.key') %></th>
|
||||
<th class="span2"><%= t(:key) %></th>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<th class="span2"><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></th>
|
||||
<% end %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div id='pop_up_content' class="main2">
|
||||
<h1><%= t('editing_asset') %></h1>
|
||||
<h1><%= t('editing.asset') %></h1>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
|||
<%= link_back %>
|
||||
<%= f.submit t(:edit) %>
|
||||
<% else %>
|
||||
<a id='ajax_form_submit' class="btn btn-primary"><%= t(:update) %></a>
|
||||
<a id='ajax_form_submit' class="btn btn-primary"><%= t(:update_) %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="control-group">
|
||||
<label for="title" class="control-label"><%= t 'admin.title' %></label>
|
||||
<label for="title" class="control-label"><%= t :title %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :title_translations do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
|
@ -14,13 +14,13 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= f.label :category, t('admin.category') %></label>
|
||||
<label class="control-label"><%= f.label :category, t(:category) %></label>
|
||||
<div class="controls">
|
||||
<%= f.select :asset_category_id, @asset_categories.collect{|t| [ t.title, t.id ]}, {}, :class => "input-large" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'admin.tags' %></label>
|
||||
<label class="control-label"><%= t :tags %></label>
|
||||
<div class="controls">
|
||||
<% @tags.each do |tag| %>
|
||||
<%= content_tag :label, :class => "checkbox inline" do -%>
|
||||
|
@ -32,7 +32,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= f.label :data, t('admin.data') %></label>
|
||||
<label class="control-label"><%= f.label :data, t(:data) %></label>
|
||||
<div class="controls">
|
||||
<%= f.file_field :data, :class => 'upload' %>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div id='pop_up_content' class="main2">
|
||||
<h1><%= t('admin.new_asset') %></h1>
|
||||
<h1><%= t('new.asset') %></h1>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
|||
<%= f.error_messages %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="button_bar">
|
||||
<a id='ajax_form_submit' class="btn btn-primary"><%= t(:create) %></a>
|
||||
<a id='ajax_form_submit' class="btn btn-primary"><%= t(:create_) %></a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%= render_sort_bar(true, delete_admin_assets_path(:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil, :sort_options => params[:sort_options]),
|
||||
['title', 'title','span4', 'admin.title'],
|
||||
['description', 'description', 'span1-2', 'admin.data'],
|
||||
['intro', 'intro', 'span1-2', 'admin.file_type'],
|
||||
['intro', 'intro', 'span1-2', 'admin.file_length'],
|
||||
['intro', 'intro', 'span1-2', 'admin.description'],
|
||||
['intro', 'intro', 'span1-2', 'admin.tags']).html_safe %>
|
||||
['title', 'title','span4', :title],
|
||||
['description', 'description', 'span1-2', :data],
|
||||
['intro', 'intro', 'span1-2', :type],
|
||||
['intro', 'intro', 'span1-2', :size],
|
||||
['intro', 'intro', 'span1-2', :description],
|
||||
['intro', 'intro', 'span1-2', :tags]).html_safe %>
|
||||
|
|
|
@ -1 +1,25 @@
|
|||
<%= @asset.data.url %>#<%= show_all_fields(@asset, 'title') %>#<%= show_all_fields(@asset, 'description') %>
|
||||
<% if !request.xhr? %>
|
||||
<textarea>
|
||||
<% end %>
|
||||
var returnurl = "<%= @asset.data.url %>";
|
||||
var returntitle = "<%= show_all_fields(@asset, 'title') %>";
|
||||
var returndescription = "<%= show_all_fields(@asset, 'description') %>";
|
||||
var win = tinyMCEPopup.getWindowArg("window");
|
||||
win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = returnurl;
|
||||
if(win.document.getElementById(tinyMCEPopup.getWindowArg("alt")))
|
||||
win.document.getElementById(tinyMCEPopup.getWindowArg("alt")).value = returndescription;
|
||||
|
||||
win.document.getElementById(tinyMCEPopup.getWindowArg("title")).value = returntitle;
|
||||
if (typeof(win.ImageDialog) != "undefined") {
|
||||
// we are, so update image dimensions...
|
||||
if (win.ImageDialog.getImageData)
|
||||
win.ImageDialog.getImageData();
|
||||
|
||||
// ... and preview if necessary
|
||||
if (win.ImageDialog.showPreviewImage)
|
||||
win.ImageDialog.showPreviewImage(returnurl);
|
||||
}
|
||||
tinyMCEPopup.close();
|
||||
<% if !request.xhr? %>
|
||||
</textarea>
|
||||
<% end %>
|
|
@ -1,7 +1,7 @@
|
|||
<% content_for :secondary do %>
|
||||
<div class="assets_setup">
|
||||
<ul class="list">
|
||||
<li><%= link_to t(:new_asset, :scope => :admin), new_admin_asset_path, :remote => true, :class => 'button positive' %></li>
|
||||
<li><%= link_to t('new.asset'), new_admin_asset_path, :remote => true, :class => 'button positive' %></li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
<body onload="tinyMCEPopup.executeOnLoad('init();')">
|
||||
<%= form_for :asset, :url => admin_assets_path(:uploader => true), :html => {:id => 'ajaxForm', :multipart => true } do |f| %>
|
||||
<div class="modal-header">
|
||||
<h3><%= t 'admin.file_upload' %></h3>
|
||||
<h3><%= t 'file.upload' %></h3>
|
||||
</div>
|
||||
<label class="control-label error" id="dyn_error"></label>
|
||||
<div class="modal-body form-horizontal">
|
||||
<div class="control-group">
|
||||
<label for="title" class="control-label error"><%= t 'admin.title' %></label>
|
||||
<label for="title" class="control-label error"><%= t :title %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :title_translations do |f| %>
|
||||
<div>
|
||||
|
@ -29,7 +29,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="description" class="control-label error"><%= t 'admin.description' %></label>
|
||||
<label for="description" class="control-label error"><%= t :description %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :description_translations do |f| %>
|
||||
<div>
|
||||
|
@ -46,7 +46,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<%#= f.label :data, t('admin.data'), :class => "control-label" %>
|
||||
<%#= f.label :data, t(:data), :class => "control-label" %>
|
||||
<div class="controls">
|
||||
<%= f.file_field :data, :class => 'upload' %>
|
||||
</div>
|
||||
|
@ -54,7 +54,8 @@
|
|||
</div>
|
||||
<div style="position: absolute; width: 100%; bottom: 0;">
|
||||
<div class="modal-footer">
|
||||
<a id='ajax_form_submit' class="btn btn-primary"><%= t(:create) %></a>
|
||||
<!-- <a id='ajax_form_submit' class="btn btn-primary"><#%= t(:create) %></a> -->
|
||||
<input type="submit" value="<%= t(:create) %>" class="btn btn-primary" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</table>
|
||||
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('admin.add'), new_admin_asset_path, :remote => true, :class => 'btn btn-primary pull-right' %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:add), new_admin_asset_path, :remote => true, :class => 'btn btn-primary pull-right' %>
|
||||
<div id="asset_pagination" class="paginationFixed">
|
||||
<%= paginate @assets, :params => {:direction => params[:direction], :sort => params[:sort], :filter => @filter, :new_filter => nil, :sort_options => params[:sort_options]}, :remote => true %>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% content_for :secondary do %>
|
||||
<div class="assets_setup">
|
||||
<ul class="list">
|
||||
<li><%= link_to t(:new_asset, :scope => :admin), new_admin_asset_path, :remote => true, :class => 'button positive' %></li>
|
||||
<li><%= link_to t('new.asset'), new_admin_asset_path, :remote => true, :class => 'button positive' %></li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<td class='select_type'>
|
||||
<%= f.select :markup, LIST[:markups], {}, {:style => "width:90px"} %>
|
||||
<div <%= attribute_field[:markup].eql?('select') ? nil : "style='display:none'"%>>
|
||||
<%= t('admin.options') %>:
|
||||
<%= t(:options) %>:
|
||||
<%= f.select "select_list_options", attribute_field.select_list_options, :style => "width:130px" %>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
<div class="main_list">
|
||||
<div class="button_bar up">
|
||||
<%= link_to t("admin.new_#{@attribute_type}"), eval("new_admin_#{@attribute_type}_path"), :class => 'new' %>
|
||||
<%= link_to t("new.#{@attribute_type}"), eval("new_admin_#{@attribute_type}_path"), :class => 'new' %>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="<%= @attribute_type %>s"><%= t("admin.#{@attribute_type}") %></td>
|
||||
<td class="action"><%= t('admin.action') %></td>
|
||||
<td class="<%= @attribute_type %>s"><%= t("#{@attribute_type}") %></td>
|
||||
<td class="action"><%= t(:action) %></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -34,6 +34,6 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<div class="button_bar">
|
||||
<%= link_to t("admin.new_#{@attribute_type}"), eval("new_admin_#{@attribute_type}_path"), :class => 'new' %>
|
||||
<%= link_to t("new.#{@attribute_type}"), eval("new_admin_#{@attribute_type}_path"), :class => 'new' %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
<div id="open_for_all_user">
|
||||
<h1><%= t("admin.user_role.auth.all_member") %></h1>
|
||||
<h1><%= t("auth.all_member") %></h1>
|
||||
<%= form_tag(submit_url) do %>
|
||||
<%= check_box_tag 'auth_all',true,(auth.all rescue true) %><%= submit_tag t("admin.user_role.auth.all_member") %><br/>
|
||||
<%= check_box_tag 'auth_all',true,(auth.all rescue true) %><%= submit_tag t("auth.all_member") %><br/>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="user_role_management">
|
||||
<h1><%= t("admin.user_role.auth.user") %></h1>
|
||||
<h1><%= t(:user) %></h1>
|
||||
<%= form_tag(submit_url) do %>
|
||||
<%= collection_select(:new,:role, Role.all, :id, :key, :prompt => true) %>
|
||||
<%= submit_tag t("admin.user_role.auth.by_role") %><br/>
|
||||
<%= submit_tag t("auth.by_role") %><br/>
|
||||
<%= collection_select(:new,:sub_role, SubRole.all, :id, :key, :prompt => true) %>
|
||||
<%= submit_tag t("admin.user_role.auth.by_sub_role") %><br/>
|
||||
<%= submit_tag t("auth.by_sub_role") %><br/>
|
||||
<%= collection_select(:new,:privilege_user, User.all, :id, :name, :prompt => true) %>
|
||||
<%= submit_tag t("admin.user_role.auth.add_to_privilege_list") %><br/>
|
||||
<%= submit_tag t("auth.add_to_privilege_list") %><br/>
|
||||
<%= collection_select(:new,:blocked_user, User.all, :id, :name, :prompt => true) %>
|
||||
<%= submit_tag t("admin.user_role.auth.add_to_block_list") %><br/>
|
||||
<%= submit_tag t("auth.add_to_block_list") %><br/>
|
||||
<% end %>
|
||||
<% unless auth.nil? %>
|
||||
<% auth.roles.each do |role| %>
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="item element">
|
||||
<h3><i class="icons-asset"></i><a href=""><%= t(:file) %></a></a></h3>
|
||||
<h3><i class="icons-asset"></i><a href=""><%= t(:file_) %></a></a></h3>
|
||||
<div class="detail w-a h-a">
|
||||
<p class="totle"><span><%= t(:all_file) %></span>3,422</p>
|
||||
<table class="table table-striped">
|
||||
|
|
|
@ -6,21 +6,21 @@
|
|||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= f.label :title, t('admin.title') %>
|
||||
<%= f.label :title, t(:title) %>
|
||||
<%= f.text_field :title, :class => 'text' %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :author, t('admin.author') %>
|
||||
<%= f.label :author, t(:author) %>
|
||||
<%= f.text_field :author, :class => 'text' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.label :intro, t('admin.intro') %>
|
||||
<%= f.label :intro, t(:intro) %>
|
||||
<%= f.text_field :intro, :class => 'text' %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= f.label "layout", t('admin.layout') %>
|
||||
<%= f.label "layout", t(:layout) %>
|
||||
<% if @design.layout.blank? %>
|
||||
<%= fields_for 'design[layout]' do |f| %>
|
||||
<%= f.file_field :file %>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<% end %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label "default_css", t('admin.default_css') %>
|
||||
<%= f.label "default_css", t(:default_css) %>
|
||||
<% if @design.default_css.blank? %>
|
||||
<%= fields_for 'design[default_css]' do |f| %>
|
||||
<%= f.file_field :file %>
|
||||
|
@ -42,7 +42,7 @@
|
|||
<% end %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.label :themes, t('admin.themes') %>
|
||||
<%= f.label :themes, t(:themes) %>
|
||||
<ul>
|
||||
<% @design.themes.each do |theme| %>
|
||||
<%= render :partial => 'design_file', :object => theme, :locals => { :field_name => "themes", :f => f, :classes => "r_destroy, r_edit" } %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h1><%= t('admin.new_design') %></h1>
|
||||
<h1><%= t('new.design') %></h1>
|
||||
|
||||
<%= form_for @design, :url => admin_design_path(@design),:html => {:multipart => true} do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<%= render_sort_bar(true, delete_admin_designs_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]),
|
||||
['title', 'title','span7', 'admin.title'],
|
||||
['author', 'author', 'span2', 'admin.author'],
|
||||
['intro', 'intro', 'span2', 'admin.intro']).html_safe %>
|
||||
['title', 'title','span7', :title],
|
||||
['author', 'author', 'span2', :author],
|
||||
['intro', 'intro', 'span2', :intro]).html_safe %>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<%= render 'admin/sites/side_bar' %>
|
||||
<% end %>
|
||||
|
||||
<h1><%= t('admin.editing_design') %></h1>
|
||||
<h1><%= t('editing.design') %></h1>
|
||||
|
||||
<%= form_for @design, :url => admin_design_path(@design),:html => {:multipart => true} do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
</table>
|
||||
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t('admin.add'), new_admin_design_path, :class => 'btn btn-primary pull-right' %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-plus icon-white') + t(:add), new_admin_design_path, :class => 'btn btn-primary pull-right' %>
|
||||
</div>
|
|
@ -2,7 +2,7 @@
|
|||
<%= render 'admin/sites/side_bar' %>
|
||||
<% end %>
|
||||
|
||||
<h1><%= t('admin.new_design') %></h1>
|
||||
<h1><%= t('new.design') %></h1>
|
||||
|
||||
<%= form_for :design, :url => admin_designs_path, :html => {:multipart => true} do |f| %>
|
||||
<%= f.error_messages %>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<div class="attributes_block <%= @class %>">
|
||||
<h2><%= t("admin.#{@attribute_type}") %></h2>
|
||||
<h2><%= t("#{@attribute_type}") %></h2>
|
||||
<div class="info_input">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<thead class="list_head">
|
||||
<tr>
|
||||
<td><%= t('admin.key') %></td>
|
||||
<td><%= t(:key) %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></td>
|
||||
<% end %>
|
||||
|
@ -31,12 +31,12 @@
|
|||
<table id='attributes' border="0" cellspacing="0" cellpadding="0">
|
||||
<thead class="list_head">
|
||||
<tr>
|
||||
<td><%= t('admin.key') %></td>
|
||||
<td><%= t('admin.multilingual') %></td>
|
||||
<td><%= t(:key) %></td>
|
||||
<td><%= t(:multilingual) %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></td>
|
||||
<% end %>
|
||||
<td><%= t('admin.type')%></td>
|
||||
<td><%= t(:type)%></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h1><%= t('admin.editing_link') %></h1>
|
||||
<h1><%= t('editing.link') %></h1>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
|
@ -7,6 +7,6 @@
|
|||
<%= render :partial => "admin/links/form", :locals => { :f => f } %>
|
||||
|
||||
<p>
|
||||
<%= f.submit t(:update) %> <%= link_back %>
|
||||
<%= f.submit t(:update_) %> <%= link_back %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
|
|
@ -1,26 +1,59 @@
|
|||
<%= f.error_messages %>
|
||||
<%= f.hidden_field :parent, :value => @item.parent.id %>
|
||||
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
|
||||
|
||||
<p>
|
||||
<%= f.label :name, "Name" %>
|
||||
<%= f.text_field :name, :class => 'text' %>
|
||||
</p>
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t(:name), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field :name, :class => 'text input-xlarge' %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= f.fields_for :title_translations do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<p>
|
||||
<%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}" %>
|
||||
<%= f.text_field locale, :value => (@item.title_translations[locale] rescue nil) %>
|
||||
</p>
|
||||
<div class="control-group">
|
||||
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field locale, :class => 'text input-xlarge', :value => (@item.title_translations[locale] rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= f.label :is_published, t('admin.is_published') %>
|
||||
<%= f.radio_button :is_published, true %>Yes <%= f.radio_button :is_published, false %> No
|
||||
</p>
|
||||
<div class="control-group">
|
||||
<%= f.label :is_published, "#{t(:is_published)} ?", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<label class="radio">
|
||||
<%= f.radio_button :is_published, true %>
|
||||
Yes
|
||||
</label>
|
||||
<label class="radio">
|
||||
<%= f.radio_button :is_published, false %>
|
||||
No
|
||||
</label>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<%= f.label :url, "URL" %>
|
||||
<%= f.text_field :url %>
|
||||
</p>
|
||||
<div class="control-group">
|
||||
<%= f.label :menu_enabled_for, "#{t(:menu_enabled_for)}:", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox">
|
||||
<%= check_box_tag 'link[menu_enabled_for][]', valid_locale, (@item.menu_enabled_for.nil? ? true : @item.menu_enabled_for.include?(valid_locale)) %>
|
||||
<%= I18nVariable.from_locale(valid_locale) %>
|
||||
</label>
|
||||
<% end %>
|
||||
<%= hidden_field_tag 'link[menu_enabled_for][]', '' %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :url, "#{t(:url)}:", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field :url, :class => 'text input-xlarge', :value => (@item.url rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<h1><%= t('admin.new_link') %></h1>
|
||||
<h1><%= t('new.link') %></h1>
|
||||
|
||||
<%= flash_messages %>
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
|||
<%= render :partial => "admin/links/form", :locals => { :f => f } %>
|
||||
|
||||
<p>
|
||||
<%= f.submit t(:create) %> <%= link_back %>
|
||||
<%= f.submit t(:create_) %> <%= link_back %>
|
||||
</p>
|
||||
|
||||
<% end %>
|
||||
|
|
|
@ -1,24 +1,37 @@
|
|||
<%= flash_messages %>
|
||||
<p>
|
||||
<b><%= t('admin.name') %></b>
|
||||
<%= @item.name %>
|
||||
</p>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t(:url) %></label>
|
||||
<div class="controls">
|
||||
<%= @item.name %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<p>
|
||||
<b><%= "#{t('admin.title')} #{locale}" %></b>
|
||||
<%= @item.title_translations[locale] if @item.title %>
|
||||
</p>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t(:title) %></label>
|
||||
<div class="controls">
|
||||
<%= @item.title_translations[locale] if @item.title %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<b><%= t('admin.is_published') %></b>
|
||||
<%= @item.is_published.to_s %>
|
||||
</p>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t(:is_published) %></label>
|
||||
<div class="controls">
|
||||
<%= @item.is_published.to_s %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<b><%= t('admin.url') %></b>
|
||||
<%= @item.url %>
|
||||
</p>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t(:url) %></label>
|
||||
<div class="controls">
|
||||
<%= @item.url %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= link_to t(:edit), edit_admin_link_path(@item), :class => 'nav' %>
|
|
@ -5,26 +5,26 @@
|
|||
|
||||
<div id="manager_management">
|
||||
<dl id="manager">
|
||||
<dt><%= t("admin.user_role.auth.manager") %></ht>
|
||||
<dt><%= t(:manager) %></ht>
|
||||
<% @module_app.managers.each do |manager| %>
|
||||
<dd><%= manager.user.name %> <%= get_auth_by(manager) %> <%= link_to '[X]',remove_manager_admin_module_app_path(@module_app,manager),:method => :delete if if_permit_to_delete(:manager) && manager.user != current_user %> </dd>
|
||||
<% end %>
|
||||
<dd>
|
||||
<%= form_tag(assign_manager_admin_module_app_path) do %>
|
||||
<%= collection_select(:manager,:id, User.all, :id, :name, :prompt => true,:disabled => !if_permit_to_assign(:manager))%>
|
||||
<%= submit_tag t("admin.user_role.auth.add_manager") %>
|
||||
<%= submit_tag t("auth.add_manager") %>
|
||||
<% end %>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl id="sub_manager">
|
||||
<dt><%#= t("admin.user_role.auth.sub_manager") %></ht>
|
||||
<dt><%#= t(:sub_manager) %></ht>
|
||||
<%# @module_app.sub_managers.each do |manager| %>
|
||||
<dd><%#= manager.user.name %> <%#= get_auth_by(manager) %><%#= link_to '[X]',remove_sub_manager_admin_module_app_path(@module_app,manager),:method => :delete if if_permit_to_delete(:sub_manager) && manager.user != current_user %> </dd>
|
||||
<%# end %>
|
||||
<dd>
|
||||
<%#= form_tag(assign_sub_manager_admin_module_app_path) do %>
|
||||
<%#= collection_select(:sub_manager,:id, User.all, :id, :name, :prompt => true,:disabled => !if_permit_to_assign(:sub_manager))%>
|
||||
<%#= submit_tag t("admin.user_role.auth.add_sub_manager") %>
|
||||
<%#= submit_tag t("auth.add_sub_manager") %>
|
||||
<%# end %>
|
||||
</dd>
|
||||
</dl>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="modal hide fade in" id="module_app-<%=module_app.id%>">
|
||||
<div class="modal-header">
|
||||
<a class="close" data-dismiss="modal">×</a>
|
||||
<h3><%= t("admin.user_role.auth.manager") %></h3>
|
||||
<h3><%= t(:manager) %></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="clear">
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
<%= javascript_include_tag "inc/search" %>
|
||||
<%= javascript_include_tag "inc/modal-preview" %>
|
||||
<% end %>
|
||||
<%#= label_tag :fact_check_setting, t("announcement.bulletin.fact_check_setting") %>
|
||||
<%= form_tag('', :remote => true,:class => "prevent_enter_submit_form") %>
|
||||
<div class="subnav clear">
|
||||
<ul class="nav nav-pills filter pull-left">
|
||||
|
@ -19,16 +18,16 @@
|
|||
|
||||
</li>
|
||||
</ul>
|
||||
<%= link_to t("admin.user_role.auth.manager"), admin_module_app_manager_auth_show_path , :class=>'preview_trigger btn btn-success pull-right'%>
|
||||
<%= link_to t(:manager), admin_module_app_manager_auth_show_path , :class=>'preview_trigger btn btn-success pull-right'%>
|
||||
|
||||
</div>
|
||||
<%#= label_tag :role, t("admin.roles") %>
|
||||
<%#= label_tag :role, t(:roles) %>
|
||||
<div class="clear">
|
||||
<%= content_tag :div do -%>
|
||||
<% form_tag admin_module_app_manager_auth_proc_path do %>
|
||||
<%= render :partial => "layouts/users_checkbox_ary" %>
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= submit_tag "Update", :class => 'btn btn-primary' %>
|
||||
<%= submit_tag t(:update_), :class => 'btn btn-primary' %>
|
||||
</div>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
<div class="main_list">
|
||||
<%= flash_messages %>
|
||||
<div class="button_bar up">
|
||||
<% #link_to t('admin.new_user'), new_admin_user_path, :class => 'new' %>
|
||||
<% #link_to t('new.user'), new_admin_user_path, :class => 'new' %>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><%= t('admin.object_auth.title') %></td>
|
||||
<td><%= t('admin.object_auth.obj_type') %></td>
|
||||
<td><%= t(:title) %></td>
|
||||
<td><%= t(:type) %></td>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -34,6 +34,6 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<div class="button_bar">
|
||||
<%# link_to t('admin.new_user'), new_admin_user_path, :class => 'new' %>
|
||||
<%# link_to t('new.user'), new_admin_user_path, :class => 'new' %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="modal hide fade in" id="ob_auth-<%=ob_auth.id%>">
|
||||
<div class="modal-header">
|
||||
<a class="close" data-dismiss="modal">×</a>
|
||||
<h3><%= t("admin.object_auth.list_title_of_users",:auth_title => ob_auth.title) %></h3>
|
||||
<h3><%= t("object_auth.list_title_of_users",:auth_title => ob_auth.title) %></h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="clear">
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
<%= javascript_include_tag "inc/search" %>
|
||||
<%= javascript_include_tag "inc/modal-preview" %>
|
||||
<% end %>
|
||||
<%#= label_tag :fact_check_setting, t("announcement.bulletin.fact_check_setting") %>
|
||||
<%= form_tag('', :remote => true,:class => "prevent_enter_submit_form") %>
|
||||
<div class="subnav clear">
|
||||
<ul class="nav nav-pills filter pull-left">
|
||||
|
@ -20,17 +19,17 @@
|
|||
|
||||
</li>
|
||||
</ul>
|
||||
<%= link_to t("admin.object_auth.list_title_of_users",:auth_title => @ob_auth.title), admin_object_auth_ob_auth_show_path(:app_key=>@module_app.key) , :class=>'preview_trigger btn btn-success pull-right'%>
|
||||
<%= link_to t("object_auth.list_title_of_users", :auth_title => @ob_auth.title), admin_object_auth_ob_auth_show_path(:app_key=>@module_app.key), :class=>'preview_trigger btn btn-success pull-right'%>
|
||||
|
||||
</div>
|
||||
<%#= label_tag :role, t("admin.roles") %>
|
||||
<%#= label_tag :role, t(:roles) %>
|
||||
<div class="clear">
|
||||
<%= content_tag :div do -%>
|
||||
<% form_tag admin_object_auth_ob_auth_url do %>
|
||||
<%= render :partial => "layouts/users_checkbox_ary" %>
|
||||
<div class="form-actions form-fixed pagination-right">
|
||||
<%= hidden_field_tag 'app_key', @module_app.key %>
|
||||
<%= submit_tag "Update", :class => 'btn btn-primary' %>
|
||||
<%= submit_tag t(:update_), :class => 'btn btn-primary' %>
|
||||
</div>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<% LIST[:page_part_kinds].each do |kind| %>
|
||||
<%= f.radio_button :kind, kind, :class => 'part_kind' %>
|
||||
<%= t(kind, :scope => 'admin.page_part_kinds') %>
|
||||
<%= t(kind, :scope => 'page_part_kinds') %>
|
||||
<% end %>
|
||||
|
||||
<% LIST[:page_part_kinds].each do |kind| %>
|
||||
|
@ -12,6 +12,6 @@
|
|||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= f.submit t(:update) %> <%= link_back %>
|
||||
<%= f.submit t(:update_) %> <%= link_back %>
|
||||
</p>
|
||||
<% end %>
|
|
@ -2,7 +2,7 @@
|
|||
<%= f.fields_for :title_translations do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<p>
|
||||
<%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}" %>
|
||||
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}" %>
|
||||
<%= f.text_field locale, :value => (@part.title_translations[locale] rescue nil) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%= flash_messages %>
|
||||
<div id="poststuff">
|
||||
<h1><%= t('admin.editing_page') %></h1>
|
||||
<h1><%= t('editing.page') %></h1>
|
||||
<%= form_for @item, :url => admin_page_path(@item), :html => { :class => 'form-horizontal edit_page' } do |f| %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t('admin.name'), :class => 'control-label' %>
|
||||
<%= f.label :name, t(:name), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field :name, :class => 'text input-xlarge' %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
|
@ -12,7 +12,7 @@
|
|||
<%= f.fields_for :title_translations do |f| %>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<div class="control-group">
|
||||
<%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
|
||||
<%= f.label :locale, "#{t(:title)} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.text_field locale, :class => 'text input-xlarge', :value => (@item.title_translations[locale] rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
|
@ -22,21 +22,21 @@
|
|||
<% end %>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t('admin.design_name'), :class => 'control-label' %>
|
||||
<%= f.label :name, t(:template_name), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => admin_pages_path} %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t('admin.theme'), :class => 'control-label' %>
|
||||
<%= f.label :name, t(:theme), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<%= f.label :name, t('admin.module_app'), :class => 'control-label' %>
|
||||
<%= f.label :name, t(:module), :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<%= render :partial => "app_selector", :locals => { :f => f } %>
|
||||
<span id="app_page_url">
|
||||
|
@ -52,7 +52,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<%= f.label :is_published, "#{t('admin.is_published')} ?", :class => 'control-label' %>
|
||||
<%= f.label :is_published, "#{t(:is_published)} ?", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<label class="radio">
|
||||
<%= f.radio_button :is_published, true %>
|
||||
|
@ -66,7 +66,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<%= f.label :menu_enabled_for, "#{t('admin.menu_enabled_for')}:", :class => 'control-label' %>
|
||||
<%= f.label :menu_enabled_for, "#{t(:menu_enabled_for)}:", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox">
|
||||
|
@ -80,7 +80,7 @@
|
|||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<%= f.label :enabled_for, "#{t('admin.enabled_for')}:", :class => 'control-label' %>
|
||||
<%= f.label :enabled_for, "#{t(:enabled_for)}:", :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<% @site_valid_locales.each do |valid_locale| %>
|
||||
<label class="checkbox">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%= flash_messages %>
|
||||
<div id="poststuff">
|
||||
<h1><%= t('admin.new_page') %></h1>
|
||||
<h1><%= t('new.page') %></h1>
|
||||
<%= form_for @item, :url => admin_pages_path, :html => { :class => 'form-horizontal edit_page' } do |f| %>
|
||||
<%= render :partial => "form", :locals => { :f => f } %>
|
||||
<div class="form-actions">
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<div class="main2">
|
||||
<h1><%= t('admin.list_puchases') %></h1>
|
||||
<h1><%= t('list.puchase') %></h1>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td><%= t('admin.title') %></td>
|
||||
<td><%= t('admin.intro') %></td>
|
||||
<td><%= t('admin.author') %></td>
|
||||
<td><%= t('admin.action') %></td>
|
||||
<td><%= t(:title) %></td>
|
||||
<td><%= t(:intro) %></td>
|
||||
<td><%= t(:author) %></td>
|
||||
<td><%= t(:action) %></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<%# @purchases.each do |purchase| %>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<div class="attributes_block <%= @class %>">
|
||||
<h2><%= t("admin.#{@attribute_type}") %></h2>
|
||||
<h2><%= t("#{@attribute_type}") %></h2>
|
||||
<hr>
|
||||
<div class="info_input">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<thead class="list_head">
|
||||
<tr>
|
||||
<td><%= t('admin.key') %></td>
|
||||
<td><%= t(:key) %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></td>
|
||||
<% end %>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<thead class="list_head">
|
||||
<tr>
|
||||
<td><%= t('admin.key') %></td>
|
||||
<td><%= t(:key) %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></td>
|
||||
<% end %>
|
||||
|
@ -25,12 +25,12 @@
|
|||
<table class="sub_role_attributes" border="0" cellspacing="0" cellpadding="0">
|
||||
<thead class="list_head">
|
||||
<tr>
|
||||
<td><%= t('admin.key') %></td>
|
||||
<td><%= t('admin.multilingual') %></td>
|
||||
<td><%= t(:key) %></td>
|
||||
<td><%= t(:multilingual) %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></td>
|
||||
<% end %>
|
||||
<td><%= t('admin.type')%></td>
|
||||
<td><%= t(:type)%></td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% if @site && @site.registered? %>
|
||||
<%# if @site %>
|
||||
<div class="bought_btn">
|
||||
<%= t('admin.registered') %>
|
||||
<%= t(:registered) %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="buy_btn">
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<%= content_tag :li, :class => active_for_controllers('sites') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-cog') + t('admin.site_settings'), admin_site_site_info_path(@site) %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-cog') + t('site.settings'), admin_site_site_info_path(@site) %>
|
||||
|
||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('sites')) do -%>
|
||||
<%= content_tag :li, link_to(t('admin.site_info'), admin_site_site_info_path(@site)), :class => active_for_action('sites', 'site_info') %>
|
||||
<%#= content_tag :li, link_to(t('admin.system_info'), admin_site_system_info_path(@site)), :class => active_for_action('sites', 'system_info') %>
|
||||
<%#= content_tag :li, link_to(t('admin.site_language'), admin_site_language_path(@site)), :class => active_for_action('sites', 'language') %>
|
||||
<%= content_tag :li, link_to(t('admin.mail_setting'), admin_site_mail_setting_path(@site)), :class => active_for_action('sites', 'mail_setting') %>
|
||||
<%#= content_tag :li, link_to(t('admin.ui_theme'), admin_site_ui_theme_path(@site)), :class => active_for_action('sites', 'ui_theme') %>
|
||||
<%= content_tag :li, link_to(t('site_map'), admin_site_sitemap_path(@site)), :class => active_for_action('sites', 'sitemap') %>
|
||||
<%= content_tag :li, link_to(t('site.info'), admin_site_site_info_path(@site)), :class => active_for_action('sites', 'site_info') %>
|
||||
<%#= content_tag :li, link_to(t(:system_info), admin_site_system_info_path(@site)), :class => active_for_action('sites', 'system_info') %>
|
||||
<%#= content_tag :li, link_to(t('site.language'), admin_site_language_path(@site)), :class => active_for_action('sites', 'language') %>
|
||||
<%= content_tag :li, link_to(t('mail.setting'), admin_site_mail_setting_path(@site)), :class => active_for_action('sites', 'mail_setting') %>
|
||||
<%#= content_tag :li, link_to(t(:theme), admin_site_ui_theme_path(@site)), :class => active_for_action('sites', 'ui_theme') %>
|
||||
<%= content_tag :li, link_to(t('sitemap'), admin_site_sitemap_path(@site)), :class => active_for_action('sites', 'sitemap') %>
|
||||
<% end -%>
|
||||
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers('designs') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-window-block') + t('admin.design'), admin_designs_path %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-window-block') + t(:template), admin_designs_path %>
|
||||
<% end -%>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<%# if @site.up_to_date? %>
|
||||
<% if true %>
|
||||
<div class="bought_btn">
|
||||
<%= t('admin.up_to_date') %>
|
||||
<%= t(:up_to_date) %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="buy_btn">
|
||||
<%= link_to t(:update), site_update_path %>
|
||||
<%= link_to t(:update_), site_update_path %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -9,56 +9,56 @@
|
|||
<%= f.fields_for :site_settings, @site['site_settings'] do |f| %>
|
||||
<div class="form-horizontal">
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'admin.mail_address' %></label>
|
||||
<label class="control-label"><%= t 'mail.address' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :address, :value => (@site['site_settings']['address'] rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'admin.mail_port' %></label>
|
||||
<label class="control-label"><%= t 'mail.port' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :port, :value => (@site['site_settings']['port'] rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'admin.mail_domain' %></label>
|
||||
<label class="control-label"><%= t 'mail.domain' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :domain, :value => (@site['site_settings']['domain'] rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'admin.mail_authentication' %></label>
|
||||
<label class="control-label"><%= t 'mail.authentication' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :authentication, :value => (@site['site_settings']['authentication'] rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'admin.mail_user_name' %></label>
|
||||
<label class="control-label"><%= t 'mail.user_name' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :user_name, :value => (@site['site_settings']['user_name'] rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'admin.mail_password' %></label>
|
||||
<label class="control-label"><%= t 'mail.password' %></label>
|
||||
<div class="controls">
|
||||
<%= f.text_field :password, :value => (@site['site_settings']['password'] rescue nil) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'admin.mail_tls' %></label>
|
||||
<label class="control-label"><%= t 'mail.tls' %></label>
|
||||
<div class="controls">
|
||||
<%= f.check_box :tls, :checked => (@site['site_settings']['tls'].eql?('1') rescue false) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'admin.mail_enable_starttls_auto' %></label>
|
||||
<label class="control-label"><%= t 'mail.enable_starttls_auto' %></label>
|
||||
<div class="controls">
|
||||
<%= f.check_box 'enable_starttls_auto', :checked => (@site['site_settings']['enable_starttls_auto'].eql?('1') rescue false) %>
|
||||
<!-- <p class="help-block">In addition to freeform text, any HTML5 text-based input appears like so.</p> -->
|
||||
|
|
|
@ -16,63 +16,63 @@
|
|||
<div class="control-group" style="margin-bottom: 0;">
|
||||
<div class="controls">
|
||||
<label class="checkbox">
|
||||
<%= f.check_box :title_always_on %> <%= t 'admin.always_display_title' %>
|
||||
<%= f.check_box :title_always_on %> <%= t :always_display_title %>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<% @site_valid_locales.each do |locale|%>
|
||||
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'admin.site_title' %></label>
|
||||
<label class="control-label"><%= t 'site.title' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :title_translations do |f| %>
|
||||
<%= f.text_field locale, :class => "input-xxlarge", :value => (@site.title_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
<p class="help-block"><%= (t 'admin.site_title_help').html_safe %></p>
|
||||
<p class="help-block"><%= (t 'site.title_help').html_safe %></p>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'search.site_search' %></label>
|
||||
<label class="control-label"><%= t 'site.search' %></label>
|
||||
<div class="controls">
|
||||
<%= text_field_tag 'site[search][domains]',(@site.search["domains"] rescue nil), {:class => "input-xxlarge" ,:placeholder => t("search.domains") }%>
|
||||
<%= text_field_tag 'site[search][sitesearch]',(@site.search["sitesearch"] rescue nil),{ :class => "input-xxlarge" ,:placeholder => t("search.sitesearch") }%>
|
||||
<p class="help-block"><%= (t 'search.site_setting_help').html_safe %></p>
|
||||
<p class="help-block"><%= (t 'site.search_help').html_safe %></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% @site_valid_locales.each do |locale|%>
|
||||
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'admin.site_keywords' %></label>
|
||||
<label class="control-label"><%= t 'site.keywords' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :keywords do |f| %>
|
||||
<%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.keywords(locale) rescue nil) %>
|
||||
<% end %>
|
||||
<p class="help-block"><%= (t 'admin.site_keywords_help').html_safe %></p>
|
||||
<p class="help-block"><%= (t 'site.keywords_help').html_safe %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'admin.site_description' %></label>
|
||||
<label class="control-label"><%= t 'site.description' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :description do |f| %>
|
||||
<%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.description(locale) rescue nil) %>
|
||||
<% end %>
|
||||
<p class="help-block"><%= (t 'admin.site_description_help').html_safe %></p>
|
||||
<p class="help-block"><%= (t 'site.description_help').html_safe %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'admin.site_footer' %></label>
|
||||
<label class="control-label"><%= t 'site.footer' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :footer_translations do |f| %>
|
||||
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.footer_translations[locale] rescue nil) %>
|
||||
<% end %>
|
||||
<p class="help-block"><%= (t 'admin.site_footer_help').html_safe %></p>
|
||||
<p class="help-block"><%= (t 'site.footer_help').html_safe %></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label"><%= t 'admin.site_sub_menu' %></label>
|
||||
<label class="control-label"><%= t 'site.sub_menu' %></label>
|
||||
<div class="controls">
|
||||
<%= f.fields_for :sub_menu_translations do |f| %>
|
||||
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.sub_menu_translations[locale] rescue nil) %>
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
<%= I18nVariable.from_locale(locale) %>:<%= f.text_field locale %>
|
||||
<% end %>
|
||||
<%= f.hidden_field :module_app_id, :value => @module_app_id %>
|
||||
<%= f.submit %>
|
||||
<%= f.submit t(:add) %>
|
||||
<% end %>
|
|
@ -3,5 +3,5 @@
|
|||
<%= I18nVariable.from_locale(locale) %>:<%= f.text_field locale %>
|
||||
<% end %>
|
||||
<%= f.hidden_field :module_app_id, :value => tag.module_app_id %>
|
||||
<%= f.submit %>
|
||||
<%= f.submit t(:update_) %>
|
||||
<% end %>
|
|
@ -1 +0,0 @@
|
|||
<a href="#" class="edit"><%= t(:edit) %></a> | <a href="#" class="hide"><%= t(:hide) %></a>
|
|
@ -1,16 +0,0 @@
|
|||
<table>
|
||||
<tr>
|
||||
<th><%= t('admin.key') %></th>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<th style="color:<%= colorize_in_use_locale(locale) %>"><%= locale %></th>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% @language_i18n_variables.each do |var| %>
|
||||
<tr>
|
||||
<td><%= var.key %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= text_field_tag "i18n_variables[#{var.id}][#{locale}]", var[locale] %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
|
@ -1,34 +0,0 @@
|
|||
<% @vars = @i18n_variables.inject([]) do |result, var|
|
||||
result << var if var.parent_id.to_s.eql?(edit_user_attribute_model.id.to_s)
|
||||
result
|
||||
end %>
|
||||
|
||||
<fieldset>
|
||||
<legend>
|
||||
<%= edit_user_attribute_model.key %>
|
||||
<%#= render :partial => 'action_bar' %>
|
||||
</legend>
|
||||
<table>
|
||||
<tr>
|
||||
<th><%= t('admin.key') %></th>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<th style="color:<%= colorize_in_use_locale(locale) %>"><%= locale %></th>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= edit_user_attribute_model.key %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= text_field_tag "i18n_variables[#{edit_user_attribute_model.id}][#{locale}]", edit_user_attribute_model[locale] %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
|
||||
<% @vars.each do |var| %>
|
||||
<tr>
|
||||
<td><%= var.key %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= text_field_tag "i18n_variables[#{var.id}][#{locale}]", var[locale] %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</fieldset>
|
|
@ -1,16 +0,0 @@
|
|||
<table>
|
||||
<tr>
|
||||
<th><%= t('admin.key') %></th>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<th style="color:<%= colorize_in_use_locale(locale) %>"><%= locale %></th>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% @language_i18n_variables.each do |var| %>
|
||||
<tr>
|
||||
<td><%= var.key %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= var[locale] %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
|
@ -1,34 +0,0 @@
|
|||
<% @vars = @i18n_variables.inject([]) do |result, var|
|
||||
result << var if var.parent_id.to_s.eql?(user_attribute_model.id.to_s)
|
||||
result
|
||||
end %>
|
||||
|
||||
<fieldset>
|
||||
<legend>
|
||||
<%= user_attribute_model.key %>
|
||||
<%#= render :partial => 'action_bar' %>
|
||||
</legend>
|
||||
<table>
|
||||
<tr>
|
||||
<th><%= t('admin.key') %></th>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<th style="color:<%= colorize_in_use_locale(locale) %>"><%= locale %></th>
|
||||
<% end %>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><%= user_attribute_model.key %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= user_attribute_model[locale] %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
|
||||
<% @vars.each do |var| %>
|
||||
<tr>
|
||||
<td><%= var.key %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= var[locale] %></td>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</fieldset>
|
|
@ -1,39 +0,0 @@
|
|||
<div class="main2">
|
||||
<%= form_tag admin_translation_path('all'), :method => :put do %>
|
||||
<% if @language_i18n_variables.size > 0 %>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<%= t('admin.language') %>
|
||||
<%#= render :partial => 'action_bar' %>
|
||||
</legend>
|
||||
<div><%= render :partial => 'edit_language' %></div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
<% if @info_i18n_variables.size > 0 %>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<%= t('admin.user_info') %>
|
||||
<%#= render :partial => 'action_bar' %>
|
||||
</legend>
|
||||
<div><%= render :partial => 'edit_user_attribute_model', :collection => @info_i18n_variables %></div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
<% if @role_i18n_variables.size > 0 %>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<%= t('admin.user_role') %>
|
||||
<%#= render :partial => 'action_bar' %>
|
||||
</legend>
|
||||
<div><%= render :partial => 'edit_user_attribute_model', :collection => @role_i18n_variables %></div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
<div class="button_bar">
|
||||
<%= link_back %>
|
||||
<%= submit_tag t('update') %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
</div>
|
|
@ -1,72 +0,0 @@
|
|||
<div class="main2">
|
||||
<% content_for :secondary do %>
|
||||
<div class="translations_setup">
|
||||
<h1><%= t('admin.setup_translations') %></h1>
|
||||
<ul class="list">
|
||||
<li><%= link_to t(:edit), edit_admin_translation_path('all'), :class => 'button positive' %></li>
|
||||
<li>
|
||||
<%= t('admin.add_language') %>:
|
||||
<%= form_tag admin_translation_path('add'), :method => :put do %>
|
||||
<%= text_field_tag 'language', '', :style => "width:100px" %>
|
||||
<%= submit_tag t(:add) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= t('admin.enable_language') %>:
|
||||
<%= form_tag admin_translation_path('enable'), :method => :put do %>
|
||||
<%= select_tag 'enable_language', options_for_select(@site_valid_locales - @site_in_use_locales), :style => "width:100px" %>
|
||||
<%= submit_tag t(:enable) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= t('admin.disable_language') %>:
|
||||
<%= form_tag admin_translation_path('disable'), :method => :put do %>
|
||||
<%= select_tag 'disable_language', options_for_select(@site_in_use_locales), :style => "width:100px" %>
|
||||
<%= submit_tag t(:disable) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= t('admin.delete_language') %>:
|
||||
<%= form_tag admin_translation_path('delete'), :method => :put do %>
|
||||
<%= select_tag 'delete_language', options_for_select(@site_valid_locales), :style => "width:100px" %>
|
||||
<%= submit_tag t(:delete), :confirm => t('sure?') %>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
<% if @language_i18n_variables.size > 0 %>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<%= t('admin.language') %>
|
||||
<%#= render :partial => 'action_bar' %>
|
||||
</legend>
|
||||
<div><%= render :partial => 'language' %></div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
<% if @info_i18n_variables.size > 0 %>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<%= t('admin.user_info') %>
|
||||
<%#= render :partial => 'action_bar' %>
|
||||
</legend>
|
||||
<div><%= render :partial => 'user_attribute_model', :collection => @user_info_model_i18n_variables %></div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
<% if @role_i18n_variables.size > 0 %>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<%= t('admin.user_role') %>
|
||||
<%#= render :partial => 'action_bar' %>
|
||||
</legend>
|
||||
<div><%= render :partial => 'user_attribute_model', :collection => @user_role_model_i18n_variables %></div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<%= javascript_include_tag "translation_page" %>
|
||||
<% end -%>
|
||||
</div>
|
|
@ -7,15 +7,15 @@
|
|||
<%= file_field_tag 'file' %>
|
||||
<%= hidden_field_tag :avatar_cache %>
|
||||
<label>
|
||||
<span><%= t('admin.email') %>:</span>
|
||||
<%= f.text_field :email, :onfocus => "this.value='';", :onblur => "if(this.value==''){this.value=#{t('admin.email')};}", :value => (@user.email.blank? ? t('admin.email') : @user.email), :class => 'user_mail' %>
|
||||
<span><%= t(:email) %>:</span>
|
||||
<%= f.text_field :email, :onfocus => "this.value='';", :onblur => "if(this.value==''){this.value=#{t(:email)};}", :value => (@user.email.blank? ? t(:email) : @user.email), :class => 'user_mail' %>
|
||||
</label>
|
||||
<label>
|
||||
<%= f.check_box :admin %>
|
||||
<span><%= t('admin.admin') %>:</span>
|
||||
<span><%= t(:admin) %>:</span>
|
||||
</label>
|
||||
<label>
|
||||
<span><%= t('admin.role') %>:</span>
|
||||
<span><%= t(:role) %>:</span>
|
||||
<%= f.select :role_id, @roles.sort_by{|role| role.key }.collect {|role| [ role.title, role.id ]}, :selected => (@user.role_id || Role.get_role_from_key('student')) %>
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<thead class="list_head">
|
||||
<tr>
|
||||
<td><%= t("admin.key") %></td>
|
||||
<td><%= t(:key) %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></td>
|
||||
<% end %>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="info_input">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<thead class="list_head">
|
||||
<td><%= t("admin.key") %></td>
|
||||
<td><%= t(:key) %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></td>
|
||||
<% end %>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<input id="user_search" name="user[username]" size="30" type="text" />
|
||||
</div>
|
||||
<div class="member_setup <%= @class %>">
|
||||
<h1><%= t('admin.setup_member') %></h1>
|
||||
<h1><%= t(:setup_member) %></h1>
|
||||
<ul class="list">
|
||||
<li class="set_1"><%= link_to content_tag(:span, t('admin.list_users')), admin_users_path %></li>
|
||||
<li class="set_2"><%= link_to content_tag(:span, t('admin.list_roles')), admin_roles_path %></li>
|
||||
<li class="set_3"><%= link_to content_tag(:span, t('admin.list_infos')), admin_infos_path %></li>
|
||||
<li class="set_1"><%= link_to content_tag(:span, t('list.user')), admin_users_path %></li>
|
||||
<li class="set_2"><%= link_to content_tag(:span, t('list.role')), admin_roles_path %></li>
|
||||
<li class="set_3"><%= link_to content_tag(:span, t('list.info')), admin_infos_path %></li>
|
||||
</ul>
|
||||
</div>
|
|
@ -4,7 +4,7 @@
|
|||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<thead class="list_head">
|
||||
<tr>
|
||||
<td><%= t("admin.key") %></td>
|
||||
<td><%= t(:key) %></td>
|
||||
<% @site_valid_locales.each do |locale| %>
|
||||
<td><%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></td>
|
||||
<% end %>
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
<div class="main_list clear">
|
||||
<%= flash_messages %>
|
||||
<div class="button_bar up">
|
||||
<%= link_to t('admin.new_user'), new_admin_user_path, :class => 'new' %>
|
||||
<%= link_to t('new.user'), new_admin_user_path, :class => 'new' %>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="roles"><%= t('admin.role') %></td>
|
||||
<td class="name"><%= t('admin.name') %></td>
|
||||
<td class="email"><%= t('admin.email') %></td>
|
||||
<td class="admin"><%= t('admin.admin') %></td>
|
||||
<td class="action"><%= t('admin.action') %></td>
|
||||
<td class="roles"><%= t(:role) %></td>
|
||||
<td class="name"><%= t(:name) %></td>
|
||||
<td class="email"><%= t(:email) %></td>
|
||||
<td class="admin"><%= t(:admin) %></td>
|
||||
<td class="action"><%= t(:action) %></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -37,6 +37,6 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<div class="button_bar">
|
||||
<%= link_to t('admin.new_user'), new_admin_user_path, :class => 'new' %>
|
||||
<%= link_to t('new.user'), new_admin_user_path, :class => 'new' %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<ul id="orblist">
|
||||
<li><%= link_to t('homepage'), root_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t('admin.item'), admin_items_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t('admin.design'), admin_designs_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t('admin.purchase'), admin_purchases_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t('admin.asset'), admin_assets_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t('admin.member'), admin_users_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t('admin.translation'), admin_translations_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t('admin.site'), admin_sites_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t(:homepage), root_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t(:item), admin_items_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t(:template), admin_designs_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t(:purchase), admin_purchases_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t(:asset), admin_assets_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t(:member), admin_users_path, :class => 'orblink' %></li>
|
||||
<li><%= link_to t(:site_), admin_sites_path, :class => 'orblink' %></li>
|
||||
</ul>
|
|
@ -5,14 +5,14 @@
|
|||
<% if !current_user.nil? %>
|
||||
<a class="brand dropdown-toggle" data-toggle="dropdown" href="#">Orbit</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-dashboard') + t('admin.dashboard'), admin_dashboards_path %></li>
|
||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-content') + t('admin.content') %></li>
|
||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), admin_users_path %></li>
|
||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-asset') + t('admin.asset'), admin_assets_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-dashboard') + t(:dashboard_), admin_dashboards_path %></li>
|
||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-content') + t(:content) %></li>
|
||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-member') + t(:member), admin_users_path %></li>
|
||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-asset') + t(:asset), admin_assets_path %></li>
|
||||
<li class="divider"></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-structure') + t('admin.structure'), admin_items_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-cog') + t('admin.site_settings'), admin_site_site_info_path(@site) %></li>
|
||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-plus-cube') + t('admin.add_item') %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-structure') + t(:structure), admin_items_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-cog') + t('site.settings'), admin_site_site_info_path(@site) %></li>
|
||||
<li><%#= link_to content_tag(:i, nil, :class => 'icons-plus-cube') + t(:add_item) %></li>
|
||||
</ul>
|
||||
<% else %>
|
||||
<a class="brand dropdown-toggle" data-toggle="dropdown" href="/">Orbit</a>
|
||||
|
|
|
@ -1,78 +1,78 @@
|
|||
<%#= content_tag :li, :class => active_for_controllers('purchases') do -%>
|
||||
<%#= link_to content_tag(:i, nil, :class => 'icons-purchase') + t('admin.purchase'), admin_purchases_path %>
|
||||
<%#= link_to content_tag(:i, nil, :class => 'icons-purchase') + t(:purchase), admin_purchases_path %>
|
||||
<%# end -%>
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<%= javascript_include_tag "/static/kernel.js" %>
|
||||
<% end %>
|
||||
|
||||
<%= content_tag :li, :class => (active_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals') || active_for_app_auth('Announcement') || active_for_ob_auths_object("BulletinCategory") ) do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t('admin.announcement'), panel_announcement_back_end_bulletins_path %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t('announcement.announcement'), panel_announcement_back_end_bulletins_path %>
|
||||
<%= content_tag :ul, :class => ("nav nav-list " + (visible_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys', 'approvals')||active_for_ob_auths_object("BulletinCategory"))) do -%>
|
||||
<%= content_tag :li, link_to(t('announcement.all_articles'), panel_announcement_back_end_bulletins_path), :class => active_for_action('bulletins', 'index') %>
|
||||
<%= content_tag :li, link_to(t('announcement.add_new'), new_panel_announcement_back_end_bulletin_path), :class => active_for_action('bulletins', 'new') %>
|
||||
<%= content_tag :li, link_to(t('announcement.categories'), panel_announcement_back_end_bulletin_categorys_path), :class =>( active_for_action('bulletin_categorys', 'index') || active_for_ob_auths_object("BulletinCategory") ) %>
|
||||
<%= content_tag :li, link_to(t('announcement.tags'), panel_announcement_back_end_tags_path), :class => active_for_action('/panel/announcement/back_end/tags', 'index') %>
|
||||
<%= content_tag :li, link_to(t('announcement.bulletin.approval_setting'), panel_announcement_back_end_approval_setting_path), :class => active_for_action('approvals', 'setting') if (is_manager? rescue true) %>
|
||||
<%= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "Announcement"}))), :class => active_for_app_auth('Announcement') if (is_admin? rescue nil) %>
|
||||
<%= content_tag :li, link_to(t(:list_), panel_announcement_back_end_bulletins_path), :class => active_for_action('bulletins', 'index') %>
|
||||
<%= content_tag :li, link_to(t(:add), new_panel_announcement_back_end_bulletin_path), :class => active_for_action('bulletins', 'new') %>
|
||||
<%= content_tag :li, link_to(t(:categories), panel_announcement_back_end_bulletin_categorys_path), :class =>( active_for_action('bulletin_categorys', 'index') || active_for_ob_auths_object("BulletinCategory") ) %>
|
||||
<%= content_tag :li, link_to(t(:tags), panel_announcement_back_end_tags_path), :class => active_for_action('/panel/announcement/back_end/tags', 'index') %>
|
||||
<%= content_tag :li, link_to(t('approval.setting'), panel_announcement_back_end_approval_setting_path), :class => active_for_action('approvals', 'setting') if (is_manager? rescue true) %>
|
||||
<%= content_tag :li, link_to(t(:module_authorization),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "Announcement"}))), :class => active_for_app_auth('Announcement') if (is_admin? rescue nil) %>
|
||||
|
||||
<% end -%>
|
||||
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class =>( active_for_controllers('news_bulletins', '/panel/news/back_end/tags', 'news_bulletin_categorys', 'news_approvals')|| active_for_app_auth('news') || active_for_ob_auths_object("NewsBulletinCategory")) do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t('admin.news'), panel_news_back_end_news_bulletins_path %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t(: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'), panel_news_back_end_news_bulletins_path), :class => active_for_action('news_bulletins', 'index') %>
|
||||
<%= content_tag :li, link_to(t('announcement.add_new'), new_panel_news_back_end_news_bulletin_path), :class => active_for_action('news_bulletins', 'new') %>
|
||||
<%= content_tag :li, link_to(t('announcement.categories'), panel_news_back_end_news_bulletin_categorys_path), :class => active_for_action('news_bulletin_categorys', 'index') || active_for_ob_auths_object("NewsBulletinCategory") %>
|
||||
<%= content_tag :li, link_to(t('announcement.tags'), panel_news_back_end_tags_path), :class => active_for_action('/panel/news/back_end/tags', 'index') %>
|
||||
<%= content_tag :li, link_to(t('announcement.bulletin.approval_setting'), panel_news_back_end_approval_setting_path), :class => active_for_action('news_approvals', 'setting') if (is_manager? rescue true) %>
|
||||
<%= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: "news"}))), :class => active_for_app_auth('news') if (is_admin? rescue nil) %>
|
||||
<%= content_tag :li, link_to(t(:list_), panel_news_back_end_news_bulletins_path), :class => active_for_action('news_bulletins', 'index') %>
|
||||
<%= content_tag :li, link_to(t(:add), new_panel_news_back_end_news_bulletin_path), :class => active_for_action('news_bulletins', 'new') %>
|
||||
<%= content_tag :li, link_to(t(:categories), panel_news_back_end_news_bulletin_categorys_path), :class => active_for_action('news_bulletin_categorys', 'index') || active_for_ob_auths_object("NewsBulletinCategory") %>
|
||||
<%= content_tag :li, link_to(t(:tags), panel_news_back_end_tags_path), :class => active_for_action('/panel/news/back_end/tags', 'index') %>
|
||||
<%= content_tag :li, link_to(t('approval.setting'), panel_news_back_end_approval_setting_path), :class => active_for_action('news_approvals', 'setting') if (is_manager? rescue true) %>
|
||||
<%= content_tag :li, link_to(t(:module_authorization),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 %>
|
||||
<%#= link_to content_tag(:i, nil, :class => 'icons-member') + t(:member), admin_users_path %>
|
||||
<%# end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers('page_contexts') || active_for_app_auth('page_content') || active_for_ob_auths_object("PageContext") do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-page') + t('admin.page'), panel_page_content_back_end_page_contexts_path %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-page') + t(:page), panel_page_content_back_end_page_contexts_path %>
|
||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('page_contexts')) do -%>
|
||||
<%#= content_tag :li, link_to(t('admin.all_articles'), panel_page_content_back_end_page_contexts_path), :class => active_for_action('page_context', 'index') %>
|
||||
<%= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "page_content"}))), :class => active_for_app_auth('page_content') if (is_admin? rescue nil) %>
|
||||
<%#= content_tag :li, link_to(t(:list_), panel_page_content_back_end_page_contexts_path), :class => active_for_action('page_context', 'index') %>
|
||||
<%= content_tag :li, link_to(t(:module_authorization),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "page_content"}))), :class => active_for_app_auth('page_content') if (is_admin? rescue nil) %>
|
||||
<% end -%>
|
||||
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers('ad_banners', 'ad_images') ||active_for_ob_auths_object("AdBanner") ||active_for_app_auth('ad_banners') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.ad_banner'), admin_ad_banners_path %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-link') + t(:ad_banner), admin_ad_banners_path %>
|
||||
|
||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('ad_banners', 'ad_images') ) do -%>
|
||||
<%#= content_tag :li, link_to(t('admin.ad.all_banners'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %>
|
||||
<%#= content_tag :li, link_to(t('admin.ad.new_banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %>
|
||||
<%#= content_tag :li, link_to(t('admin.ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %>
|
||||
<%= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "ad_banners"}))), :class => active_for_app_auth('ad_banners') if (is_admin? rescue nil) %>
|
||||
<%#= content_tag :li, link_to(t('list.ad_banner'), admin_ad_banners_path), :class => active_for_action('ad_banners', 'index') %>
|
||||
<%#= content_tag :li, link_to(t('new.banner'), new_admin_ad_banner_path), :class => active_for_action('ad_banners', 'new') %>
|
||||
<%#= content_tag :li, link_to(t('ad.new_image'), new_ad_image_admin_ad_banners_path), :class => active_for_action('ad_images', 'new') %>
|
||||
<%= content_tag :li, link_to(t(:module_authorization),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "ad_banners"}))), :class => active_for_app_auth('ad_banners') if (is_admin? rescue nil) %>
|
||||
<% end -%>
|
||||
<% end %>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys') || active_for_app_auth('web_resource') || active_for_ob_auths_object("WebLinkCategory") do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.link'), panel_web_resource_back_end_web_links_path %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-link') + t(:link), panel_web_resource_back_end_web_links_path %>
|
||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('web_links', '/panel/web_resource/back_end/tags', 'web_link_categorys')) do -%>
|
||||
<%= content_tag :li, link_to(t('admin.all_articles'), panel_web_resource_back_end_web_links_path), :class => active_for_action('web_links', 'index') %>
|
||||
<%= content_tag :li, link_to(t('announcement.add_new'), new_panel_web_resource_back_end_web_link_path), :class => active_for_action('web_links', 'new') %>
|
||||
<%= content_tag :li, link_to(t('announcement.categories'), panel_web_resource_back_end_web_link_categorys_path), :class => (active_for_action('web_link_categorys', 'index') || active_for_ob_auths_object("WebLinkCategory")) %>
|
||||
<%= content_tag :li, link_to(t('announcement.tags'), panel_web_resource_back_end_tags_path), :class => active_for_action('/panel/web_resource/back_end/tags', 'index') %>
|
||||
<%= content_tag :li, link_to(t('admin.module.authorization'),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "web_resource"}))), :class => active_for_app_auth('web_resource') if (is_admin? rescue nil) %>
|
||||
<%= content_tag :li, link_to(t(:list_), panel_web_resource_back_end_web_links_path), :class => active_for_action('web_links', 'index') %>
|
||||
<%= content_tag :li, link_to(t(:add), new_panel_web_resource_back_end_web_link_path), :class => active_for_action('web_links', 'new') %>
|
||||
<%= content_tag :li, link_to(t(:categories), panel_web_resource_back_end_web_link_categorys_path), :class => (active_for_action('web_link_categorys', 'index') || active_for_ob_auths_object("WebLinkCategory")) %>
|
||||
<%= content_tag :li, link_to(t(:tags), panel_web_resource_back_end_tags_path), :class => active_for_action('/panel/web_resource/back_end/tags', 'index') %>
|
||||
<%= content_tag :li, link_to(t(:module_authorization),admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: "web_resource"}))), :class => active_for_app_auth('web_resource') if (is_admin? rescue nil) %>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
<%#= content_tag :li, :class => active_for_controllers('assets', '/admin/asset_tags', 'asset_categories') do -%>
|
||||
<%#= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.asset'), admin_assets_path %>
|
||||
<%#= link_to content_tag(:i, nil, :class => 'icons-link') + t(:asset), admin_assets_path %>
|
||||
<%#= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('assets', '/admin/asset_tags', 'asset_categories')) do -%>
|
||||
<%#= content_tag :li, link_to(t('admin.all_assets'), admin_assets_path), :class => active_for_action('assets', 'index') %>
|
||||
<%#= content_tag :li, link_to(t('admin.categories'), admin_asset_categories_path), :class => active_for_action('asset_categories', 'index') %>
|
||||
<%#= content_tag :li, link_to(t('admin.tags'), admin_asset_tags_path), :class => active_for_action('/admin/asset_tags', 'index') %>
|
||||
<%#= content_tag :li, link_to(t('list.asset'), admin_assets_path), :class => active_for_action('assets', 'index') %>
|
||||
<%#= content_tag :li, link_to(t(:categories), admin_asset_categories_path), :class => active_for_action('asset_categories', 'index') %>
|
||||
<%#= content_tag :li, link_to(t(:tags), admin_asset_tags_path), :class => active_for_action('/admin/asset_tags', 'index') %>
|
||||
<%# end -%>
|
||||
<%# end -%>
|
||||
<div class="content">
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>R4</title>
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<%= yield :page_specific_link %>
|
||||
<%= stylesheet_link_tag "application" %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
<%= csrf_meta_tag %>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
|
||||
<div id="banner_link" style='text-align:right'>
|
||||
<ul class="hmenu">
|
||||
<li>
|
||||
<%= render 'layouts/lang_menu' %>
|
||||
</li>
|
||||
<%= render 'devise/menu/login_items' %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="header">
|
||||
|
||||
<h1>RulingSite Panel</h1>
|
||||
|
||||
<ul id="nav">
|
||||
<li><%= link_to t('panel.home'), root_path %></li>
|
||||
<li><%= link_to t('panel.user'), panel_users_path %></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div class="main"><%= yield %></div>
|
||||
<div class="secondary"><%= yield :secondary %></div>
|
||||
<div class="tertiary"><%= yield :tertiary %></div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<p>Rulingcom</p>
|
||||
</div>
|
||||
</div>
|
||||
<%= yield :page_specific_javascript %>
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +1,6 @@
|
|||
<div class="checkblock">
|
||||
<div class="for_unit" style="display:none;"> <%= user.cache_dept[I18n.locale.to_s] rescue ''%></div>
|
||||
<%= content_tag :div,:data=>{'original-title'=>t('announcement.bulletin.approval_setting_window_title'),:content => (user.cache_dept[I18n.locale.to_s] rescue '')},:class=>"checkbox clear" do %>
|
||||
<%= content_tag :div,:data=>{'original-title' => t(:title),:content => (user.cache_dept[I18n.locale.to_s] rescue '')},:class=>"checkbox clear" do %>
|
||||
<div class="check-icon">
|
||||
</div>
|
||||
<div class='member-avatar'>
|
||||
|
|
|
@ -15,7 +15,7 @@ module MiddleSiteConnection
|
|||
}
|
||||
|
||||
def self.establish
|
||||
$mid_site_connection = Mysql2::Client.new(@mid_host)
|
||||
# $mid_site_connection = Mysql2::Client.new(@mid_host)
|
||||
end
|
||||
|
||||
end
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue