summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2015-10-17 10:45:49 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-27 07:23:22 +0000
commit86b4a10cc817abb5e3e63360dc8b3c550337f17c (patch)
tree3b774bcce858d9bc59d301f7e97c96b0dbadf1e1
parentf9cf4739fc85c9760ce748323dc7c8de3fa7eaec (diff)
downloadbitbake-86b4a10cc817abb5e3e63360dc8b3c550337f17c.tar.gz
toaster: Show mode-appropriate landing page
The same landing page is shown for both analysis and build modes. This means that users in analysis mode can see options which are not available or broken in that mode. Modify the landing page template to show a simple "run a build" message if the user is in analysis mode and has no builds yet. Also clean up the landing page HTML, because the indentation was a mess and the HTML was invalid. [YOCTO #8514] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/toaster/toastergui/templates/landing.html103
1 files changed, 58 insertions, 45 deletions
diff --git a/lib/toaster/toastergui/templates/landing.html b/lib/toaster/toastergui/templates/landing.html
index 45e95322d..65d8c3c62 100644
--- a/lib/toaster/toastergui/templates/landing.html
+++ b/lib/toaster/toastergui/templates/landing.html
@@ -6,53 +6,66 @@
{% block pagecontent %}
- <div class="container-fluid">
- <div class="row-fluid">
- <!-- Empty - no data in database -->
- <div class="hero-unit span12 well-transparent">
- <div class="row-fluid">
- <div class="span6">
- <h1>
- This is Toaster
- </h1>
- <p>A web interface to <a href="http://www.openembedded.org">OpenEmbedded</a> and <a href="http://www.yoctoproject.org/tools-resources/projects/bitbake">BitBake</a>, the <a href="http://www.yoctoproject.org">Yocto Project</a> build system.</p>
-
-
- {% if lvs_nos %}
- <p class="hero-actions">
- <a class="btn btn-primary btn-large" href="{% url 'newproject' %}">
- To start building, create your first Toaster project
- </a>
- </p>
- {% else %}
- <div class="alert alert-info lead air">
- Toaster has no layer information. Without layer information, you cannot run builds. To generate layer information you can:
- <ul>
- <li>
- <a href="http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html#layer-source">Configure a layer source</a>
- </li>
- <li>
- <a href="{% url 'newproject' %}">Create a project</a>, then import layers
- </li>
- </ul>
- </div>
- {% endif %}
-
- <ul class="unstyled">
- <li>
- <a href="http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html">Read the Toaster manual</a>
- </li>
- <li>
- <a href="https://wiki.yoctoproject.org/wiki/Contribute_to_Toaster">Contribute to Toaster</a>
- </li>
- </ul>
+ {% if BUILD_MODE %}
+ <!-- build mode -->
+ <div class="container-fluid">
+ <div class="row-fluid">
+ <div class="hero-unit span12 well-transparent">
+ <div class="row-fluid">
+ <div class="span6">
+ <h1>This is Toaster</h1>
+
+ <p>A web interface to <a href="http://www.openembedded.org">OpenEmbedded</a> and <a href="http://www.yoctoproject.org/tools-resources/projects/bitbake">BitBake</a>, the <a href="http://www.yoctoproject.org">Yocto Project</a> build system.</p>
+
+ {% if lvs_nos %}
+ <p class="hero-actions">
+ <a class="btn btn-primary btn-large" href="{% url 'newproject' %}">
+ To start building, create your first Toaster project
+ </a>
+ </p>
+ {% else %}
+ <div class="alert alert-info lead air">
+ Toaster has no layer information. Without layer information, you cannot run builds. To generate layer information you can:
+ <ul>
+ <li>
+ <a href="http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html#layer-source">Configure a layer source</a>
+ </li>
+ <li>
+ <a href="{% url 'newproject' %}">Create a project</a>, then import layers
+ </li>
+ </ul>
+ </div>
+ {% endif %}
+
+ <ul class="unstyled">
+ <li>
+ <a href="http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-manual.html">
+ Read the Toaster manual
+ </a>
+ </li>
+
+ <li>
+ <a href="https://wiki.yoctoproject.org/wiki/Contribute_to_Toaster">
+ Contribute to Toaster
+ </a>
+ </li>
+ </ul>
+ </div>
+
+ <div class="span6">
+ <img alt="Yocto Project" class="thumbnail" src="{% static 'img/toaster_bw.png' %}"/>
+ </div>
+
+ </div>
+ </div>
</div>
- <div class="span6">
- <img alt="Yocto Project" class="thumbnail" src="{% static 'img/toaster_bw.png' %}"/>
- </div>
- </div>
</div>
- </div>
+ {% else %}
+ <!-- analysis mode -->
+ <div class="alert alert-info lead top-air">
+ Toaster has not recorded any builds yet. Run a build from the command line to see it here.
+ </div>
+ {% endif %}
{% endblock %}