"Add/Edit/delete turn"
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}Ajax{% endblock %}
|
||||
{% block main %}
|
||||
<section class='inline'>
|
||||
<article class='left'>
|
||||
<h3>Get HTML response from AJAX</h3>
|
||||
<p>Click the refresh button to get the HTML response.</p>
|
||||
<p>The response may randomly be a voluntary error so you should try it more than once.</p>
|
||||
Refresh: <input type='button' class='refresh' value=' '
|
||||
onclick='javascript:get_html_from_ajax(document.getElementById("html_container"), "/get_html_from_ajax");'>
|
||||
</article>
|
||||
<article class='right'>
|
||||
<h3>Upload files with AJAX</h3>
|
||||
<p>Select files to upload</p>
|
||||
<p>The response may randomly be a voluntary error so you should try it more than once.</p>
|
||||
Upload files:
|
||||
<div class='file_upload'>
|
||||
<!--
|
||||
Input file is a tricky hack (see tetawebapp.css and tetawebapp.js)
|
||||
-->
|
||||
<input type='button' id='upload_icon_1' class='upload' title='Upload' value=' '/>
|
||||
<input type='file' id='upload_input_1' multiple
|
||||
title='Upload'
|
||||
onchange='javascript:upload_file_from_ajax(this, "/upload", "TETA_ERR");'
|
||||
onmouseover='javascript:lit(document.getElementById("upload_icon_1"));'
|
||||
onmouseout='javascript:unlit(document.getElementById("upload_icon_1"));'/>
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
<hr/>
|
||||
<article class='right' id='html_container'></article>
|
||||
<hr/>
|
||||
<section class='inline'>
|
||||
<article class='left'>
|
||||
<h3>Set value via AJAX</h3>
|
||||
<p>Send value to the application.</p>
|
||||
<p>If value is empty or is "We Make Porn" (case sensitive), an error is raised.</p>
|
||||
<input type='text' id='value_sender'>
|
||||
<input type='button' value="Try me" onclick='javascript:set_value_from_ajax(document.getElementById("value_sender"), "/set_value_from_ajax", "TETA_ERR");'>
|
||||
</article>
|
||||
<article class='right'>
|
||||
<h3>Get value from AJAX</h3>
|
||||
<p>Get a random value from the application.</p>
|
||||
<p>Randomly raises a voluntary error so you should try it more than once.</p>
|
||||
<input type='text' id='value_receiver'>
|
||||
<input type='button' value="Try me" onclick='javascript:get_value_from_ajax(document.getElementById("value_receiver"), "/get_value_from_ajax", "TETA_ERR");'>
|
||||
</article>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -1,24 +0,0 @@
|
||||
<h3>This is the title</h3>
|
||||
<img src='/static/images/dummy_pic.png' alt='dummy pic' title='dummy pic'/>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
|
||||
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
||||
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
|
||||
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
|
||||
officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
||||
sed do eiusmod tempor incididunt ut labore
|
||||
</p>
|
||||
<p>This <a href='/plop.html'>link</a> will lead to an error page</p>
|
||||
<p>
|
||||
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
||||
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
|
||||
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
|
||||
officia desers unt mollit anim id est laborum.
|
||||
</p>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
|
||||
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
||||
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
|
||||
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
|
||||
officia deserunt mollit anim id est laborum.
|
||||
</p>
|
||||
@@ -1,12 +0,0 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}Articles{% endblock %}
|
||||
{% block main %}
|
||||
<article>
|
||||
<h3>Informations personnelles</h3>
|
||||
<p>
|
||||
Please select your article
|
||||
</p>
|
||||
</article>
|
||||
<article id='article_receiver'>
|
||||
</article>
|
||||
{% endblock %}
|
||||
@@ -1,65 +0,0 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}Articles{% endblock %}
|
||||
{% block main %}
|
||||
<article class='right'>
|
||||
<h3>Article #{{ ID }}</h3>
|
||||
<img src='/static/images/dummy_pic.png' alt='dummy pic' title='dummy pic'/>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
|
||||
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
||||
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
|
||||
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
|
||||
officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
||||
sed do eiusmod tempor incididunt ut labore
|
||||
</p>
|
||||
<p>This <a href='/plop.html'>link</a> will lead to an error page</p>
|
||||
<p>
|
||||
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
||||
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
|
||||
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
|
||||
officia desers unt mollit anim id est laborum.
|
||||
</p>
|
||||
<ul>
|
||||
<li>plop</li>
|
||||
<li>plap</li>
|
||||
<li>plip</li>
|
||||
</ul>
|
||||
<ol>
|
||||
<li>plop</li>
|
||||
<li>plap</li>
|
||||
<li>plip</li>
|
||||
</ol>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
|
||||
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
||||
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
|
||||
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
|
||||
officia deserunt mollit anim id est laborum.
|
||||
</p>
|
||||
</article>
|
||||
<article class='left'>
|
||||
<h3>Another disposition</h3>
|
||||
<img src='/static/images/dummy_pic.png' alt='dummy pic' title='dummy pic'/>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
|
||||
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
||||
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
|
||||
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
|
||||
officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
||||
sed do eiusmod tempor incididunt ut labore
|
||||
</p>
|
||||
<p>
|
||||
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
||||
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
|
||||
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
|
||||
officia deserunt mollit anim id est laborum.
|
||||
</p>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
|
||||
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
||||
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum
|
||||
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
|
||||
officia deserunt mollit anim id est laborum.
|
||||
</p>
|
||||
</article>
|
||||
{% endblock %}
|
||||
@@ -1,68 +0,0 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}Basics{% endblock %}
|
||||
{% block main %}
|
||||
<article class='right'>
|
||||
<h3>Basics</h3>
|
||||
<p>
|
||||
Thanks to <a href='http://flask.pocoo.org/'>Python/Flask</a> with <strong>TetaWebApp</strong> most of the output things come to life via
|
||||
<a href='http://jinja.pocoo.org/docs/2.10/'>Jinja2 HTML templates</a>
|
||||
and is 100% <strong title='Bulshit inside'>HTML5 ready©</strong>.
|
||||
</p>
|
||||
<p>
|
||||
Colors and fonts are managed from separated CSS files letting you easily
|
||||
change the default theme to your favorite colors and icon set.
|
||||
</p>
|
||||
<pre>
|
||||
/*
|
||||
* Here are the font definitions.
|
||||
* You can modify it or create your own and make it loaded
|
||||
* after this one in the HTML header section of the index.html
|
||||
* template file.
|
||||
*/
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto Condensed";
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: var(--font-normal);
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Roboto Condensed";
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: var(--font-bold);
|
||||
}
|
||||
</pre>
|
||||
<pre>
|
||||
/*
|
||||
* Here are the base color scheme and icon set.
|
||||
* You can modify it or create your own using the same variables
|
||||
* and make it loaded after this one but before the fonts.css in
|
||||
* the HTML header section of the index.html template file.
|
||||
*/
|
||||
:root {
|
||||
--coloured-bg: #FF5D00;
|
||||
--light-coloured-bg: #FFB387;
|
||||
--clear-bg: #E5E5E5;
|
||||
--mid-bg: #BBBBBB;
|
||||
--dark-bg: #2B2B2B;
|
||||
--dark-border: #888888;
|
||||
--text-color: #555555;
|
||||
--white: #FFFFFF;
|
||||
--black: #000000;
|
||||
--font-normal: url("/static/fonts/RobotoCondensed-Regular.ttf") format("truetype");
|
||||
--font-bold: url("/static/fonts/RobotoCondensed-Bold.ttf") format("truetype");
|
||||
--banner-logo: url(/static/images/logo.png);
|
||||
--add_icon: url(/static/images/add.png);
|
||||
--edit_icon: url(/static/images/edit.png);
|
||||
--login_icon: url(/static/images/login.png);
|
||||
--logout_icon: url(/static/images/logout.png);
|
||||
--refresh_icon: url(/static/images/refresh.png);
|
||||
--save_icon: url(/static/images/save.png);
|
||||
--search_icon: url(/static/images/search.png);
|
||||
--trash_icon: url(/static/images/trash.png);
|
||||
}
|
||||
</pre>
|
||||
</article>
|
||||
{% endblock %}
|
||||
@@ -1,12 +0,0 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}Database{% endblock %}
|
||||
{% block main %}
|
||||
<article class='right'>
|
||||
<h3>Accessing database</h3>
|
||||
<p>
|
||||
Even if using <a href='http://flask-sqlalchemy.pocoo.org/2.3/'>Flask-SQLAlchemy</a> to retrieve data
|
||||
stored in <strong>Postgres</strong> databases is the recommended way to use <strong>TetaWebApp</strong>,
|
||||
you're free to use the database connector that suits your need.
|
||||
</p>
|
||||
</article>
|
||||
{% endblock %}
|
||||
@@ -1,53 +0,0 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}Inputs{% endblock %}
|
||||
{% block main %}
|
||||
<article class='right'>
|
||||
<h3>The input collection</h3>
|
||||
<p>
|
||||
Have a look to the input collection:
|
||||
</p>
|
||||
<input type='text'/>
|
||||
<button>Click me</button>
|
||||
<br/>
|
||||
<textarea cols='25'></textarea>
|
||||
<br/>
|
||||
<select>
|
||||
{% for item in menu %}
|
||||
<option>{{ item[0] }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<input type='submit' value='Click me too'/>
|
||||
<br/>
|
||||
<input type='button' value='And me !' />
|
||||
<br/>
|
||||
<input type='button' class='add' title='Add' value=' '/>
|
||||
<input type='button' class='edit' title='Edit' value=' '/>
|
||||
<input type='button' class='login' title='Login' value=' '/>
|
||||
<input type='button' class='logout' title='Logout' value=' ' onclick='javascript:logout();'/>
|
||||
<input type='button' class='refresh' title='Refresh' value=' '/>
|
||||
<input type='button' class='save' title='Save' value=' '/>
|
||||
<input type='button' class='search' title='Search' value=' '/>
|
||||
<input type='button' class='trash' title='Trash' value=' '/>
|
||||
<!--
|
||||
Input file is a tricky hack (see tetawebapp.css and tetawebapp.js)
|
||||
-->
|
||||
<div class='file_upload'>
|
||||
<input type='button' id='upload_icon_1' class='upload' title='Upload' value=' '/>
|
||||
<input type='file' id='upload_input_1' name='files' multiple
|
||||
title='Upload'
|
||||
onchange='javascript:upload_file_from_ajax(this, "/upload", "TETA_ERR");'
|
||||
onmouseover='javascript:lit(document.getElementById("upload_icon_1"));'
|
||||
onmouseout='javascript:unlit(document.getElementById("upload_icon_1"));'/>
|
||||
</div>
|
||||
<br/>
|
||||
<pre>
|
||||
#!/bin/sh
|
||||
# This is code sample
|
||||
while [ 1 ]
|
||||
do
|
||||
echo "Tits or GTFO !"
|
||||
sleep .1
|
||||
done
|
||||
</pre>
|
||||
</article>
|
||||
{% endblock %}
|
||||
@@ -1,18 +0,0 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}Login{% endblock %}
|
||||
{% block nav %}{% endblock %}
|
||||
{% block main %}
|
||||
<article class='login'>
|
||||
<h3>Login</h3>
|
||||
</article>
|
||||
{% if message != '' %}
|
||||
<pre>{{ message }}</pre>
|
||||
{% endif %}
|
||||
<article class='left'>
|
||||
<form method='POST' action='/login'>
|
||||
Login: <input id='login' name='login' type='text' />
|
||||
Password: <input id='password' name='password' type='password' />
|
||||
<input type='submit' value='Log me in' onclick='javascript:return verify_login();'>
|
||||
</form>
|
||||
</article>
|
||||
{% endblock %}
|
||||
@@ -1,18 +0,0 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}TODO{% endblock %}
|
||||
{% block main %}
|
||||
<article class='right'>
|
||||
<h3>TODO list</h3>
|
||||
<ul>
|
||||
<li><strike>Basic menu management</strike></li>
|
||||
<li>Installation wizard</li>
|
||||
<li>Back office for basic content management</li>
|
||||
<li><strike>Basic Ajax support</strike></li>
|
||||
<li><strike>Session management</strike></li>
|
||||
<li>File upload</li>
|
||||
<li>Basic documentation</li>
|
||||
<li><strike>Horizontal navbar</strike></li>
|
||||
<li><strike>License</strike></li>
|
||||
</ul>
|
||||
</article>
|
||||
{% endblock %}
|
||||
30
templates/turn_by_id.html
Normal file
30
templates/turn_by_id.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}Mise à jour du tour de staff{% endblock %}
|
||||
{% block main %}
|
||||
<article>
|
||||
<h3>Tour de staff:</h3>
|
||||
<form method='POST' action='/turn/update/{{ turn.id }}'>
|
||||
<label>Role: </label><select id='role_id' name='role_id'>
|
||||
{% for role in roles %}
|
||||
{% set selected = '' %}
|
||||
{% if role.id == turn.role_id %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option {{ selected }} value='{{ role.id }}'>{{ role.role }}</option>
|
||||
{% endfor %}
|
||||
</select><br/>
|
||||
<label>Jour de la semaine: </label><select id='day' name='day'>
|
||||
{% for day in days %}
|
||||
{% set selected = '' %}
|
||||
{% if turn.wday == day %}
|
||||
{% set selected="selected" %}
|
||||
{% endif %}
|
||||
<option {{ selected }} value='{{ day }}'>{{ day }}</option>
|
||||
{% endfor %}
|
||||
</select><br/>
|
||||
<label>Début (HH:MM:SS) </label><input id='start' name='start' type='text' maxlength=8 value='{{ turn.start_time }}'/><br/>
|
||||
<label>Fin: (HH:MM:SS) </label><input id='end' name='end' type='text' maxlength=8 value='{{ turn.end_time }}'/><br/>
|
||||
<input type='submit' value='Enregistrer' onclick='javascript:return save_turn();'/>
|
||||
</form>
|
||||
</article>
|
||||
{% endblock %}
|
||||
@@ -1,22 +0,0 @@
|
||||
{% extends "index.html" %}
|
||||
{% block title %}Nouveau tour de staff{% endblock %}
|
||||
{% block main %}
|
||||
<article>
|
||||
<h3>Miuse à jour du tour de staff</h3>
|
||||
<form method='POST' action='/turn/update/{{ turn[0].id }}'>
|
||||
<label>Role: </label><select id='role_id' name='role_id'>
|
||||
{% for role in roles %}
|
||||
<option value='{{ role.id }}'>{{ role.role }}</option>
|
||||
{% endfor %}
|
||||
</select><br/>
|
||||
<label>Jour de la semaine: </label><select id='day' name='day'>
|
||||
{% for day in days %}
|
||||
<option value='{{ day }}'>{{ day }}</option>
|
||||
{% endfor %}
|
||||
</select><br/>
|
||||
<label>Début (HH:MM:SS) </label><input id='start' name='start' type='text' maxlength=8/><br/>
|
||||
<label>Fin: (HH:MM:SS) </label><input id='end' name='end' type='text' maxlength=8/><br/>
|
||||
<input type='submit' value='Enregistrer' onclick='javascript:return save_turn();'/>
|
||||
</form>
|
||||
</article>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user