{% extends "layout.html" %}
{% block title %}Adding new repository{% endblock %}
{% block head %}
  {{ super() }}
  <link href="{{ url_for('static', filename='css/jqueryFileTree.css', _external=False) }}" rel="stylesheet" type="text/css" media="screen" />
  <link href="{{ url_for('static', filename='css/jqueryTabs.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/folder.js') }}" type="text/javascript" charset="utf-8"></script>
  <script src="{{ url_for('static', filename='js/jquery/jqueryTabs.js') }}" type="text/javascript" charset="utf-8"></script>
{% endblock %}
{% block body %}
<h2>Clone a repository into your workspace</h2><br/>
<div id="tabContaier">
  <ul>
    <li><a href="#tab1" class="active">Clone your repository</a></li>
    <li><a href="#tab2">Manage your project folder</a></li>
  </ul><!-- //Tab buttons -->
  <div class="tabDetails">
    <div id="tab1" class="tabContents">
      <div id="repository" style="margin-left:40px;">
      <label for='name'>Project name: </label>
      <input type="text" name="name" id="name" size='20' value="Enter the project name..." />
      <label for='repo'>&nbsp;url: &nbsp;&nbsp;</label>
      <input type="text" name="repo" id="repo" size='25' value="Enter the url of your repository..." /><br/>
      <label for='user'>Your name: &nbsp;&nbsp;&nbsp;</label>
      <input type="text" name="user" id="user" size='20' value="{{name}}" />
      <label for='email'>Email: </label>
      <input type="text" name="email" id="email" size='25' value="{% if not email %}Enter your email adress...{% else %}{{email}}{%endif%}" />
      <input type="hidden" name="workdir" id="workdir" value="{{workDir}}" />
      <button class="button" id="clone">clone</button>
      <img class="waitting" id="imgwaitting" src="{{ url_for('static', filename='images/waiting.gif') }}" alt="" />
      <br/><br/>
      </div>
      <br/>
      <h2>Set your Security Mode</h2>
      <div class="menu-box-right" style="width: 592px;">
        <div style="background:#fff; padding:10px; min-height:100px; font-size:14px;">
        <div id="box0">
      	<h2>Clone Repository without using HTTPS and SSH</h2><br/>
      	<p>Choose this mode if you don't have login and password for the repository and you if you don't have the possibility to
      	use SSH authentication. Otherwise use your public key or your login and password to clone your project by choosing https or ssh mode. Note
      	that, with readonly mode you can not be able to push your changes.</p>
      	<br/>
      	</div>
      	<div id="box1" style="display:none">
      		<h2>You can use this public key to setup your repository</h2><br/>
      		<textarea class="mb_style public_key" readonly>
      		{{public_key}}
      		</textarea>
      	</div>
      	<div id="box2" style="display:none;">
      	<h2>Enter your username and password for https authentication access</h2><br/>
      	<div style="margin-left:80px; margin-bottom:20px;">
      	<label for='username'>Your username:&nbsp;&nbsp;</label>
      	<input type="text" name="username" id="username" size='20' value="Enter your username..." /><br/><br/>
      	<label for='password'>Your password: &nbsp;&nbsp;</label>
      	<input type="password" name="password" id="password" size='20' value="" class="idleField" />
      	</div>
      	<p></p>
      	</div>
      	</div>
      </div>
      <div class="menu-box-left"  style="width: 115px;">
      	<ul id="modelist">
      		<li class="checked"><input type="radio" name="security" id="nothing" value="nothing" /><label for="nothing">ReadOnly</label></li>
      		<li><input type="radio" name="security" id="ssh" value="SSH" checked /><label for="ssh">SSH Mode</label></li>
      		<li style="border-bottom:none"><input type="radio" name="security" id="https" value="HTTPS" /><label for="https">Https Mode</label></li>
      	</ul>
      </div>
      <div class="clear"></div><br/>
<!--Fin tab1-->
    </div>
    <div id="tab2" class="tabContents">
      <h2>Content of your cloned project</h2><br/>
      <div id="fileTree" class="file_tree_tabs"></div>
    </div>
  </div>
</div>
{% endblock %}
