/priv/sites/zotonic_status/templates/_sites.tpl

https://code.google.com/p/zotonic/ · Smarty Template · 59 lines · 54 code · 5 blank · 0 comment · 6 complexity · fd7b1477bd24212aa6a1b21bc792125d MD5 · raw file

  1. <thead>
  2. <tr>
  3. <th>{_ Site _}</th>
  4. <th>{_ Status _}</th>
  5. {% if has_user %}
  6. <th>{_ Action _}</th>
  7. {% endif %}
  8. </tr>
  9. </thead>
  10. <tbody>
  11. {% for status, ss in sites %}
  12. {% for name,childspec,pid,time in ss %}
  13. {% if name /= 'zotonic_status' and (has_user or not configs[name].hidden) %}
  14. <tr id="site-{{ name }}" class="{{ status }}">
  15. <td>
  16. <a href="http://{{ configs[name].hostname|escape }}/">http://{{ configs[name].hostname|escape }}/</a>
  17. </td>
  18. <td>
  19. <span class="waiting status">{_ Waiting _}</span>
  20. <span class="running status">{_ Running _}</span>
  21. <span class="retrying status">{_ Retrying _}</span>
  22. <span class="failed status">{_ Failed _}</span>
  23. <span class="stopped status">{_ Stopped _}</span>
  24. </td>
  25. {% if has_user %}
  26. <td>
  27. {% button
  28. text=_"start"
  29. class="start"
  30. title=_"Start the site."
  31. postback={site_start site=name} %}
  32. {% button
  33. text=_"stop"
  34. class="stop"
  35. title=_"Stop the site."
  36. postback={site_stop site=name} %}
  37. {% button
  38. text=_"restart"
  39. class="restart"
  40. title=_"Restart the site, all users will be logged off."
  41. postback={site_restart site=name} %}
  42. {% button
  43. text=_"flush"
  44. class="flush"
  45. title=_"Flush and reload all settings, templates etc."
  46. postback={site_flush site=name} %}
  47. {% all include "_z_status_button.tpl" %}
  48. </td>
  49. {% endif %}
  50. </tr>
  51. {% endif %}
  52. {% endfor %}
  53. {% endfor %}
  54. </tbody>