Browse Source

changed templates regarding conrols section

php2python
Holger Frey 7 years ago
parent
commit
7a919daacf
  1. 4
      ordr2/static/css/style.css
  2. 60
      ordr2/templates/account/login.jinja2
  3. 20
      ordr2/templates/errors/forbidden.jinja2
  4. 20
      ordr2/templates/errors/not_found.jinja2
  5. 15
      ordr2/templates/layout.jinja2
  6. 120
      ordr2/templates/pages/faq.jinja2
  7. 66
      ordr2/templates/pages/welcome.jinja2

4
ordr2/static/css/style.css

@ -718,3 +718,7 @@ hgroup .info {
.page-controls h1 { font-size: 25px; } .page-controls h1 { font-size: 25px; }
} }
/*================ STYLES FOR php2python BRANCH ================*/
input[value="password:mapping"] + div { margin-bottom:10px; }

60
ordr2/templates/account/login.jinja2

@ -4,34 +4,36 @@
{% block subtitle %} Login {% endblock subtitle %} {% block subtitle %} Login {% endblock subtitle %}
{% block content %} {% block content %}
<div class="container"> <div class="content">
<div class="row"> <div class="container">
<div class="span6 offset3"> <div class="row">
<h1>Log in</h1> <div class="span6 offset3">
{{ macros.flash_messages() }} <h1>Log in</h1>
</div> {{ macros.flash_messages() }}
</div> </div>
<div class="row"> </div>
<div class="span6 offset3"> <div class="row">
<form action="{{request.resource_url(request.root, 'account', 'login')}}" method="post" class="form-horizontal"> <div class="span6 offset3">
<fieldset class="control-group"> <form action="{{request.resource_url(request.root, 'account', 'login')}}" method="post" class="form-horizontal">
<label for="input01" class="control-label">Username</label> <fieldset class="control-group">
<div class="controls"> <label for="input01" class="control-label">Username</label>
<input type="text" name="username" class="span3" size="30"> <div class="controls">
</div> <input type="text" name="username" class="span3" size="30">
</fieldset> </div>
<fieldset class="control-group"> </fieldset>
<label for="password" class="control-label">Password</label> <fieldset class="control-group">
<div class="controls"> <label for="password" class="control-label">Password</label>
<input type="password" name="password" class="span3" size="30"> <div class="controls">
</div> <input type="password" name="password" class="span3" size="30">
</fieldset> </div>
<fieldset class="form-actions"> </fieldset>
<input type="hidden" name="csrf_token" value="{{get_csrf_token()}}"> <fieldset class="form-actions">
<button class="btn primary large" type="submit">Log in</button> <input type="hidden" name="csrf_token" value="{{get_csrf_token()}}">
</fieldset> <button class="btn primary large" type="submit">Log in</button>
</form> </fieldset>
</div> </form>
</div> </div>
</div>
</div>
</div> </div>
{% endblock content %} {% endblock content %}

20
ordr2/templates/errors/forbidden.jinja2

@ -3,16 +3,18 @@
{% block subtitle %} Access Denied {% endblock subtitle %} {% block subtitle %} Access Denied {% endblock subtitle %}
{% block content %} {% block content %}
<div class="container"> <div class="content">
<div class="row"> <div class="container">
<div class="row">
<div class="span12"> <div class="span12">
<hgroup id="access-denied"> <hgroup id="access-denied">
<h1>Access Denied!!!</h1> <h1>Access Denied!!!</h1>
<p class="info">You do not have the permission to access this page.</p> <p class="info">You do not have the permission to access this page.</p>
</hgroup> </hgroup>
</div> </div>
</div> </div>
</div>
</div> </div>
{% endblock content %} {% endblock content %}

20
ordr2/templates/errors/not_found.jinja2

@ -3,16 +3,18 @@
{% block subtitle %} Not Found {% endblock subtitle %} {% block subtitle %} Not Found {% endblock subtitle %}
{% block content %} {% block content %}
<div class="container"> <div class="content">
<div class="row"> <div class="container">
<div class="row">
<div class="span12"> <div class="span12">
<hgroup id="access-denied"> <hgroup id="access-denied">
<h1>These are not the droids<br>you are looking for</h1> <h1>These are not the droids<br>you are looking for</h1>
<p class="info">Whatever you wanted to see was not found on this server.</p> <p class="info">Whatever you wanted to see was not found on this server.</p>
</hgroup> </hgroup>
</div> </div>
</div> </div>
</div>
</div> </div>
{% endblock content %} {% endblock content %}

15
ordr2/templates/layout.jinja2

