{% extends "layout.html" %}
{% block title %}Your current software folder{% 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/softwareFolder.js') }}" type="text/javascript" charset="utf-8"></script>
  <script src="{{ url_for('static', filename='js/ace/ace.js') }}" type="text/javascript" charset="utf-8"></script>
    <script src="{{ url_for('static', filename='js/ace/theme-crimson_editor.js') }}" type="text/javascript" charset="utf-8"></script>
    <script src="{{ url_for('static', filename='js/ace/mode-buildout.js') }}" type="text/javascript" charset="utf-8"></script>
    <script src="{{ url_for('static', filename='js/ace/mode-python.js') }}" type="text/javascript" charset="utf-8"></script>
    <script src="{{ url_for('static', filename='js/ace/mode-php.js') }}" type="text/javascript" charset="utf-8"></script>
{% endblock %}
{% block body %}

<form action="" method=post>
<input type="hidden" name="project" id="project" value="{{project}}" />
<input type="hidden" name="workdir" id="workdir" value="{{workDir}}" />
<input type="hidden" name="subfolder" id="subfolder" value="" />
<div id="software_folder">
    <h2 class="hight show" id="details_head">Current software release file content</h2>
    <div class="software_details" id="details_box">
	<div id="fileTree" class="file_tree_short"></div>
	<div class="box_software">
	    <h2>Add new file or folder</h2>
	    <input type="text" name="file" id="file" size='22' value="Enter name here..." />
	    &nbsp;&nbsp;&nbsp;<select name="type" id="type">
	    <option value="file">file</option>
	    <option value="folder">folder</option>
	    </select>
	    &nbsp;&nbsp;&nbsp;<input type="submit" name="add" id ="add" value="Add" class="button"/>
	    <br/><br/>
	    <a href="#" id="switch" class="lshare">Switch to Project files</a>
	    <a href=""  id="clearselect" class="lshare">Clear selection</a><br/><br/>
	    <div id="file_info" class="file_info"><span id="info">Select directory or nothing for root directory...</span></div>
	</div>
	<div class="clear"></div>
    </div>
    <div class="clear"></div>
    <div id="code" style="margin-top:10px">
    <h2 class='title'><span id="edit_info">No file selected</span> <a style="display:none" id='option' href='#' rel='tooltip' title='Show more option'>[More]</a></h2>
    <div class='md5sum' id='md5sum'></div>
    <div class="main_content">
<pre id="editor">

</pre>
            </div>
	    <input type=submit value="Save" id="save" class="button">
	</div>

</div>
</form>
<div id="tooltip-option" style="display:none">
  <span class="list">MD5 SUM for the current file</span>
    <div style="margin-top:3px; margin-bottom:5px;border-bottom: 1px dashed #666666; heigth:1px"></div>
    <a id='getmd5' href="#">Get or Update md5sum</a>
    <br/><span class="list">Add Project to Develop</span><br/>
    <div style="margin-top:3px;border-bottom: 1px dashed #666666; heigth:1px"></div>
    <ul id="plist">
    {% for name in projectList%}
  <li><input type="checkbox" name="develop" value="{{name}}" id="{{name}}">
  <label>{{name}}</label></li>
    {% endfor %}
    </ul>
    <br/>
    <a href="#" id="adddevelop" class="lshare">Add to profile</a>
</div>
{% endblock %}