[Patchew-devel] [PATCH 04/16] template: Simpify op.icon default

Fam Zheng posted 16 patches 5 years, 9 months ago
[Patchew-devel] [PATCH 04/16] template: Simpify op.icon default
Posted by Fam Zheng 5 years, 9 months ago
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 www/templates/series-detail.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/templates/series-detail.html b/www/templates/series-detail.html
index 02ce72c..c7b7f1d 100644
--- a/www/templates/series-detail.html
+++ b/www/templates/series-detail.html
@@ -40,7 +40,7 @@
   <ul>
     {% for op in series.extra_ops %}
     <li>
-      <span class="fa fa-{% if op.icon %}{{ op.icon }}{% else %}question{% endif %}"></span><a
+      <span class="fa fa-{{ op.icon | default:"question" }}"></span><a
         href="{{ op.url }}">{{ op.title }}</a></li>
     {% endfor %}
   </ul>
-- 
2.17.2

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel
Re: [Patchew-devel] [PATCH 04/16] template: Simpify op.icon default
Posted by Paolo Bonzini 5 years, 9 months ago
On 21/11/18 03:08, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  www/templates/series-detail.html | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/www/templates/series-detail.html b/www/templates/series-detail.html
> index 02ce72c..c7b7f1d 100644
> --- a/www/templates/series-detail.html
> +++ b/www/templates/series-detail.html
> @@ -40,7 +40,7 @@
>    <ul>
>      {% for op in series.extra_ops %}
>      <li>
> -      <span class="fa fa-{% if op.icon %}{{ op.icon }}{% else %}question{% endif %}"></span><a
> +      <span class="fa fa-{{ op.icon | default:"question" }}"></span><a
>          href="{{ op.url }}">{{ op.title }}</a></li>
>      {% endfor %}
>    </ul>
> 

Applied, thanks.

Paolo

_______________________________________________
Patchew-devel mailing list
Patchew-devel@redhat.com
https://www.redhat.com/mailman/listinfo/patchew-devel