tag.html 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
  2. <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2">
  3. <h3 class="h3">Теги</h3>
  4. <div class="btn-toolbar mb-2 mb-md-0">
  5. <a class="btn btn-sm btn-success" href="/admin/tag/add" title="Добавить">
  6. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-plus-circle" viewBox="0 0 16 16">
  7. <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
  8. <path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"/>
  9. </svg>
  10. </a>
  11. </div>
  12. </div>
  13. <div class="table-responsive">
  14. <table class="table table-bordered">
  15. <thead>
  16. <tr>
  17. <th scope="col">ID</th>
  18. <th scope="col">URL</th>
  19. <th scope="col">Тег</th>
  20. <th scope="col" style="width: 90px;"></th>
  21. </tr>
  22. </thead>
  23. <tbody>
  24. {{ range .tags }}
  25. <tr>
  26. <td>{{ .ID }}</td>
  27. <td>{{ .URL }}</td>
  28. <td>{{ .Tag }}</td>
  29. <td>
  30. <a href="/admin/tag/edit/{{ .ID }}" class="btn btn-sm btn-primary" title="Редактировать">
  31. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil" viewBox="0 0 16 16">
  32. <path d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168l10-10zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207 11.207 2.5zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293l6.5-6.5zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325z"/>
  33. </svg>
  34. </a>
  35. <a href="/admin/tag/delete/{{ .ID }}" class="btn btn-sm btn-danger" title="Удалить">
  36. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
  37. <path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"/>
  38. <path fill-rule="evenodd" d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"/>
  39. </svg>
  40. </a>
  41. </td>
  42. </tr>
  43. {{ end }}
  44. </tbody>
  45. </table>
  46. </div>
  47. </main>