<!DOCTYPE html>
<html>
  <head>
    <title>Hard Mood - Administration</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="google-signin-client_id" content="10256926422-quhsgmmfd1knnr2t90ckq1tt11qkpiff.apps.googleusercontent.com">
    <link rel="icon" href="/static/images/favicon.png?v=2" size="16x16" type="image/png">
    <link rel="stylesheet" href="/static/css/bootstrap.css">
    <link rel="stylesheet" href="/static/css/bootstrap-theme.css">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries-->
    <!-- [if lt IE 9]-->
    <script type="text/javascript" src="http://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script type="text/javascript" src="http://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <!-- [endif]-->
  </head>
  <body>
    <div class="navbar-wrapper">
      <div class="container">
        <nav class="navbar navbar-inverse navbar-fixed-top">
          <div class="container">
            <div class="navbar-header">
              <button type="button" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar" class="navbar-toggle collapsed"><span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button><a href="/" class="navbar-brand">HardMood</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
              <ul class="nav navbar-nav">
                <li class="dropdown"><a href="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" class="dropdown-toggle">Admin<span class="caret"></span></a>
                  <ul class="dropdown-menu">
                    <li><a href="/admin/subscribers">User Administration</a></li>
                    <li><a href="/evaluation">Evaluation</a></li>
                  </ul>
                </li>
                <li><a style="display:none;" href="/login" onclick="signIn();">Login</a></li>
                <li><a href="#" onclick="signOut();">Logout</a></li>
              </ul>
            </div>
          </div>
        </nav>
      </div>
    </div>
    <div style="margin-bottom: 50px" class="container user">
      <div class="row">
        <div class="page-header">
          <h2>User Administration - Team "WUB"</h2>
        </div>
        <div><a href="/admin/csv/1/365">Download Evaluation as CSV</a></div>
        <div style="display: none" role="alert" data-bind="visible: shouldShowMessage" class="alert alert-success"><strong>Saved successfully</strong>The e-mail address has been added to the mailing list.</div>
        <div style="display: none" role="alert" data-bind="visible: shouldShowErrorMessage" class="alert alert-danger"><strong>Without success!</strong>The e-mail address could not be saved.</div>
        <div class="well">
          <p>Add new users. All added users are prompted to vote every day by e-mail. The vote is voluntary and anonymous.</p>
        </div>
      </div>
      <div class="row">
        <table class="table">
          <thead>
            <tr>
              <th>e-mail address</th>
              <th></th>
            </tr>
          </thead>
          <tbody data-bind="foreach: emails, visible: emails().length &gt; 0">
            <tr>
              <td data-bind="text: email"></td>
              <td>
                <button type="button" data-bind="click: $parent.remove" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span></button>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
      <div class="row">
        <form action="/json/subscribers" method="post">
          <label for="email">E-Mail:</label>
          <input id="email" name="email" type="text" value="" data-bind="value: newEmailText">
          <input id="team" name="team" type="hidden" value="1" data-bind="value: team">
          <button data-bind="click: save" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span></button>
        </form>
      </div>
    </div>
    <footer>
      <nav class="navbar navbar-default navbar-fixed-bottom">
        <div class="container">
          <p class="navbar-text navbar-right">&copy; 2017 HardMood Inc.</p>
        </div>
      </nav>
    </footer>
    <script src="/static/js/subscribers.bundle.js"></script>
  </body>
</html>