- {% if errors %}
- <div class="row">
- <div class="col-md-12">
- <ul class="error">
- {% for error in errors %}
- <li>{{ error }}</li>
- {% endfor %}
- </ul>
- </div>
- </div>
- {% endif %}
-
- <div class="row">
- <div class="col-md-8 el">
- <form role="form" method="post">
- {% csrf_token %}
- <div class="form-group" style="display:none">
- <input type="email" class="form-control" id="email" style="width:300px" value="{{ email }}" readonly="readonly">
- </div>
- <div class="form-group">
- <select id="org_name" name="org_name" class="form-control" style="width:590px" value="{{ organization }}" required>
- {% if authorities %}
- {% for authority in authorities %}
- {% if authority.name %}
- <option value="{{ authority.authority_hrn }}">{{authority.name}}</option>
- {% else %}
- <option value="{{ authority.authority_hrn }}">{{authority.authority_hrn}}</option>
- {% endif %}
- {% endfor %}
- {% endif %}
- </select>
- </div>
- <div class="form-group">
- <input type="text">New Project</input>
- </div>
- <div class="form-group">
- <input type="text">Existing Project</input>
- </div>
- <div class="form-group">
- <textarea id="purpose" name="purpose" class="form-control" rows="6" placeholder="Project purpose" style="width:300px"
- title="Purpose of your project (informative)" required="required">{{ purpose }}</textarea>
- </div>
- {%if 'is_pi' in pi %}
- <button type="submit" id=submit_pi class="btn btn-onelab"><span class="glyphicon glyphicon-plus"></span> Create slice</button>
- {%else%}
- <button type="submit" class="btn btn-onelab"><span class="glyphicon glyphicon-plus"></span> Request slice</button>
- {%endif%}
- </form>
-
- </div>
- </div>
+{% if errors %}
+<div class="row">
+ <div class="col-md-12">
+ <ul class="error">
+ {% for error in errors %}
+ <li>{{ error }}</li>
+ {% endfor %}
+ </ul>
+ </div>
+</div>
+{% endif %}
+
+<div class="container tab-content">
+
+ <div class="tab-pane active" id="existing">
+ <div class="row">
+ <div class="col-md-6">
+ <h3>Join an existing Project</h3>
+ </div>
+ <div class="col-md-6">
+ <h3>List of projects you are part of</h3>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col-md-6">
+ <form role="form" method="post">
+ {% csrf_token %}
+ <select id="projects"></select> <button type="submit" class="btn">Join</button>
+ </form>
+ </div>
+ <div class="col-md-6">
+ <table class="table project-list">
+ {% for pending in pending_projects %}
+ <tr><td>(PENDING) {{ pending.project_name }}</td><td>{{ pending.authority_hrn }}</td><td>{{ pending.created|date:"d/m/Y" }}</td></tr>
+ {% endfor %}
+ </table>
+ </div>
+ </div>
+ </div>
+
+ <div class="tab-pane" id="new">
+ <div class="row">
+ <div class="col-md-12">
+ <h3>Create a new Project</h3>
+ </div>
+ </div>
+
+
+ <div class="row">
+ <div class="col-md-12">
+ <form role="form" method="post" action="/portal/project_request">
+ {% csrf_token %}
+ <div class="form-group">
+ <input type="text" name="project_name" value="" placeholder="Name" required>
+ </div>
+ <div class="form-group">
+ <select id="org_name" name="authority_name" class="form-control" style="width:590px" value="{{ organization }}" required>
+ {% if authorities %}
+ {% for authority in authorities %}
+ {% if authority.name %}
+ <option value="{{ authority.authority_hrn }}">{{authority.name}}</option>
+ {% else %}
+ <option value="{{ authority.authority_hrn }}">{{authority.authority_hrn}}</option>
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+ </select>
+ </div>
+
+
+ <div class="form-group">
+ <textarea id="purpose" name="purpose" class="form-control" rows="6" placeholder="Description" style="width:300px" title="Purpose of your project (informative)" required="required"></textarea>
+ </div>
+ <button type="submit" class="btn btn-onelab"><span class="glyphicon glyphicon-plus"></span> Send Request</button>
+ </form>
+
+ </div>
+ </div>
+ </div>
+
+</div>