add back_end show vocab
This commit is contained in:
parent
8a94eeeee8
commit
667b7f2bd5
|
@ -9,7 +9,6 @@
|
|||
<tr>
|
||||
<th class="span2"><%= t :category, :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"></th>
|
||||
</tr>
|
||||
|
@ -20,7 +19,6 @@
|
|||
<tr>
|
||||
<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><%= truncate(vocab.definition,length: 50) %></td>
|
||||
<td><% if vocab.created_at > Time.now.beginning_of_day %>
|
||||
<%="#{time_ago_in_words(vocab.created_at)}"%>
|
||||
<%=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>
|
|
@ -17,4 +17,5 @@ en:
|
|||
category: Category
|
||||
word: Word
|
||||
definition: Definition
|
||||
time: Time
|
||||
time: Time
|
||||
ago: ago
|
|
@ -22,3 +22,4 @@ zh_tw:
|
|||
word: 字彙
|
||||
definition: 定義
|
||||
time: 時間
|
||||
ago: 前
|
||||
|
|
Loading…
Reference in New Issue