forked from saurabh/orbit4-5
Update category, tag and some translations
This commit is contained in:
parent
48f3f96528
commit
9987e4290b
|
@ -83,8 +83,8 @@ module OrbitBackendHelper
|
|||
render :partial => '/admin/categories/select_form', :locals => {:f=> f, :module_app=>module_app, :categories=>module_app.categories.enabled }
|
||||
end
|
||||
|
||||
def select_tag(f, module_app, object)
|
||||
render :partial => '/admin/tags/tag_form', :locals => {:f=> f, :module_app=>module_app, :object=>object, :tags=>module_app.tags }
|
||||
def select_tag(f, module_app)
|
||||
render :partial => '/admin/tags/tag_form', :locals => {:f=> f, :module_app=>module_app, :tags=>module_app.tags }
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<div class="controls" data-toggle="buttons-checkbox">
|
||||
<span id="select_tags">
|
||||
<span id="select_tags">
|
||||
<div class="controls" data-toggle="buttons-checkbox">
|
||||
<% tags.each do |tag| %>
|
||||
<label class="checkbox inline btn <%= 'active' if object.tags.include?(tag) %>">
|
||||
<%= check_box_tag "#{object.class.name.camelize(:lower)}[tags][]", tag.id, object.tags.include?(tag) %> <%= tag.name %>
|
||||
<label class="checkbox inline btn <%= 'active' if f.object.tags.include?(tag) %>">
|
||||
<%= check_box_tag "#{f.object.class.name.underscore}[tags][]", tag.id, f.object.tags.include?(tag) %> <%= tag.name %>
|
||||
</label>
|
||||
<% end %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
<button id="add_tag_btn" class="btn" data-toggle="modal" data-target="#tagModal" style="margin-left: <%= tags.blank? ? "10" : "180" %>px">
|
||||
<i class='icon-plus'></i> <%= t(:new_tag) %>
|
||||
</button>
|
||||
|
@ -53,8 +53,8 @@
|
|||
type : "post",
|
||||
data: $("input[name^='tag']").serialize(),
|
||||
}).done(function(data){
|
||||
$("#select_tags").append('<label class="checkbox inline btn active">'+
|
||||
'<input id="<%= object.class.name.camelize(:lower) %>_tags_" name="<%= object.class.name.camelize(:lower) %>[tags][]" type="checkbox" value="'+data.id+'" checked>'+data.name+'</label>');
|
||||
$("#select_tags .controls").append('<label class="checkbox inline btn active">'+
|
||||
'<input id="<%= f.object.class.name.underscore %>_tags_" name="<%= f.object.class.name.underscore %>[tags][]" type="checkbox" value="'+data.id+'" checked>'+data.name+'</label>');
|
||||
$("#add_tag_btn").css("margin-left", "180px");
|
||||
$('#tagModal').modal('hide');
|
||||
});
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
<% if @is_module_tag %>
|
||||
<div class="select_default tags tab-pane fade">
|
||||
<input id="filter-default-tag" class="search-query" type="text" placeholder="Search Tags" value="">
|
||||
<input id="filter-default-tag" class="search-query" type="text" placeholder="<%= t('search.tags') %>" value="">
|
||||
<%= form_tag add_from_default_admin_module_app_tags_path(:module_app_id=>@module_app.id), id: "filter-default-tag", method: :post, remote: true do %>
|
||||
<fieldset>
|
||||
<ul class="add-default-tags-list tags-groups checkbox-card">
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
OrbitApp.registration "Tag", type: 'ModuleApp' do
|
||||
module_label 'module_name.tag'
|
||||
module_label 'tag'
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
|
||||
authorizable
|
||||
|
||||
side_bar do
|
||||
head_label_i18n 'module_name.tag', icon_class: "icons-tag"
|
||||
head_label_i18n 'tags', icon_class: "icons-tag"
|
||||
head_link_path "admin_tags_path"
|
||||
active_for_controllers (['admin/tags'])
|
||||
|
||||
|
|
|
@ -74,4 +74,4 @@ zh_tw:
|
|||
category: 更新類別時發生錯誤
|
||||
tag: 更新標籤時發生錯誤
|
||||
url_alt: 註解
|
||||
use_default: Use Default
|
||||
use_default: 使用預設
|
||||
|
|
|
@ -28,6 +28,42 @@ zh_tw:
|
|||
password: 密碼
|
||||
all: 全部
|
||||
add: 新增
|
||||
basic: 基本
|
||||
title: 標題
|
||||
url: 網址
|
||||
description: 描述
|
||||
new_: 新增
|
||||
category: 類別
|
||||
categories: 類別
|
||||
new_category: 新增類別
|
||||
tags: 標籤
|
||||
new_tag: 新增標籤
|
||||
authorization: 授權
|
||||
list_: 列表
|
||||
status: 狀態
|
||||
top: 置頂
|
||||
hot: 熱門
|
||||
hide: 隱藏
|
||||
is_top: 置頂
|
||||
is_hot: 熱門
|
||||
is_hidden: 隱藏
|
||||
close: 關閉
|
||||
clear: 清除
|
||||
create_: 建立
|
||||
start_date: 開始日期
|
||||
end_date: 結束日期
|
||||
last_modified: 最後修改者
|
||||
subtitle: 副標題
|
||||
content: 內容
|
||||
link: 連結
|
||||
file_: 檔案
|
||||
preview: 預覽
|
||||
image: 封面圖片
|
||||
member_: 成員
|
||||
help: 幫助
|
||||
frequency: 頻率
|
||||
edit: 編輯
|
||||
delete_: 刪除
|
||||
|
||||
site:
|
||||
system_preference: 系統狀態
|
||||
|
@ -66,5 +102,6 @@ zh_tw:
|
|||
register: 註冊
|
||||
registered: 已註冊
|
||||
|
||||
module: 模組
|
||||
module_name:
|
||||
category: 類別
|
||||
|
|
Loading…
Reference in New Issue