{% extends "layout.html" %}
{% block title %}Manage your Project{% endblock %}
{% block head %}
  {{ super() }}
  <script src="{{ url_for('static', filename='js/jquery/jqueryFileTree.js') }}" type="text/javascript" charset="utf-8"></script>
  <script src="{{ url_for('static', filename='js/scripts/repo.js') }}" type="text/javascript" charset="utf-8"></script>
{% endblock %}
{% block body %}

<form action="" method=post>
<input type="hidden" name="workdir" id="workdir" value="{{workDir}}" />
<input type="hidden" name="subfolder" id="subfolder" value="" />

<div id="repoContent">
<h2>Manage your repository</h2>
<label for='project'>Select your project into the list: </label>
<select id="project" name="project">
	{% for folder in project%}
	<option value="{{folder}}">{{folder}}</option>
	{% endfor %}
</select>
<br/><br/>
<div id="contentInfo">
	<div id="status" style="margin-bottom:20px;">
		<h2>Please select one project...</h2>
	</div>
	<div id="branchlist" style="margin-bottom:20px;">
	<h2>Your Repository Branches</h2>
	<div style="margin-left:15px;">
	<label for='activebranch'>Select your active Branch: </label>
	<select name="activebranch" id="activebranch">
	</select>
	&nbsp;&nbsp;<label for='branchname'>Branch Name: </label>
	<input type="text" name="branchname" id="branchname" size='22' value="Enter the branch name..." />
	<input type="submit" name="addbranch" id ="addbranch" value="Add" class="button" title='add new branch: git checkout -b branch'/>
	<input type="submit" name="docheckout" id ="docheckout" value="Checkout" class="button" title='add existing branch: git checkout branch'/>
	<br/>
	<!--<label for='pullbranch'>Update your local repository: </label>-->
	<!--<input type="submit" name="pullbranch" id ="pullbranch" value="Pull" class="button"/>-->
	<!--<img class="waitting" id="pullimgwaitting" src="{{ url_for('static', filename='images/waiting.gif') }}" alt="" />-->
	</div>
	</div>
	<div id="push" style="margin-bottom:20px;">
	<h2>Commit All your changes (On active branch)</h2>
	<div style="margin-left:15px;">
	<label for='commitmsg'>Commit message: </label>
	<input type="text" name="commitmsg" id="commitmsg" size='40' value="Enter message..." />
	<input type="submit" name="commit" id ="commit" value="Commit" class="button"/>
	<img class="waitting" id="imgwaitting" src="{{ url_for('static', filename='images/waiting.gif') }}" alt="" />
	</div>
	</div>
	<br/>
</div>
</div>
</form>
{% endblock %}
