[gimp-web/testing] Make sure we don't show downloads for macOS/Windows when not available.



commit c53c73c18f18d20babd972883d2b2a695af6623e
Author: Jehan <jehan girinstud io>
Date:   Fri Apr 27 15:09:08 2018 +0200

    Make sure we don't show downloads for macOS/Windows when not available.
    
    Links to old installers/packages still there of course!

 themes/newgimp/templates/downloads.html |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/themes/newgimp/templates/downloads.html b/themes/newgimp/templates/downloads.html
index f622133..bcc8eb6 100644
--- a/themes/newgimp/templates/downloads.html
+++ b/themes/newgimp/templates/downloads.html
@@ -73,6 +73,7 @@
     <div id='mac' class="os mac" markdown="1">
         <h2>GIMP for macOS</h2>
 
+        {% if MACOS_FILE is defined %}
         <p>
             <span class='win-button' id='osx-torrent'>
                 <a href="//download.gimp.org/pub/gimp/v{{ MACOS_MAJOR_MINOR_VER }}/osx/{{ MACOS_FILE 
}}.torrent">
@@ -106,6 +107,11 @@
             <kbd>{{ MACOS_HASH }}</kbd>
         </p>
 
+        {% else %}
+            <p>
+            There is no macOS package yet, sorry. Please check back later.
+            </p>
+        {% endif %}
 
 
         <h3>Older Downloads</h3>
@@ -170,6 +176,7 @@
     <div id='win' class="os win" markdown="1">
     <h2>GIMP for Windows</h2>
 
+    {% if WINDOWS_FILE is defined %}
     <p>
         <span class='win-button' id='win-torrent'>
             <a
@@ -212,6 +219,12 @@
         The MD5 hash sum for <code>{{ WINDOWS_FILE }}</code> is: <kbd>{{ WINDOWS_HASH }}</kbd>
     </p>
 
+    {% else %}
+        <p>
+        There is no Windows installer yet, sorry. Please check back later.
+        </p>
+    {% endif %}
+
     <h3>Older Downloads</h3>
     <p>
         Previous installers for Windows can be found here: <a href='//download.gimp.org/mirror/pub/gimp/v{{ 
WINDOWS_MAJOR_MINOR_VER }}/windows/'>download.gimp.org</a>.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]