Browse Source

New page to let the user choose if he wants to use JSON or a simple form

Gu1 11 years ago
parent
commit
00ccb6040f

+ 29 - 0
ffdnispdb/static/css/style.css

@@ -122,6 +122,35 @@ input#search-input {
     height: 600px;
 }
 
+
+.project-choice {
+    padding: 30px;
+    background-color: #dddddd;
+    -webkit-border-radius: 6px;
+    -moz-border-radius: 6px;
+    border-radius: 6px;
+}
+
+.same-height-hack {
+    margin-bottom: -99999px;
+    padding-bottom: 99999px;
+}
+
+.same-height-borderfix {
+    margin-top: -15px;
+    padding: 0;
+}
+
+.project-choice h3 {
+    text-align: center;
+}
+
+
+
+/*
+ * Forms & stuff
+ */
+
 .control-group.required label:before {
     content: '*';
     color: red;

+ 18 - 4
ffdnispdb/templates/add_project.html

@@ -1,10 +1,24 @@
 {% extends "layout.html" %}
 
-{% block subtitle %}{{ _("Add a project") }}{% endblock %}
+{% block page_title %}{{ _("Add a project") }}{% endblock %}
 {% block body %}
-<div class="row">
-  <div class="span12">
-    KIKOO
+<div class="row-fluid">
+  <div class="span5 offset1 project-choice">
+    <h3>{{ _("Automatically from a JSON URL") }}</h3>
+    <p>{% trans %}You only have to give us the link to the JSON file describing your project, and we will crawl it periodicaly to update your informations.{% endtrans %}</p>
+    <br />
+    <br />
+    <p class="text-center">
+      <a class="btn btn-large btn-primary">{{ _("Heck yeah") }}</a>
+    </p>
+  </div>
+  <div class="span5 project-choice">
+    <h3>{{ _("Manually by filling a form") }}</h3>
+    <p>{% trans %}Don't have the ressources or time to host a JSON file ? Don't worry, you can also fill our simple form to give us the informations about your local ISP. Only problem, you'll have to come back here if you want to update it.{% endtrans %}</p>
+    <br />
+    <p class="text-center">
+      <a class="btn btn-large btn-primary" href="{{ url_for('create_project') }}">{{ _("That JSON thing is too cool for me") }}</a>
+    </p>
   </div>
 </div>
 {% endblock %}

File diff suppressed because it is too large
+ 1 - 1
ffdnispdb/templates/index.html


+ 1 - 1
ffdnispdb/views.py

@@ -89,7 +89,7 @@ def create_project_old():
             flash(u'Vous devez spécifier un nom.', 'error')
     return render_template('create_project.html')
 
-@app.route('/add-my-project', methods=['GET'])
+@app.route('/add-a-project', methods=['GET'])
 def add_project():
     return render_template('add_project.html')