BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

admin.twig 3.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {% from 'macro/form.twig' import checked %}
  2. <div class="thin">
  3. <div class="linkbox">
  4. <a href="/apply.php" class="brackets">Apply</a>
  5. <a href="/apply.php?action=view" class="brackets">Current applications</a>
  6. <a href="/apply.php?action=view&amp;status=resolved" class="brackets">Resolved applications</a>
  7. </div>
  8. <h3>Manage roles at {{ constant('SITE_NAME') }}</h3>
  9. <form method="post" action="/apply.php?action=admin">
  10. <div class="box">
  11. <div class="head">Current Roles</div>
  12. <div class="pad">
  13. {% if saved %}
  14. <p>The role {{ role.title }} was {{ saved }}.</p>
  15. {% endif %}
  16. {% if not editId %}
  17. {% for role_id, info in list %}
  18. {% if loop.first %}
  19. <table>
  20. {% endif %}
  21. <tr class="row{{ cycle(['a', 'b'], loop.index0) }}">
  22. <td>
  23. <div class="head">
  24. <div style="float: right;">
  25. <input style="margin-bottom: 10px;" type="submit" name="edit-{{ role_id }}" value="Edit" />
  26. </div>
  27. <span style="font-size: medium">{{ info.title }}</span> ({% if info.published %}published{% else %}archived{% endif %})
  28. <br />Role created {{ info.created|time_diff }} by {{ info.user_id|user_url }}
  29. {% if info.modified != ino.created %}
  30. last modified {{ info.modified|time_diff }}
  31. {% endif %}
  32. </div>
  33. </td>
  34. </tr>
  35. <tr>
  36. <td><div class="pad">{{ info.description|bb_format }}</div></td>
  37. </tr>
  38. {% if loop.last %}
  39. </table>
  40. {% endif %}
  41. {% else %}
  42. <p>There are no current roles. Create one using the form below.</p>
  43. {% endfor %}
  44. {% endif %}
  45. </div>
  46. </div>
  47. <div class="box">
  48. <div class="head">{% if edit_id %}Edit{% else %}New{% endif %} Role</div>
  49. <div class="pad">
  50. <table>
  51. <tr>
  52. <td class="label">Title</td>
  53. <td><input type="text" width="100" name="title" value="{% if edit_id %}{{ role.title }}{% endif %}" /></td>
  54. </tr>
  55. <tr>
  56. <td class="label">Visibility</td>
  57. <td>
  58. <input type="radio" name="status" value="1" id="status-pub"{{ checked(edit_id and role.isPublished) }} /><label for="status-pub">published</label><br />
  59. <input type="radio" name="status" value="0" id="status-arch"{{ checked((not edit_id) or role.isArchived) }} /><label for="status-arch">archived</label>
  60. </td>
  61. </tr>
  62. <tr>
  63. <td class="label">Description</td>
  64. <td>
  65. {% if edit_id %}
  66. <input type="hidden" name="edit" value="{{ edit_id }}"/>
  67. {% endif %}
  68. <input type="hidden" name="user_id" value="{{ user_id }}"/>
  69. <input type="hidden" name="auth" value="{{ auth }}"/>
  70. {{ text.emit|raw }}
  71. <input type="submit" id="submit" value="Save Role"/>
  72. </td>
  73. </tr>
  74. </table>
  75. </div>
  76. </div>
  77. </form>
  78. </div>