@ -11,7 +11,8 @@
<link rel="stylesheet" href="{{request.static_url('ordr2:static/css/bootstrap.css')}}" type="text/css" media="screen"> <link rel="stylesheet" href="{{request.static_url('ordr2:static/css/bootstrap.css')}}" type="text/css" media="screen">
<link rel="stylesheet" href="{{request.static_url('ordr2:static/css/bootstrap-responsive.css')}}" type="text/css" media="screen"> <link rel="stylesheet" href="{{request.static_url('ordr2:static/css/bootstrap-responsive.css')}}" type="text/css" media="screen">
<link rel="stylesheet" href="{{request.static_url('ordr2:static/css/style.css')}}" type="text/css" media="screen" /> <link rel="stylesheet" href="{{request.static_url('ordr2:static/css/style.css')}}" type="text/css" media="screen" />
<link rel="stylesheet" href="{{request.static_url('deform:static/css/form.css')}}" type="text/css" media="screen" />
<!--[if !IE 7]> <!--[if !IE 7]>
<style type="text/css"> <style type="text/css">
#wrap {display:table;height:100%} #wrap {display:table;height:100%}
@ -46,7 +47,7 @@
</ul> </ul>
{% else %} {% else %}
<ul class="nav"> <ul class="nav">
<li {% if context.nav_highlight == 'register' %} class="active" {% endif %}><a href="{{request.resource_url(request.root, 'register')}}">Register</a></li> <li {% if context.nav_highlight == 'register' %} class="active" {% endif %}><a href="{{request.resource_url(request.root, 'account', 'register')}}">Register</a></li>
<li {% if context.nav_highlight == 'about' %} class="active" {% endif %}><a href="{{request.resource_url(request.root, 'about')}}">About</a></li> <li {% if context.nav_highlight == 'about' %} class="active" {% endif %}><a href="{{request.resource_url(request.root, 'about')}}">About</a></li>
</ul> </ul>
<form action="{{request.resource_url(request.root, 'account', 'login')}}" method="post" class="navbar-form pull-right"> <form action="{{request.resource_url(request.root, 'account', 'login')}}" method="post" class="navbar-form pull-right">
@ -59,11 +60,11 @@
</div> </div>
</div> </div>
</header> </header>
<div class="content {#<?php echo ($controls) ? ' controls' : ''; ?>#}">
{% block content %} {% block content %}
<p>No content</p> <p>No content</p>
{% endblock content %} {% endblock content %}
</div>
<footer> <footer>
<div class="copy"> <div class="copy">

120
ordr2/templates/pages/faq.jinja2

@ -3,72 +3,74 @@
{% block subtitle %} FAQ {% endblock subtitle %} {% block subtitle %} FAQ {% endblock subtitle %}
{% block content %} {% block content %}
<div class="container"> <div class="content">
<h1>Frequently Asked Questions</h1> <div class="container">
<h1>Frequently Asked Questions</h1>
<section> <section>
<h2>Account</h2> <h2>Account</h2>
<div class="well"> <div class="well">
<h3> <h3>
Why can't I log in? It always says: &quot;You entered the wrong unsername and/or password.&quot; Why can't I log in? It always says: &quot;You entered the wrong unsername and/or password.&quot;
</h3> </h3>
<p> <p>
First of all, just because <em>ordr</em> tells you that you have entered a wrong username or password doesn't mean that's necesseraily true. Sound dumb? But actually this is a security measure, which helps against brood force attacks because the adversary doesn't know if the username he guessed was correct or not. First of all, just because <em>ordr</em> tells you that you have entered a wrong username or password doesn't mean that's necesseraily true. Sound dumb? But actually this is a security measure, which helps against brood force attacks because the adversary doesn't know if the username he guessed was correct or not.
</p> </p>
<p> <p>
Usually there are two common reasons why you can't log in. There are: Usually there are two common reasons why you can't log in. There are:
</p> </p>
<ol> <ol>
<li><em>Your account hasn't been activated by an admin yet.</em> &ndash; In this case ask a admin if he already has activated your account.</li> <li><em>Your account hasn't been activated by an admin yet.</em> &ndash; In this case ask a admin if he already has activated your account.</li>
<li><em>You mistyped your password or username.</em> &ndash; Just try it another time and make sure caps log isn't activated.</li> <li><em>You mistyped your password or username.</em> &ndash; Just try it another time and make sure caps log isn't activated.</li>
</ol> </ol>
</div> </div>
<div class="well"> <div class="well">
<h3> <h3>
Why can't I choose my own username? Why can't I choose my own username?
</h3> </h3>
<p> <p>
We want to enforce a specific guideline for the username. Namely <em>first name</em> followed immediately by the <em>last name</em>. This way everyone can easily identify the person, who placed an order. So please enter your real name into the registration form. Otherwise your account may not been activated because no one knows who you are. We want to enforce a specific guideline for the username. Namely <em>first name</em> followed immediately by the <em>last name</em>. This way everyone can easily identify the person, who placed an order. So please enter your real name into the registration form. Otherwise your account may not been activated because no one knows who you are.
</p> </p>
</div> </div>
<div class="well"> <div class="well">
<h3> <h3>
Why can I only edit my email after I registered? Why can I only edit my email after I registered?
</h3> </h3>
<p> <p>
Your username depends on your first and last name. Changing the username is not allowed, therefore you are also not allowed to change your first and last name afterwards. Even admins can not change your first/last name and your username. Your username depends on your first and last name. Changing the username is not allowed, therefore you are also not allowed to change your first and last name afterwards. Even admins can not change your first/last name and your username.
</p> </p>
</div> </div>
</section> </section>
<section> <section>
<h2>Ordering</h2> <h2>Ordering</h2>
<div class="well"> <div class="well">
<h3> <h3>
I have an consumable, which I am ordering regulary but isn't in the databse. Can I add it? I have an consumable, which I am ordering regulary but isn't in the databse. Can I add it?
</h3> </h3>
<p> <p>
Unfortunately you can not add consumables to the databse yourself. But ask an admin or purchaser. They're certainly to help you out. Unfortunately you can not add consumables to the databse yourself. But ask an admin or purchaser. They're certainly to help you out.
</p> </p>
</div> </div>
</section> </section>
<section> <section>
<h2>Miscellaneous</h2> <h2>Miscellaneous</h2>
<div class="well"> <div class="well">
<h3> <h3>
I have found a bug where can I report it? I have found a bug where can I report it?
</h3> </h3>
<p> <p>
If you have found a bug or an issue with the software please use <a href="https://git.cpi.imtek.uni-freiburg.de/holgi/ordr2/issues">this page here</a>. If you have found a bug or an issue with the software please use <a href="https://git.cpi.imtek.uni-freiburg.de/holgi/ordr2/issues">this page here</a>.
You need an <a href="https://wiki.cpi.imtek.uni-freiburg.de/CPIvServerDocumentation/GogsGitServer">gogs</a> account to submit an issue. Please be as specific as you can be. You need an <a href="https://wiki.cpi.imtek.uni-freiburg.de/CPIvServerDocumentation/GogsGitServer">gogs</a> account to submit an issue. Please be as specific as you can be.
</p> </p>
</div> </div>
</section> </section>
</div>
</div> </div>
{% endblock content %} {% endblock content %}

