You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/07/15 15:00:19 UTC

[airavata-django-portal] branch master updated (a9a7dc4 -> 05c76fa)

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git.


    from a9a7dc4  AIRAVATA-3123 Create storage home dir on login
     new cdb040d  AIRAVATA-3114 Allow for hiding airavata django apps
     new 05c76fa  Fix django app cards layout on home page

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 django_airavata/context_processors.py               |  3 ++-
 django_airavata/settings.py                         |  4 ++++
 django_airavata/templates/django_airavata/home.html | 16 ++++------------
 3 files changed, 10 insertions(+), 13 deletions(-)


[airavata-django-portal] 01/02: AIRAVATA-3114 Allow for hiding airavata django apps

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit cdb040d0ac88f97ab50b89d0cca90f5c9c75ba81
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Mon Jul 15 10:59:46 2019 -0400

    AIRAVATA-3114 Allow for hiding airavata django apps
---
 django_airavata/context_processors.py | 3 ++-
 django_airavata/settings.py           | 4 ++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/django_airavata/context_processors.py b/django_airavata/context_processors.py
index a70d857..2ddbeae 100644
--- a/django_airavata/context_processors.py
+++ b/django_airavata/context_processors.py
@@ -59,7 +59,8 @@ def get_notifications(request):
 def airavata_app_registry(request):
     """Put airavata django apps into the context."""
     airavata_apps = [app for app in apps.get_app_configs()
-                     if isinstance(app, AiravataAppConfig)]
+                     if isinstance(app, AiravataAppConfig) and
+                     app.label not in settings.HIDDEN_AIRAVATA_APPS]
     # Sort by app_order then by verbose_name (case-insensitive)
     airavata_apps.sort(
         key=lambda app: "{:09}-{}".format(app.app_order,
diff --git a/django_airavata/settings.py b/django_airavata/settings.py
index 964e40a..d566811 100644
--- a/django_airavata/settings.py
+++ b/django_airavata/settings.py
@@ -79,6 +79,10 @@ INSTALLED_APPS = [
     'webpack_loader',
 ]
 
+# List of app labels for Airavata apps that should be hidden from menus
+# For example: HIDDEN_AIRAVATA_APPS = ['django_airavata_dataparsers']
+HIDDEN_AIRAVATA_APPS = []
+
 # AppConfig instances from custom Django apps
 CUSTOM_DJANGO_APPS = []
 


[airavata-django-portal] 02/02: Fix django app cards layout on home page

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 05c76fa78a25ee21a48dbc6e9bbadf9a91beea4d
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Mon Jul 15 11:00:06 2019 -0400

    Fix django app cards layout on home page
---
 django_airavata/templates/django_airavata/home.html | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/django_airavata/templates/django_airavata/home.html b/django_airavata/templates/django_airavata/home.html
index 42f4e8c..9c5ae3b 100644
--- a/django_airavata/templates/django_airavata/home.html
+++ b/django_airavata/templates/django_airavata/home.html
@@ -14,10 +14,8 @@
         {% endif %}
 </div>
 {% if user.is_authenticated %}
-    {% for app in airavata_apps %}
-    {% if not forloop.counter|divisibleby:"2" %}
     <div class="row">
-    {% endif %}
+    {% for app in airavata_apps %}
         <div class="col-sm-6 d-flex">
             <div class="card flex-grow-1">
                 <div class="card-body">
@@ -27,15 +25,11 @@
                 </div>
             </div>
         </div>
-    {% if forloop.counter|divisibleby:"2" %}
-    </div>
-    {% endif %}
     {% endfor %}
+    </div>
 
-    {% for app in custom_apps %}
-    {% if not forloop.counter|divisibleby:"2" %}
     <div class="row">
-    {% endif %}
+    {% for app in custom_apps %}
         <div class="col-sm-6 d-flex">
             <div class="card flex-grow-1">
                 <div class="card-body">
@@ -45,10 +39,8 @@
                 </div>
             </div>
         </div>
-    {% if forloop.counter|divisibleby:"2" %}
-    </div>
-    {% endif %}
     {% endfor %}
+    </div>
 {% endif %}
 </div>
 </main>