Source

freehg / templates / frontpage.html

{% extends "base.html" %}

{% block title %} freeHg {% endblock %}

{% block content %}

			<div id="left-side">
				{% if user.is_authenticated %}
				<div id="recent" class="dialog">
					<p class="title"><strong>Recent activities</strong></p>
					<div style="position: absolute; left: 50%; top: 50%; margin-left: -90px; margin-top: -17px;">
						<strong style="font-size: 18pt;">Coming Soon</strong>
					</div>
				</div><!-- #recent -->
				{% else %}
				<div id="what-is" class="dialog">
					<p class="title"><strong>What is this site?</strong></p>
					<ul>
						<li class="body">
							Mercurial [Hg for short] is a Distributed Version Control System. 
				 			Instead of using a single repository per project, each developer can have their own repository.
						</li>
						<li class="body">freeHg makes it quick and easy to share your repositories.</li>
					</ul>
				</div><!-- #what-is -->
				{% endif %}
			</div>
			<div id="right-side">
				{% if user.is_authenticated %}
				<div id="repos" class="dialog">
					<p class="title"><strong>Repositories</strong></p>
					<ul>
						{% if user.repo_set.count %}
						<li class="head"><strong>{{user.username}}</strong> ~ {{user.repo_set.count}} repositor{% ifequal user.repo_set.count 1 %}y{% else %}ies{% endifequal %}</li>
						{% for repo in user.repo_set.all %}
						<li class="body">{{repo.creation_date}} <a href="{{repo.get_absolute_url}}">{{repo.long_name}}</a></li>
						{% endfor %}
						<li class="foot">&nbsp;</li>
						{% else %}
						<li class="body">No repositories found for this user.</li>
						{% endif %}
					</ul>
				</div>
				<br />
				<div id="create-repo" class="dialog">
					<p class="title"><strong>Create a repository</strong></p>
					<ul>
						<form action='.' method='post'>{% csrf_token %}
						{% for field in repo_form %}
						<li class="label">{{field.label_tag}}:</li>
						<li class="field">{{field}}</li>
						{% endfor %}
						<li class="body"><input type='submit' name='createrepo' value='Create repository for {{user.username}}' /></li>
						</form>
					</ul>
				</div><!-- #repos -->
				{% else %}
				<div id="login-box" class="dialog">
					<form action='./' method='post'>{% csrf_token %}
						<p class="title"><strong>Login</strong></p>
						<ul>
							{% for field in login_form %}
								{% if field.errors %}
								<li class="body">
									{{field.errors}}
								</li>
								{% endif %}
							<li class="body">
								<div>{{field.label_tag}}</div>
								<div>{{field}}</div>
							</li>
							{% endfor %}
							<li class="foot"><input type="submit" id="login" value="Login" /></li>
						</ul>
					</form>
				</div><!-- #login-box -->
				{% endif %}
			</div>
{% endblock %}