{% extends "layout.html" %}
{% block title %}{% if method == "new" %}Adding new software{%else%}Open existing project{%endif%}{% endblock %}
{% block head %}
  {{ super() }}
  <link href="{{ url_for('static', filename='css/jqueryFileTree.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
  <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/project.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="" />
<input type="hidden" name="method" id="method" value="{{method}}" />
{% if method == "new" %}
<div id="addsoftware">
<h2>Create your software release</h2>
<label for='software'>Name: </label>
<input type="text" name="software" id="software" size='30' value="Enter software name..." />
<br/><br/>
<div id="file_navigation">
	<h2>Select the parent directory</h2>
	<div id="fileTree" class="file_tree"></div>
	<div id="file_info" class="file_info"><span id="info">Please select your parent folder into the box...</span></div>
	<br/>
	<input type="submit" name="create" id ="create" value="Create" class="button"/>
</div>
</div>
{% elif method == "open" %}
<div id="openSoftware">
	<h2>Select the folder of your software release into the box</h2>
	<div id="fileTree" class="file_tree"></div>
	<div id="file_info" class="file_info">
	<img src="{{ url_for('static', filename='images/check.png') }}" class="check" id="check" alt=""/>
	<span id="info">Please select your project folder into the box...</span></div>
	<input type="hidden" name="path" id="path" value="" />
	<input type="submit" name="open" id ="open" value="Open Software" class="button"/>
</div>
{% endif %}
</form>
{% endblock %}
