/lib/smartlib/views/admin/shelves_detail.erb
Ruby HTML | 105 lines | 90 code | 9 blank | 6 comment | 2 complexity | f04b60b36dfdb5c2e6958f9f04c67607 MD5 | raw file
- <% content_for :title do %>Detail police<% end %>
- <h2>Police "<%= @shelve[:name] %>" ve sk?í?i "<%= @panel[:name] %>" na plánu "<%= @footprint[:name] %>"</h2>
- <table id="shelve" class="table table-striped">
- <tbody>
- <% if @books.length == 0 %>
- <li class="book">Žádné knihy</li>
- <% end %>
- <% @books.each do |book| %>
- <tr id="book-<%= book[:isbn] %>">
- <td><a href="<%= to("/book/#{book.sysno}/detail") %>" target="_blank"><%= book.title %></a>
- <td><a href="<%= to("shelves/#{book._id}") %>?shelve_id=<%= @shelve[:_id]%>" data-method="delete" class="ajax"><i class="icon-remove-circle" /></a></td>
- </tr>
- <% end %>
- <div style="clear: both;"></div>
- </tbody>
- </table>
- <div id="operations">
- <!--<form action="<%= to("/books") %>" method="post">
- <input type="hidden" name="_method" value="PUT">
- <input type="hidden" name="shelve_id" value="<%= @shelve[:id] %>"/>
- <input type="text" name="name"/>
- <input type="submit" value="Vytvo? knihu"/>
- </form>-->
-
- <div id="search_form" class="form-vertical">
- <h3>Vyhledej knihu</h3>
- <form action="<%= to("/books/search") %>" method="post" class="ajax form-horizontal">
- <div class="control-group">
- <label for="title">ISBN</label>
- <div class="controls">
- <input type="text" name="isbn" value="" placeholder="isbn"/>
- </div>
- </div>
- <span class="hideable-menu" data-hide="#search_form #more">Podrobn?jší hledání <i class="icon-chevron-left left is-hide"></i><i class="icon-chevron-right right"></i></span>
- <div id="more" style="display: none;">
- <div class="control-group">
- <label for="title">Jméno knihy</label>
- <div class="controls">
- <input type="text" name="title" value="" placeholder="jméno knihy"/>
- </div>
- </div>
- <div class="control-group">
- <label for="title">Jméno autora</label>
- <div class="controls">
- <input type="text" name="author" value="" placeholder="jméno autora"/>
- </div>
- </div>
- </div>
- <div class="form-actions">
- <input type="hidden" name="_method" value="POST">
- <input type="hidden" name="shelve_id" value="<%= @shelve[:_id] %>"/>
- <input type="submit" value="Hledej knihu"/>
- </div>
- </form>
- </div>
- <div id="search">
- </div>
- </div>
- <style type="text/css">
- #shelve {
- width: 25%;
- border: 1px solid #666666;
- border-bottom: 0;
- list-style: none;
- padding: 0;
- margin: 0;
- float: left;
- }
- #operations {
- margin-left: 20px;
- float: left;
- width: 70%;
- }
- .book {
- border-bottom: 1px solid #444444;
- float: left;
- width: 100%;
- }
- #shelve tr{
- padding: 2px;
- }
- #shelve tr:hover
- {
- background-color: #eee;
- color: #000;
- }
- #shelve i{
- cursor:pointer;
- }
- #shelve a{
- display: block;
- }
- #shelve a:hover
- {
- text-decoration: none;
- }
- </style>