OSDN Git Service

t#:
[laoz/laoz.git] / app / views / words / show.rhtml
1 <!-- 単体表示 -->
2 <h1><%= link_to(h(@word.letter), :controller => '/words', :action => :show, :id => @word.id) %></h1>
3 <div class="show">
4   <h2>熟語</h2>
5   <div class="letter">
6     <%= h(@word.letter) %>
7   </div>
8   <h2>読み</h2>
9   <div class="yomi">
10     <%= h(@word.disp_yomi) %>
11   </div>
12   <h2>解説</h2>
13   <div class="content">
14     <%= simple_format(enlink(@word.disp_detail)) %>
15   </div>
16   <%= link_to('編集ページへ', :controller => '/words', :action => :edit, :id => @word.id) %>
17   <% if @user -%>
18     <%= render :partial => '/hateda/word_show' %>
19   <% end -%>
20   <h2>登場する章</h2>
21   <div class="section-list">
22     <div><%= h(@section_count) %>個の章に出現、総登場回数<%= h(@section_sum) %>回。</div>
23     <% @sections.each do |section| -%>
24       <span><%= link_to(h(section.caption), :controller => '/section', :action => :show, :id => section.id) %></span>
25     <% end -%>
26   </div>
27   <h2>もっと詳しく</h2>
28   <div class="more">
29     <p><%= content_tag(:a, h(@word.letter+'をGoogle検索'), :href => "http://www.google.co.jp/search?hl=ja&q=#{CGI.escape(@word.letter)}&lr=lang_ja") %></p>
30     <p><%= content_tag(:a, h(@word.letter+'をコトバンクで検索'), :href => "http://kotobank.jp/word/#{CGI.escape(@word.letter)}") %></p>
31     <p><%= content_tag(:a, h(@word.letter+'をweblioで検索'), :href => "http://www.weblio.jp/content/#{CGI.escape(@word.letter)}") %></p>
32   </div>
33 </div>
34 <!-- /単体表示 -->