index.erb 1.8 KB

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