{% 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/ui.fancytree.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
  <script src="{{ url_for('static', filename='js/jquery/jquery.fancytree.min.js') }}" type="application/javascript" charset="utf-8"></script>
  <script src="{{ url_for('static', filename='js/scripts/project.js') }}" type="application/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 class="hight">Create your software release</h2>
<div class='space'></div><div class='space'></div>
<label for='software'></label>
<input type="text" name="software" id="software" size='30' value="Enter software name..." />
<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>
	<input type="submit" name="create" id ="create" value="Create" class="button"/>
</div>
</div>
{% elif method == "open" %}
<div id="openSoftware">
	<h2 class="hight">Select the folder of your software release into the box</h2>
  <div class='space'></div>
	<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=""/>
  <p><font color="red">WARNING:</font> Opening a new software release <font color="red">WILL ERASE YOUR EXISTING INSTANCE</font>. Proceed with caution!</p></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 %}
