PageRenderTime 82ms CodeModel.GetById 40ms RepoModel.GetById 8ms app.codeStats 0ms

/lib/smartlib/views/admin/shelves_detail.erb

https://bitbucket.org/thrabal/smartlib
Ruby HTML | 105 lines | 90 code | 9 blank | 6 comment | 2 complexity | f04b60b36dfdb5c2e6958f9f04c67607 MD5 | raw file
  1. <% content_for :title do %>Detail police<% end %>
  2. <h2>Police "<%= @shelve[:name] %>" ve sk?í?i "<%= @panel[:name] %>" na plánu "<%= @footprint[:name] %>"</h2>
  3. <table id="shelve" class="table table-striped">
  4. <tbody>
  5. <% if @books.length == 0 %>
  6. <li class="book">Žádné knihy</li>
  7. <% end %>
  8. <% @books.each do |book| %>
  9. <tr id="book-<%= book[:isbn] %>">
  10. <td><a href="<%= to("/book/#{book.sysno}/detail") %>" target="_blank"><%= book.title %></a>
  11. <td><a href="<%= to("shelves/#{book._id}") %>?shelve_id=<%= @shelve[:_id]%>" data-method="delete" class="ajax"><i class="icon-remove-circle" /></a></td>
  12. </tr>
  13. <% end %>
  14. <div style="clear: both;"></div>
  15. </tbody>
  16. </table>
  17. <div id="operations">
  18. <!--<form action="<%= to("/books") %>" method="post">
  19. <input type="hidden" name="_method" value="PUT">
  20. <input type="hidden" name="shelve_id" value="<%= @shelve[:id] %>"/>
  21. <input type="text" name="name"/>
  22. <input type="submit" value="Vytvo? knihu"/>
  23. </form>-->
  24. <div id="search_form" class="form-vertical">
  25. <h3>Vyhledej knihu</h3>
  26. <form action="<%= to("/books/search") %>" method="post" class="ajax form-horizontal">
  27. <div class="control-group">
  28. <label for="title">ISBN</label>
  29. <div class="controls">
  30. <input type="text" name="isbn" value="" placeholder="isbn"/>
  31. </div>
  32. </div>
  33. <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>
  34. <div id="more" style="display: none;">
  35. <div class="control-group">
  36. <label for="title">Jméno knihy</label>
  37. <div class="controls">
  38. <input type="text" name="title" value="" placeholder="jméno knihy"/>
  39. </div>
  40. </div>
  41. <div class="control-group">
  42. <label for="title">Jméno autora</label>
  43. <div class="controls">
  44. <input type="text" name="author" value="" placeholder="jméno autora"/>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="form-actions">
  49. <input type="hidden" name="_method" value="POST">
  50. <input type="hidden" name="shelve_id" value="<%= @shelve[:_id] %>"/>
  51. <input type="submit" value="Hledej knihu"/>
  52. </div>
  53. </form>
  54. </div>
  55. <div id="search">
  56. </div>
  57. </div>
  58. <style type="text/css">
  59. #shelve {
  60. width: 25%;
  61. border: 1px solid #666666;
  62. border-bottom: 0;
  63. list-style: none;
  64. padding: 0;
  65. margin: 0;
  66. float: left;
  67. }
  68. #operations {
  69. margin-left: 20px;
  70. float: left;
  71. width: 70%;
  72. }
  73. .book {
  74. border-bottom: 1px solid #444444;
  75. float: left;
  76. width: 100%;
  77. }
  78. #shelve tr{
  79. padding: 2px;
  80. }
  81. #shelve tr:hover
  82. {
  83. background-color: #eee;
  84. color: #000;
  85. }
  86. #shelve i{
  87. cursor:pointer;
  88. }
  89. #shelve a{
  90. display: block;
  91. }
  92. #shelve a:hover
  93. {
  94. text-decoration: none;
  95. }
  96. </style>