fix 1.page_content user empty problem

2.add i18n variable for news and announcement
This commit is contained in:
Matthew K. Fu JuYuan 2012-06-26 10:04:40 +08:00
parent ffd95ee1fd
commit 73fbed8837
4 changed files with 11 additions and 7 deletions

View File

@ -19,5 +19,5 @@
<%end -%>
</td>
<td><%= display_date_time(page_context.updated_at) %></td>
<td><%= User.find(page_context.create_user_id).name %></td>
<td><%= User.find(page_context.create_user_id).name rescue '' %></td>
</tr>

View File

@ -53,7 +53,7 @@
<div id="post-body">
<div id="post-body-content" class="clear">
<%= f.label :category %>
<%= f.label :category ,t("web_resource.category")%>
<%= f.select :web_link_category_id, @web_link_categorys.collect {|t| [ t.i18n_variable[I18n.locale], t.id ]} %>
<ul class="nav nav-tabs">
@ -68,7 +68,7 @@
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
<div class="title">
<%= f.label :name %>
<%= f.label :name ,t("web_resource.name")%>
<%= f.fields_for :name, (@web_link.new_record? ? @web_link.build_name : @web_link.name ) do |f| %>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_field locale, :class=>'post-title' %>
@ -76,7 +76,7 @@
</div>
<div class="title">
<%= f.label :describe %>
<%= f.label :describe,t("web_resource.describe") %>
<%= f.fields_for :context, (@web_link.new_record? ? @web_link.build_context : @web_link.context ) do |f| %>
<%= I18nVariable.from_locale(locale) %>
<%= f.text_area locale, :style=>"width:100%" %>
@ -90,7 +90,7 @@
</div>
<div class="title">
<%= f.label :url %>
<%= f.label :url,t("web_resource.url") %>
<%= f.text_field :url %>
</div>

View File

@ -25,8 +25,8 @@
<div class="quick-edit">
<ul class="nav nav-pills hide">
<%if at_least_module_manager || web_link.web_link_category.cur_user_is_sub_manager_of(:edit)%>
<li><%= link_to t('web_link.edit'), edit_panel_web_resource_back_end_web_link_path(web_link) %></li>
<li><%= link_to t('web_link.delete'), panel_web_resource_back_end_web_link_path(web_link), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
<li><%= link_to t('edit'), edit_panel_web_resource_back_end_web_link_path(web_link) %></li>
<li><%= link_to t('delete'), panel_web_resource_back_end_web_link_path(web_link), :confirm => t('sure?'), :method => :delete, :remote => true %></li>
<% end -%>
</ul>
</div>

View File

@ -21,6 +21,10 @@ zh_tw:
web_resource:
list_lower: 列表
list_link: 鏈接列表
category: 分類
name: 名稱
describe: 描述
url: 路徑