From: OHASHI, Norikazu Date: Sun, 12 May 2019 10:43:47 +0000 (+0900) Subject: 書籍詳細のタイトルに巻数を記載するように対応 X-Git-Url: http://www.wald-der-katze.sakura.ne.jp/git/gitweb.cgi?a=commitdiff_plain;h=5cb3944b775d8c0a217f11c8f1120e401a444f03;p=book_server.git 書籍詳細のタイトルに巻数を記載するように対応 --- diff --git a/sinatra/app/views/book_info.haml b/sinatra/app/views/book_info.haml index 199844b..321a4ac 100644 --- a/sinatra/app/views/book_info.haml +++ b/sinatra/app/views/book_info.haml @@ -1,9 +1,11 @@ - # encoding: utf-8 - id = @id - book_info = @book_info - +- book_title = book_info[:title] +- if book_info [:volume] != nil + - book_title += ": #{book_info[:volume]} å·»" %h2 - 「#{book_info[:title]}」 + 「#{book_title}」 %image{:border => '1', :src => book_info[:cover_uri], :width => '160', :height => '230'} @@ -18,9 +20,7 @@ %th 書名 %td - #{book_info[:title]} - - if book_info [:volume] != nil - : #{book_info[:volume]} å·» + #{book_title} - if book_info[:series] != nil and book_info[:series] != "" %tr %th