add back_end show vocab
This commit is contained in:
parent
8a94eeeee8
commit
667b7f2bd5
|
@ -9,7 +9,6 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th class="span2"><%= t :category, :scope => :dictionary %></th>
|
<th class="span2"><%= t :category, :scope => :dictionary %></th>
|
||||||
<th class="span2"><%= t :word, :scope => :dictionary %></th>
|
<th class="span2"><%= t :word, :scope => :dictionary %></th>
|
||||||
<th class="span2"><%= t :definition, :scope => :dictionary %></th>
|
|
||||||
<th class="span2"><%= t :time, :scope => :dictionary %></th>
|
<th class="span2"><%= t :time, :scope => :dictionary %></th>
|
||||||
<th class="span2"></th>
|
<th class="span2"></th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -20,7 +19,6 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= vocab.dictionary_vocab_category.title %></td>
|
<td><%= vocab.dictionary_vocab_category.title %></td>
|
||||||
<td><%= link_to truncate(vocab.word,length: 25), panel_dictionary_back_end_dictionary_vocab_path(vocab) %></td>
|
<td><%= link_to truncate(vocab.word,length: 25), panel_dictionary_back_end_dictionary_vocab_path(vocab) %></td>
|
||||||
<td><%= truncate(vocab.definition,length: 50) %></td>
|
|
||||||
<td><% if vocab.created_at > Time.now.beginning_of_day %>
|
<td><% if vocab.created_at > Time.now.beginning_of_day %>
|
||||||
<%="#{time_ago_in_words(vocab.created_at)}"%>
|
<%="#{time_ago_in_words(vocab.created_at)}"%>
|
||||||
<%=t :ago,:scope => :dictionary%>
|
<%=t :ago,:scope => :dictionary%>
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
<div class="row">
|
||||||
|
<div class="span8 offset1">
|
||||||
|
<table class="table table-striped" align ="center">
|
||||||
|
<tr>
|
||||||
|
<td ><%= t :category, :scope => :dictionary %></td>
|
||||||
|
<td><%= @vocab.dictionary_vocab_category.key %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td ><%= t :word, :scope => :dictionary %></td>
|
||||||
|
<td><%= @vocab.word %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td ><%= t :definition, :scope => :dictionary %></td>
|
||||||
|
<td><pre><%= @vocab.definition %></pre></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td ></td>
|
||||||
|
<td><%= link_to t(:edit),edit_panel_dictionary_back_end_dictionary_vocab_path(@vocab) %> |
|
||||||
|
<%= link_to t(:delete), panel_dictionary_back_end_dictionary_vocab_path(@vocab), method: :delete , :data => { :confirm => 'Are you sure?'} %> |
|
||||||
|
<%= link_to t(:back), panel_dictionary_back_end_dictionary_vocabs_path%></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -18,3 +18,4 @@ en:
|
||||||
word: Word
|
word: Word
|
||||||
definition: Definition
|
definition: Definition
|
||||||
time: Time
|
time: Time
|
||||||
|
ago: ago
|
|
@ -22,3 +22,4 @@ zh_tw:
|
||||||
word: 字彙
|
word: 字彙
|
||||||
definition: 定義
|
definition: 定義
|
||||||
time: 時間
|
time: 時間
|
||||||
|
ago: 前
|
||||||
|
|
Loading…
Reference in New Issue