From bc38e24259937575199b9bf3361b0e0ef5e5031b Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Mon, 26 Aug 2013 14:30:45 +0800 Subject: [PATCH] company review --- .../back_end/dictionary_vocabs/_form.html.erb | 10 +++++----- .../back_end/dictionary_vocabs/index.html.erb | 4 ---- .../back_end/dictionary_vocabs/show.html.erb | 4 ---- .../front_end/dictionary_vocabs/index.html.erb | 13 +++---------- .../front_end/dictionary_vocabs/show.html.erb | 2 +- .../dictionary/config/locales/zh_tw.yml | 4 ++-- 6 files changed, 11 insertions(+), 26 deletions(-) diff --git a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/_form.html.erb b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/_form.html.erb index 2e18960e9..56d97944c 100644 --- a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/_form.html.erb +++ b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/_form.html.erb @@ -1,17 +1,17 @@
-
+

<%= t :category, :scope => :dictionary %>

<%= f.collection_select :dictionary_vocab_category_id, @categories, :id, :title %>
-
+

<%= t :word, :scope => :dictionary %>

<%= f.text_field :word %>
-
+

<%= t :definition, :scope => :dictionary %>

- <%= f.text_area :definition %> + <%= f.text_field :definition %>

-
+
<%= f.submit t('submit'), class: 'btn btn-primary'%>
diff --git a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/index.html.erb b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/index.html.erb index 055f20eb3..5c7a88835 100644 --- a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/index.html.erb +++ b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/index.html.erb @@ -1,5 +1,3 @@ -
-
<% flash.each do |key, value| %>
<%= value %>
<% end %> @@ -32,5 +30,3 @@ -
-
\ No newline at end of file diff --git a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/show.html.erb b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/show.html.erb index 0988d1386..87ab0436c 100644 --- a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/show.html.erb +++ b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/back_end/dictionary_vocabs/show.html.erb @@ -1,5 +1,3 @@ -
-
@@ -29,5 +27,3 @@ <%= link_to t(:back), panel_dictionary_back_end_dictionary_vocabs_path%>
<%= t :category, :scope => :dictionary %>
-
-
\ No newline at end of file diff --git a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/front_end/dictionary_vocabs/index.html.erb b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/front_end/dictionary_vocabs/index.html.erb index 0331dc01c..c672aed6a 100644 --- a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/front_end/dictionary_vocabs/index.html.erb +++ b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/front_end/dictionary_vocabs/index.html.erb @@ -6,7 +6,7 @@ <%= t :category, :scope => :dictionary %> <%= t :word, :scope => :dictionary %> - <%= t :time, :scope => :dictionary %> + <%= t :definition, :scope => :dictionary %> @@ -15,14 +15,7 @@ <%= vocab.dictionary_vocab_category.title %> <%= link_to truncate(vocab.word,length: 25), panel_dictionary_front_end_dictionary_vocab_path(vocab) %> - - <% if vocab.created_at > Time.now.beginning_of_day %> - <%="#{time_ago_in_words(vocab.created_at)}"%> - <%=t :ago,:scope => :dictionary%> - <% else %> - <%= vocab.created_at.strftime("%Y/%m/%d") %> - <% end %> - + <%= link_to truncate(vocab.definition,length: 25), panel_dictionary_front_end_dictionary_vocab_path(vocab) %> <% end %> @@ -30,4 +23,4 @@
-<%= paginate(@vocabs, :param_name => :page_main, :params => {:inner => 'false'} ) rescue nil %> \ No newline at end of file +<%= paginate(@vocabs, :param_name => :page_main, :params => {:inner => 'false'} ) rescue nil %> diff --git a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/front_end/dictionary_vocabs/show.html.erb b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/front_end/dictionary_vocabs/show.html.erb index 5ab42030f..534206b47 100644 --- a/vendor/built_in_modules/dictionary/app/views/panel/dictionary/front_end/dictionary_vocabs/show.html.erb +++ b/vendor/built_in_modules/dictionary/app/views/panel/dictionary/front_end/dictionary_vocabs/show.html.erb @@ -3,7 +3,7 @@ - + diff --git a/vendor/built_in_modules/dictionary/config/locales/zh_tw.yml b/vendor/built_in_modules/dictionary/config/locales/zh_tw.yml index b2eec8a6e..1a676a24a 100644 --- a/vendor/built_in_modules/dictionary/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/dictionary/config/locales/zh_tw.yml @@ -21,8 +21,8 @@ zh_tw: dictionary: 字典前台 dictionary: 字彙辭典 category: 類別 - word: 字彙 - definition: 定義 + word: 字彙中文 + definition: 英文定義 time: 建立時間 ago: 前 new: 新增
<%= t :category, :scope => :dictionary %><%= @vocab.dictionary_vocab_category.key %><%= @vocab.dictionary_vocab_category.title %>
<%= t :word, :scope => :dictionary %>