]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: update package detail page
authorSujith H <sujith.h@gmail.com>
Fri, 29 Jul 2016 07:15:24 +0000 (07:15 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 10 Aug 2016 23:08:18 +0000 (00:08 +0100)
Update package details pages layer branch
and layer commit section for locally imported
layers. We add Not applicable to them along
with a helper text, which helps user understand
why its not applicable to those layers.

[YOCO #9911]

Signed-off-by: Sujith H <sujith.h@gmail.com>
lib/toaster/toastergui/templates/package_detail_base.html

index bce7fb2fa6d4485afcbd85f31a13e3fd6eb1f489..66f8e7f069264faadbdd77b0cc2f8bbe31688e9f 100644 (file)
                     {% endcomment %}
                 {% endif %}
             </dd>
-            {% if package.recipe.layer_version.branch %}
             <dt>
                 Layer branch
                 <span class="glyphicon glyphicon-question-sign get-help" title="The Git branch of the layer providing the recipe that builds this package"></span>
+                {%if package.recipe.layer_version.layer.local_source_dir %}
+               <dd>
+               <span class="text-muted">Not applicable</span>
+               <span class="glyphicon glyphicon-question-sign get-help" title="The source code of {{package.recipe.layer_version.layer.name}} is not in a Git repository, so there is no branch associated with it"></span>
+               </dd>
+               {% endif %}
             </dt>
+           {% if not package.recipe.layer_version.layer.local_source_dir %}
             <dd>{{package.recipe.layer_version.branch}}</dd>
-            {% endif %}
+           {% endif %}
             <dt>
                 Layer commit
                 <span class="glyphicon glyphicon-question-sign get-help" title="The Git commit of the layer providing the recipe that builds this package"></span>
+                {%if package.recipe.layer_version.layer.local_source_dir %}
+               <dd>
+               <span class="text-muted">Not applicable</span>
+               <span class="glyphicon glyphicon-question-sign get-help" title="The source code of {{package.recipe.layer_version.layer.name}} is not in a Git repository, so there is no commit associated with it"></span>
+               </dd>
+               {% endif %}
             </dt>
 
+           {% if not package.recipe.layer_version.layer.local_source_dir %}
             <dd class="iscommit">{{package.recipe.layer_version.commit}}</dd>
+           {% endif %}
 
         </dl>
       <div> <!-- end well -->