clean up useless flash msgs. add i18n vars for app auth and object auth
This commit is contained in:
parent
17635a2cf2
commit
a803309380
|
@ -57,7 +57,7 @@ class ApplicationController < ActionController::Base
|
|||
if is_admin?
|
||||
true
|
||||
else
|
||||
flash[:notice] = "Access Denied for you are not Admin"
|
||||
flash[:error] = t("admin.access.denied.not_admin")
|
||||
auth_failed_in_backend
|
||||
end
|
||||
end
|
||||
|
@ -66,7 +66,7 @@ class ApplicationController < ActionController::Base
|
|||
if is_manager?
|
||||
true
|
||||
else
|
||||
flash[:notice] = "Access Denied for you are not Manager for this app"
|
||||
flash[:error] = t("admin.access.denied.app.not_manager")
|
||||
auth_failed_in_backend
|
||||
end
|
||||
end
|
||||
|
@ -75,7 +75,7 @@ class ApplicationController < ActionController::Base
|
|||
if (@module_app.sub_managing_users.include?(current_user) || is_manager?)
|
||||
true
|
||||
else
|
||||
flash[:notice] = "Access Denied for you are not SubManager for this app"
|
||||
flash[:error] = t("admin.access.denied.app.not_sub_manager")
|
||||
auth_failed_in_backend
|
||||
end
|
||||
end
|
||||
|
@ -84,13 +84,13 @@ class ApplicationController < ActionController::Base
|
|||
if (@module_app.app_auth.auth_users.include?(current_user) || for_app_sub_manager )
|
||||
true
|
||||
else
|
||||
flash[:notice] = "Access Denied for you are not User for this app"
|
||||
flash[:error] = t("admin.access.denied.app.not_authed_user")
|
||||
auth_failed_in_backend
|
||||
end
|
||||
end
|
||||
|
||||
def check_object_premission(obj,title)
|
||||
flash[:notice] = "Access Denied for you don't have permission for this object"
|
||||
flash[:error] = t("admin.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
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
<%= flash_messages %>
|
||||
|
||||
<div id="isotope">
|
||||
<div class="item element">
|
||||
<h3><i class="icons-content"></i><a href=""><%= t(:content) %></a></h3>
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
<% content_for :page_specific_javascript do %>
|
||||
<%= javascript_include_tag "/static/kernel.js" %>
|
||||
<% end %>
|
||||
<%= flash_messages %>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys','module_apps', 'approvals') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t('admin.announcement'), panel_announcement_back_end_bulletins_path %>
|
||||
|
|
|
@ -65,6 +65,14 @@ en:
|
|||
traffic: Traffic
|
||||
|
||||
admin:
|
||||
access:
|
||||
denied:
|
||||
app:
|
||||
not_sub_manager: Access Denied for you are not SubManager for this app
|
||||
not_manager: Access Denied for you are not SubManager for this app
|
||||
not_authed_user: Access Denied for you are not User for this app
|
||||
not_admin: Access Denied for you are not Admin
|
||||
object: "Access Denied for you don't have permission for this object"
|
||||
action: Action
|
||||
ad_banner: AD Banner
|
||||
ad:
|
||||
|
|
|
@ -8,12 +8,12 @@ zh_tw:
|
|||
back: 回上一步
|
||||
browse: 選擇檔案
|
||||
cancel: 取消
|
||||
create: 創建
|
||||
create: 新增
|
||||
delete: 刪除
|
||||
desktop: 桌面
|
||||
disable: 禁用
|
||||
dots: …
|
||||
downloaded: 已經下載
|
||||
downloaded: 已下載
|
||||
download: 下載
|
||||
edit: 編輯
|
||||
email: 電子郵件
|
||||
|
@ -47,7 +47,7 @@ zh_tw:
|
|||
file_type: 檔案類型
|
||||
hits: 點擊率
|
||||
item: 項目
|
||||
member: 成員
|
||||
member: 會員
|
||||
module: 模組
|
||||
most_visited_page: 熱門頁面
|
||||
quantity: 數量
|
||||
|
@ -62,6 +62,14 @@ zh_tw:
|
|||
traffic: 流量
|
||||
|
||||
admin:
|
||||
access:
|
||||
denied:
|
||||
app:
|
||||
not_sub_manager: 拒絕存取因你不是此應用程式次管理員
|
||||
not_manager: 拒絕存取因你不是此應用程式管理員
|
||||
not_authed_user: 拒絕存取因你不是此應用程式授權使用者
|
||||
not_admin: 拒絕存取因你不是此應用程式次管理員
|
||||
object: 拒絕存取因你不是網站管理者
|
||||
action: 操作
|
||||
ad_banner: 廣告輪播
|
||||
ad:
|
||||
|
@ -81,7 +89,7 @@ zh_tw:
|
|||
add_item: 新增項目
|
||||
add_language: 新增語言
|
||||
add_drop_down_item: +增加Orbit選單
|
||||
admin: 管理
|
||||
admin: 網站管理者
|
||||
all_articles: 列表
|
||||
announcement: 公告管理
|
||||
asset: 資產
|
||||
|
@ -94,22 +102,22 @@ zh_tw:
|
|||
author: 作者
|
||||
calendar: 行事曆
|
||||
cant_delete_self: 您不可以刪除自己。
|
||||
cant_revoke_self_admin: 您不可以撤銷自己的管理作用。
|
||||
cant_revoke_self_admin: 您不可以撤銷自己的管理身份。
|
||||
choose_file: 請選擇一個文件...
|
||||
class: 階級
|
||||
content: 內容
|
||||
create_error_link: 創建連接時出錯。
|
||||
create_error_page: 創建頁面時出錯。
|
||||
create_success_home: 首頁已成功創建。
|
||||
create_success_layout: 樣板已成功創建。
|
||||
create_success_link: 連結已成功創建。
|
||||
create_success_page: 頁面已成功創建。
|
||||
create_success_home: 首頁已成功創建。
|
||||
create_success_layout: 佈局已成功創建。
|
||||
create_success_link: 連結已成功創建。
|
||||
create_success_page: 頁面已成功創建。
|
||||
create_success_snippet: 片段已成功創建。
|
||||
create_success_user: 用戶已成功創建。。
|
||||
create_error_link: 新增連接時出錯。
|
||||
create_error_page: 新增頁面時出錯。
|
||||
create_success_home: 首頁已成功新增。
|
||||
create_success_layout: 樣板已成功新增。
|
||||
create_success_link: 連結已成功新增。
|
||||
create_success_page: 頁面已成功新增。
|
||||
create_success_home: 首頁已成功新增。
|
||||
create_success_layout: 佈局已成功新增。
|
||||
create_success_link: 連結已成功新增。
|
||||
create_success_page: 頁面已成功新增。
|
||||
create_success_snippet: 片段已成功新增。
|
||||
create_success_user: 用戶已成功新增。。
|
||||
dashboard: 儀表板
|
||||
data: 資料數據
|
||||
delete_language: 刪除語言
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
$(document).ready(function() {
|
||||
$.each($(".notice"),function(k,v){ alert("EMPTY Cate");});
|
||||
|
||||
$.each($(".dymanic_load"),function(){
|
||||
if($(this).attr("path")==''){$(this).html("App setting Failed");}
|
||||
|
|
|
@ -83,7 +83,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||
# @bulletin.bulletin_files.new
|
||||
|
||||
if get_categorys.empty?
|
||||
flash[:notice] = "You dont have any permission for post on cate"
|
||||
flash[:alert] = t("announcement.error.no_avilb_cate_for_posting")
|
||||
redirect_to :action => :index
|
||||
else
|
||||
get_tags
|
||||
|
|
|
@ -58,6 +58,8 @@ en:
|
|||
announcement:
|
||||
all_articles: List
|
||||
add_new: Add
|
||||
error:
|
||||
no_avilb_cate_for_posting: You need a category to submit your post,please contact admin
|
||||
sure?: Sure?
|
||||
campus_news: Campus News
|
||||
more: more+
|
||||
|
|
|
@ -37,6 +37,8 @@ zh_tw:
|
|||
announcement:
|
||||
add_new: 新增
|
||||
all_articles: 列表
|
||||
error:
|
||||
no_avilb_cate_for_posting: 您目前沒有分類可以刊登公告,請聯絡系統管理員為您開通分類
|
||||
tags: 標籤
|
||||
categories: 分類
|
||||
status: 狀態
|
||||
|
|
Reference in New Issue