article.html 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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">{{ trans .lang "admin_articles" }}</h3>
  4. <div class="btn-toolbar mb-2 mb-md-0">
  5. <a class="btn btn-sm btn-success" href="/admin/article/add">
  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">{{ trans .lang "admin_article_title" }}</th>
  19. <th scope="col">{{ trans .lang "admin_article_pub_date" }}</th>
  20. <th scope="col">{{ trans .lang "admin_article_language" }}</th>
  21. <th scope="col" style="width: 90px;"></th>
  22. </tr>
  23. </thead>
  24. <tbody>
  25. {{ range .articles }}
  26. <tr>
  27. <td>{{ .ID }}</td>
  28. <td>{{ .Title }}</td>
  29. <td>{{ .PublishTime }}</td>
  30. <td>{{ .Language }}</td>
  31. <td>
  32. <a href="/admin/article/edit/{{ .ID }}" class="btn btn-sm btn-primary">
  33. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pencil" viewBox="0 0 16 16">
  34. <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"/>
  35. </svg>
  36. </a>
  37. <a href="/admin/article/delete/{{ .ID }}" class="btn btn-sm btn-danger">
  38. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-trash" viewBox="0 0 16 16">
  39. <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"/>
  40. <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"/>
  41. </svg>
  42. </a>
  43. </td>
  44. </tr>
  45. {{ end }}
  46. </tbody>
  47. </table>
  48. </div>
  49. </main>