66
ordr2/templates/pages/welcome.jinja2

@ -3,38 +3,40 @@
{% block subtitle %} Welcome {% endblock subtitle %} {% block subtitle %} Welcome {% endblock subtitle %}
{% block content %} {% block content %}
<div class="container"> <div class="content">
<div class="container">
<div class="row"> <div class="row">
<div class="span12"> <div class="span12">
<hgroup id="welcome"> <hgroup id="welcome">
<h1>Welcome to <span class="brand">ordr</span>!</h1> <h1>Welcome to <span class="brand">ordr</span>!</h1>
<p class="quote">An order management system to simplify your shopping for laboratory supplies.</p> <p class="quote">An order management system to simplify your shopping for laboratory supplies.</p>
</hgroup> </hgroup>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="span12"> <div class="span12">
<p> <p>
<strong>What can order do for you?</strong> It will simplify the process of ordering laboratory supplies by using the power of the newest web technologies. Interested? Just follow the three steps below! <strong>What can order do for you?</strong> It will simplify the process of ordering laboratory supplies by using the power of the newest web technologies. Interested? Just follow the three steps below!
</p> </p>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="span4"> <div class="span4">
<h2>1. Register</h2> <h2>1. Register</h2>
<p>Registration is easy as 1-2-3. Just fill out the form on <?php echo anchor('account/register', 'this page');?> and as soon as an admin has activated your account the shopping can begin!</p> <p>Registration is easy as 1-2-3. Just fill out the form on <?php echo anchor('account/register', 'this page');?> and as soon as an admin has activated your account the shopping can begin!</p>
</div> </div>
<div class="span4"> <div class="span4">
<h2>2. Place an Order</h2> <h2>2. Place an Order</h2>
<p>A lot of the chemicals, supllies and so forth are already stored in the database, so you don't have to fill out the order form your self!</p> <p>A lot of the chemicals, supllies and so forth are already stored in the database, so you don't have to fill out the order form your self!</p>
</div> </div>
<div class="span4"> <div class="span4">
<h2>3. Get notified</h2> <h2>3. Get notified</h2>
<p>As soons as your purchase has arrived you will automatically get notified. Or you can use the orders overview to check what the working status is.</p> <p>As soons as your purchase has arrived you will automatically get notified. Or you can use the orders overview to check what the working status is.</p>
</div> </div>
</div> </div>
</div>
</div>{% endblock content %} </div>
{% endblock content %}