diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2015-01-05 15:42:20 +0100 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2015-01-05 15:42:20 +0100 |
commit | d5fdb1271429805536739f241af8a591456b9639 (patch) | |
tree | 58e10a8bed1309ec322e31bed6f0f480e2013a5e | |
parent | e7942ed47914dae8dd8c9d9bdd127cb364af251b (diff) |
Add generic view and faq template.
Change-Id: I446625d843b3903e91005c4bc45a38631da40f7a
-rw-r--r-- | app/dashboard/templates/faq.html | 91 | ||||
-rw-r--r-- | app/dashboard/views/generic.py | 32 |
2 files changed, 123 insertions, 0 deletions
diff --git a/app/dashboard/templates/faq.html b/app/dashboard/templates/faq.html new file mode 100644 index 0000000..32f03bb --- /dev/null +++ b/app/dashboard/templates/faq.html @@ -0,0 +1,91 @@ +{% extends "base.html" %} +{%- block meta -%} + <meta name="csrf-token" content="{{ csrf_token_r() }}"> +{%- endblock %} +{% block title %}{{ page_title|safe }}{% endblock %} +{% block content %} +<div class="row"> + <div class="page-header"> + <h4>Frequently Asked Questions</h4> + </div> + <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> + <ol> + <li> + <a href="#what-is" + title="What's kernelci.org?"> + What's kernelci.org? + </a> + </li> + <li> + <a href="#the-code" + title="Where can I find the code that kernelci.org is built on?"> + Where can I find the code that kernelci.org is built on? + </a> + </li> + <li> + <a href="#build-test" + title="How can I partecipate in the build test phase?"> + How can I partecipate in the build test phase? + </a> + </li> + <li> + <a href="#boot-test" + title="How can I partecipate in the boot test phase?"> + How can I partecipate in the boot test phase? + </a> + </li> + <li> + <a href="#my-board" + title="I would like to have my board boot tested, how can I do it?"> + I would like to have my board boot tested, how can I do it? + </a> + </li> + <li> + <a href="#send-hw" + title="Can I send you my boards?"> + Can I send you my boards? + </a> + </li> + </ol> + <hr /> + <div class="faq"> + <dl> + <dt id="what-is">What's kernelci.org?</dt> + <dd>kernelci.org, this website, is a build and boot automation tool.</dd> + <dt id="the-code">Where can I find the code that kernelci.org is built on?</dt> + <dd> + The code powering kernelci.org can be found at the <em>Linaro Git Code Hosting</em>: <a title="Linaro Git Code Hosting" href="https://git.linaro.org">https://git.linaro.org</a>. + <br /> + There are two main components: + <ol> + <li> + <a title="Kernel CI website source code" href="https://git.linaro.org/infrastructure/kernel-ci-frontend.git">This website</a> + </li> + <li> + <a title="Kernel CI API source code" href="https://git.linaro.org/infrastructure/kernel-ci-backend.git"> + The Kernel CI API + </a> + </li> + </ol> + </dd> + <dt id="build-test">How can I partecipate in the build test phase?</dt> + <dd>You can't.</dd> + <dt id="boot-test">How can I partecipate in the boot test phase?</dt> + <dd>You can't.</dd> + <dt id="my-board">I would like to have my board boot tested, how can I do it?</dt> + <dd>You can't.</dd> + <dt id="send-hw">Can I send you my boards?</dt> + <dd>No you can't.</dd> + </dl> + </div> + </div> +</div> +{% endblock %} +{%- block scripts %} +{{ super() }} +<script type="text/javascript"> +$(document).ready(function() { + $('#li-info').addClass("active"); +}); +</script> +{%- endblock %} diff --git a/app/dashboard/views/generic.py b/app/dashboard/views/generic.py new file mode 100644 index 0000000..abbd3d7 --- /dev/null +++ b/app/dashboard/views/generic.py @@ -0,0 +1,32 @@ +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +"""Contain all the generic views that do not need any sort of logic.""" + +from flask import ( + current_app as app, + render_template +) +from flask.views import View + + +class GenericView(View): + + PAGE_TITLE = app.config.get("DEFAULT_PAGE_TITLE") + + +class FaqView(GenericView): + + def dispatch_request(self, *args, **kwargs): + FAQ_TITLE = "%s — %s" % (self.PAGE_TITLE, "FAQ") + return render_template("faq.html", page_title=FAQ_TITLE) |