index.erb 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <div id="error" title="error"></div>
  2. <div>
  3. <button disabled id="reload_photos" type="button">reload photos</button>
  4. <select disabled id="show_license">
  5. <option <% unless @user.show_license %>selected <% end %>value="">show photos with any license</option>
  6. <% @licenses.each do |license| %>
  7. <option <% if license == @user.show_license %>selected <% end %>value="<%= license.id %>"><%= license.name %></option>
  8. <% end %>
  9. </select>
  10. <select disabled id="show_privacy">
  11. <% @show_privacies.each do |show_privacy, name| %>
  12. <option <% if show_privacy == @user.show_privacy %>selected <% end %>value="<%= show_privacy %>"><%= name %></option>
  13. <% end %>
  14. </select>
  15. <select disabled id="show_ignored">
  16. <% @show_ignoreds.each do |show_ignored, name| %>
  17. <option <% if show_ignored == @user.show_ignored %>selected <% end %>value="<%= show_ignored %>"><%= name %></option>
  18. <% end %>
  19. </select>
  20. </div>
  21. <div grid id="photos" style="height: 66vh; overflow-y: auto;">
  22. <div class="spinner"></div>
  23. </div>
  24. <div>
  25. <select disabled id="select_license">
  26. <option value="" selected>select license</option>
  27. <% @licenses.each do |license| %>
  28. <option value="<%= license.id %>"><%= license.name %></option>
  29. <% end %>
  30. </select>
  31. <button disabled id="apply_license" type="button">apply license</button>
  32. <span id="license_link"></span>
  33. </div>
  34. <script>
  35. var licenses = <%= @licenses.to_json %>;
  36. </script>
  37. <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
  38. <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>
  39. <script src="/js/app.js"></script>