- content_for :title, @book.title
.container
  .row
    .col-xs-8
      %section
        .h4
          Book Data
        %table.table.table-striped
          =attr_row(@book, :title)
          =attr_row(@book, :author)
          =attr_row(@book, :call_no)
          =attr_row(@book, :pages)
          =attr_row(@book, :height)
          =attr_row(@book, :section)
          =attr_row(@book, :brn)
      
      %section
        %h4
          User Data
        %table.table.table-striped
          %tr
            %td.col-xs-4
              Rating
            %td.col-xs-8
              = responsive_rater_tag(value: @book.meta.rating, min: 0, max: 5, id: @book.id)
          =attr_row(@book.meta, :borrowed)
          =attr_row(@book.meta, :starred)

      %section
        %h4
          Availability
        %table.table.table-striped
          %thead
            %tr
              %th Library
              %th Reference
          %tbody
            - @book.library_books.each do |lb|
              %tr{ class: (lb.available ? 'success' : '') }
                %td.col-xs-7= lb.library_name
                %td.col-xs-1= (lb.reference ? 'Reference' : '')

- content_for :title, @book.title
.container
  .row
    .col-xs-8
      %section
        .h4
          Book Data
        %table.table.table-striped
          =attr_row(@book, :title)
          =attr_row(@book, :author)
          =attr_row(@book, :call_no)
          =attr_row(@book, :pages)
          =attr_row(@book, :height)
          =attr_row(@book, :section)
          =attr_row(@book, :brn)
      
      %section
        %h4
          User Data
        %table.table.table-striped
          %tr
            %td.col-xs-4
              Rating
            %td.col-xs-8
              = responsive_rater_tag(value: @book.meta.rating, min: 0, max: 5, id: @book.id)
          =attr_row(@book.meta, :borrowed)
          =attr_row(@book.meta, :starred)

      %section
        %h4
          Availability
        %table.table.table-striped
          %thead
            %tr
              %th Library
              %th Reference
          %tbody
            - @book.library_books.each do |lb|
              %tr{ class: (lb.available ? 'success' : '') }
                %td.col-xs-7= lb.library_name
                %td.col-xs-1= (lb.reference ? 'Reference' : '')

      %section
        .pull-right
          - if @book.meta.can_browse?
            = link_to 'Mark Browsed', browse_book_url(@book), method: :post, class: 'btn btn-default'
          - if @book.meta.can_borrow?
            = link_to 'Mark Borrowed', borrow_book_url(@book), method: :post, class: 'btn btn-default'

Set browsed and borrowed status for books in show view
Set browsed and borrowed status for books in show view
