external-accounts.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. {% extends '../layout/admin.html' %}
  2. {% block html_title %}外部アカウント管理 · {% endblock %}
  3. {% block content_head %}
  4. <div class="header-wrap">
  5. <header id="page-header">
  6. <h1 class="title" id="">ユーザー管理/外部アカウント管理</h1>
  7. </header>
  8. </div>
  9. {% endblock %}
  10. {% block content_main %}
  11. <div class="content-main">
  12. {% set smessage = req.flash('successMessage') %}
  13. {% if smessage.length %}
  14. <div class="alert alert-success">
  15. {{ smessage }}
  16. </div>
  17. {% endif %}
  18. {% set emessage = req.flash('errorMessage') %}
  19. {% if emessage.length %}
  20. <div class="alert alert-danger">
  21. {{ emessage }}
  22. </div>
  23. {% endif %}
  24. <div class="row">
  25. <div class="col-md-3">
  26. {% include './widget/menu.html' with {current: 'external-account'} %}
  27. </div>
  28. <div class="col-md-9">
  29. <p>
  30. <a class="btn btn-default" href="/admin/users">
  31. <i class="fa fa-arrow-left" aria-hidden="true"></i>
  32. ユーザー管理に戻る
  33. </a>
  34. </p>
  35. <h2>外部アカウント一覧</h2>
  36. <table class="table table-hover table-striped table-bordered table-user-list">
  37. <thead>
  38. <tr>
  39. <th width="120px">Authentication Provider</th>
  40. <th><code>accountId</code></th>
  41. <th>関連付けられているユーザーの <code>username</code></th>
  42. <th>
  43. パスワード設定
  44. <a class="text-muted"
  45. data-toggle="popover" data-placement="top"
  46. data-trigger="hover focus" tabindex="0" role="button" {# dismiss settings #}
  47. data-animation="false" data-html="true"
  48. data-content="<small>関連付けられているユーザーがパスワードを設定しているかどうかを表示します</small>">
  49. <small>
  50. <i class="fa fa-info-circle" aria-hidden="true"></i>
  51. </small>
  52. </a>
  53. </th>
  54. <th width="100px">作成日</th>
  55. <th width="90px">操作</th>
  56. </tr>
  57. </thead>
  58. <tbody>
  59. {% for account in accounts %}
  60. <tr>
  61. <td>{{ account.providerType }}</td>
  62. <td>
  63. <strong>{{ account.accountId }}</strong>
  64. </td>
  65. <td>
  66. <strong>{{ account.user.username }}</strong>
  67. </td>
  68. <td>
  69. {% if account.user.password != null %}
  70. <span class="label label-info">
  71. 設定済み
  72. </span>
  73. {% else %}
  74. <span class="label label-warning">
  75. 未設定
  76. </span>
  77. {% endif %}
  78. </td>
  79. <td>{{ account.createdAt|date('Y-m-d', account.createdAt.getTimezoneOffset()) }}</td>
  80. <td>
  81. <div class="btn-group admin-user-menu">
  82. <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
  83. 編集
  84. <span class="caret"></span>
  85. </button>
  86. <ul class="dropdown-menu" role="menu">
  87. <li class="dropdown-header">編集メニュー</li>
  88. <li class="dropdown-button">
  89. <form action="/admin/users/external-accounts/{{ account.accountId }}/remove" method="post">
  90. <input type="hidden" name="_csrf" value="{{ csrf() }}">
  91. <button type="submit" class="btn btn-block btn-danger">削除する</button>
  92. </form>
  93. </li>
  94. </ul>{# end of .dropdown-menu #}
  95. </div>{# end of .btn-group #}
  96. </td>
  97. </tr>
  98. {% endfor %}
  99. </tbody>
  100. </table>
  101. {% include '../widget/pager.html' with {path: "/admin/users/external-accounts", pager: pager} %}
  102. </div>
  103. </div>
  104. </div>
  105. {% endblock content_main %}
  106. {% block content_footer %}
  107. {% endblock content_footer %}