mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-03-30 06:59:50 +01:00
[svn] Weeks of local changes.
- Import is now non-destructive - Parsers write output to a log file (path be specified in settings) - databaseReset.py content been divided into separate functions which can be called for varying levels of deletion and importing - control panel (view, template, urlpattern) added for deleting and importing - Logins and signup fixed - CaveArea model updated, view, hierarchical url patterns, and beginning of template added - New site style Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8324 by cucc @ 5/3/2009 5:56 AM
This commit is contained in:
@@ -5,28 +5,35 @@
|
||||
<link rel="stylesheet" type="text/css" href="{{ settings.MEDIA_URL }}css/main3.css" />
|
||||
<title>{% block title %}THE TITLE{% endblock %}</title>
|
||||
<script src="{{ settings.MEDIA_URL }}js/base.js" type="text/javascript"></script>
|
||||
<script src="{{ settings.MEDIA_URL }}js/jquery.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#killEyeCandy").click(function () {
|
||||
$("#leftMargin").fadeIn("slow");
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div id="expoHeader"> <img id="frontPageBanner" src="{{ settings.MEDIA_URL }}loserBanner.jpg"/>
|
||||
<div id="expoHeaderText">
|
||||
<h1>CUCC Expeditions to Austria: 1976 - </h1>
|
||||
<div id="expoFinalDate">
|
||||
<h1>2009</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
<div id="editLink"> {% block loginInfo %}
|
||||
|
||||
<div id="header">
|
||||
<h1>CUCC Expeditions to Austria: 1976 - 2009</h1>
|
||||
<div id="editLinks"> {% block loginInfo %}
|
||||
{% if user.username %}
|
||||
You are logged in as {{ user.username }}.
|
||||
You are logged in as {{ user.username }} {% if user.person %}<a href="{{ user.person.get_absolute_url }}">{{ user.person }}</a>{% endif %}.
|
||||
| <a href="{{ settings.URL_ROOT }}/accounts/logout/">Log out</a> {% else %} <a href="{{ settings.URL_ROOT }}/accounts/register">Sign up</a> | <a href="{{ settings.URL_ROOT }}/accounts/login/">Log in</a> {% endif %}
|
||||
{% endblock%}
|
||||
| <a href="{{ settings.URL_ROOT }}">Home </a> |
|
||||
| <a href="{{ settings.URL_ROOT }}">Home </a> | <a href="#" id="killEyeCandy">Kill Eyecandy</a> |
|
||||
{% block editLink %}
|
||||
|
||||
{% endblock %} </div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% block nav %}
|
||||
<!-- Use id="nav" for the left side menu -->
|
||||
{% endblock %}
|
||||
@@ -39,7 +46,16 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="push"></div>
|
||||
</div>
|
||||
<div id="footer"> {% block footer %} <a href="http://cucc.survex.com"> CUCC website</a>| <a href="http://cucc.survex.com/expo"> Expedition website </a>| <a href="{% url frontpage %}"> Troggle front page </a>| <a href="{% url caveindex %}"> All caves </a>| <a href="{% url personindex %}"> All cavers </a>| <a href="{% url caveindex %}"> Virtual survey binder </a>| <a href="{% url survey %}"> Expedition statistics </a>| <a href="{% url calendar 2007 %}"> Expedition calendar </a> {% endblock %} </div>
|
||||
<div class="footer">
|
||||
<img id="banner" src="{{ settings.MEDIA_URL }}expoBanner.gif"/>
|
||||
</div>
|
||||
|
||||
<img id="leftMargin" src="{{ settings.MEDIA_URL }}eieshole.jpg">
|
||||
<img id="rightMargin" src="{{ settings.MEDIA_URL }}goesser.jpg">
|
||||
|
||||
<div class="footer" id="footerLinks">
|
||||
<a href="http://cucc.survex.com"> CUCC website</a>| <a href="http://cucc.survex.com/expo"> Expedition website </a>| <a href="{% url frontpage %}"> Troggle front page </a>| <a href="{% url caveindex %}"> All caves </a>| <a href="{% url personindex %}"> All cavers </a>| <a href="{% url caveindex %}"> Virtual survey binder </a>| <a href="{% url survey %}"> Expedition statistics </a>| <a href="{% url calendar 2007 %}"> Expedition calendar </a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{% extends "cavebase.html" %}
|
||||
{% load wiki_markup %}
|
||||
|
||||
{% block content %}
|
||||
{{ cavearea.description|wiki_to_html_short }}
|
||||
{{ cavearea.name|wiki_to_html_short }}
|
||||
{{ cavearea.parentArea|wiki_to_html_short }}
|
||||
{{ cavearea.survexFile|wiki_to_html_short }}
|
||||
{% endblock %}
|
||||
37
templates/controlPanel.html
Normal file
37
templates/controlPanel.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<form name="form1" method="post" action="">
|
||||
|
||||
<h3>Dump:</h3>
|
||||
|
||||
<table>
|
||||
<tr><td>Dump entire database and recreate tables: </td><td><input type="checkbox" name="dump_db" /></td></tr>
|
||||
</table>
|
||||
|
||||
<h3>Import (non-destructive):</h3>
|
||||
|
||||
<table>
|
||||
<tr><td>caves from cavetab2.csv using parsers\cavetab.py</td><td> <input type="checkbox" class="parser" name="import_cavetab"/></td></tr>
|
||||
<tr><td>logbook entries using parsers\logbooks.py</td><td><input type="checkbox" name="import_logbooks"/></td></tr>
|
||||
<tr><td>people from folk.csv using parsers\people.py</td><td><input type="checkbox" name="import_folk"/></td></tr>
|
||||
<tr><td>QMs using parsers\QMs.py</td><td><input type="checkbox" name="QMs" value="import_QMs" /></td></tr>
|
||||
<tr><td>survey scans using parsers\surveys.py</td><td><input type="checkbox" name="import_surveys" /></td></tr>
|
||||
<tr><td>survex data using parsers\survex.py</td><td><input type="checkbox" name="survex" value="import_survex" /></td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<p>
|
||||
<input type="submit" id="Import" value="Import">
|
||||
|
||||
<input type="submit" name="check_all_import" id="check_all_import" value="Check all">
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<h3>Export to csv:</h3>
|
||||
<table>
|
||||
<tr>
|
||||
<td>caves to cavetab2.csv</td><td> <input name="export_cavetab" type="submit" id="export_cavetab" value="Export" disabled /></td></tr>
|
||||
</label>
|
||||
</table>
|
||||
{% endblock %}
|
||||
@@ -2,10 +2,37 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>Troggle profile selection page</h2>
|
||||
|
||||
Hello, {{ user }}.
|
||||
|
||||
<br /><br />
|
||||
|
||||
{% if user.person %}
|
||||
This is where you go to associate a new user account with a pre-existing profile from old expo data.
|
||||
|
||||
<br /><br />
|
||||
|
||||
However, you already have a profile- your name should be {{user.person.first_name}} {{user.person.last_name}}. If you don't believe me, go see it at: <br /><br /> <a href= {{ user.person.get_absolute_url }}> {{ user.person.get_absolute_url }} </a> <br /><br /> or edit it at:
|
||||
<br /><br /> <a href= {{ user.person.get_admin_url }}> {{ user.person.get_admin_url }} </a>.<br /><br />
|
||||
|
||||
If your account is associated with the wrong person's profile due to inebriation or incompetance during account setup, click <a href="{{ user.person.get_absolute_url }}/?clear_profile=True">here</a> to dissasociate your profile from your user account.
|
||||
|
||||
{% else %}
|
||||
|
||||
You have an account in the system, but no profile. If you have been on expo before, please choose yourself from the list below.
|
||||
<br /><br />
|
||||
|
||||
<form method="post">
|
||||
{{ form.as_p }}
|
||||
<input type="submit" />
|
||||
<input name="" type="submit" value="This is me!" />
|
||||
</form>
|
||||
<br />
|
||||
|
||||
Yes, you could choose the wrong person if you want. That would be lame. Instead, do something that's actually funny. For example, fry a random object or maybe take some mac and cheese somewhere it doesn't usually get to go. Perhaps you can start a new tradition of laminating the expo leader.
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if form.errors %}
|
||||
<p class="errornote">Please correct the errors below</p>
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
registration_form.html | {{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<h1>activate.html</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
You are now activated.
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
New troggle account registered
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<h1>activate.html</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<p>
|
||||
Hello, {{user}}! Your account is now activated. You've also been logged in automatically for your convenience. Use the links in the upper right to control this in the future.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you have been on the expedition in the past, you already have a profile in the system; <a href={% url profiles_select_profile %}>click here </a> to find it and link it to your account. Otherwise, please <a href={% url profiles_create_profile %}> create yourself a new profile</a>.
|
||||
</p>
|
||||
{% endblock %}
|
||||
@@ -1,3 +1,10 @@
|
||||
Activate your account in {{ expiration_days }} days...
|
||||
{{ URL_ROOT }}{% url registration_activate activation_key %}
|
||||
Hello,
|
||||
|
||||
Glad you're joining the CUCC EXPO team! Please go to
|
||||
|
||||
{{ site }}{% url registration_activate activation_key %}
|
||||
|
||||
to activate your account. Do this within {{ expiration_days }}, or else you'll have to sign up again.
|
||||
|
||||
Yours,
|
||||
The magical troggle
|
||||
@@ -9,5 +9,5 @@ registration_complete.html | {{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Thank you for signing up, {{ user.username }}. An email with the activation code has been sent to your inbox. If you have been on the expedition in the past, you already have a profile in the system; <a href={% url profiles_select_profile %}>click here </a> to find it and link it to your account. Otherwise, please <a href={% url profiles_create_profile %}> create yourself a new profile</a>.
|
||||
Thank you for signing up. An email with the activation code has been sent to your inbox.
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user