diff options
24 files changed, 186 insertions, 175 deletions
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/UploadDoc.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/UploadDoc.html index b20d8e0..a7ed082 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/UploadDoc.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/UploadDoc.html @@ -1,5 +1,7 @@ {% extends "ndf/base.html" %} {% load i18n %} +{% load cache %} + {% load ndf_tags %} {% block title %} Upload Document {% endblock %} @@ -66,6 +68,7 @@ </fieldset> <fieldset> <legend>{% trans "Select Language" %}</legend> + {% cache 600 upload_doc_language request.LANGUAGE %} <div class="large-4 columns"> <select name="lan"> {% get_language_info_list for LANGUAGES as languages %} @@ -73,7 +76,9 @@ <option value="{{ language.code }}">{{ language.name }} </option> {% endfor %} - </select></div> + </select> + </div> + {% endcache %} </fieldset> <fieldset> diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/add_editor.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/add_editor.html index f7bf698..0a25a4b 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/add_editor.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/add_editor.html @@ -1,13 +1,17 @@ {% load ndf_tags %} +{% load i18n %} +{% load cache %} + {% get_group_name groupid as group_name_tag %} -{% load i18n %} <!-- orgitdown! --> +{% cache 3600 editor_static_files %} <script type="text/javascript" src="/static/ndf/orgitdown/jquery.orgitdown-foundation.js"></script> <!-- orgitdown! toolbar settings --> <script type="text/javascript" src="/static/ndf/orgitdown/skins/gstudio/set.js"></script> <!-- orgitdown! skin --> <link rel="stylesheet" type="text/css" href="/static/ndf/orgitdown/skins/gstudio/style.css" /> +{% endcache %} <style type="text/css"> @@ -226,6 +230,8 @@ $(".orgitdownButton.orgitdownButton10 a").click(function(){ }); </script> + +{% cache 3600 editor_menu %} <div id="bib-text" class="reveal-modal" data-reveal> <dl class="accordion" data-accordion id="bib1"> </dl> @@ -264,4 +270,4 @@ $(".orgitdownButton.orgitdownButton10 a").click(function(){ </dl> <a class="close-reveal-modal">×</a> </div> - +{% endcache %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/base.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/base.html index 33f49e7..aee51d4 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/base.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/base.html @@ -1,12 +1,13 @@ -<!DOCTYPE html> - -<html lang="en"> - {% load ndf_tags %} {% load i18n %} +{% load cache %} + {% get_group_name groupid as group_name_tag %} {% get_site_variables as site %} - + +{% cache 360 static_html_head %} <!-- cache static dependencies for a hour --> +<!DOCTYPE html> +<html lang="en"> <head> <meta charset="utf-8"> @@ -14,7 +15,6 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> - <title>{{ site.SITE_NAME }} - {% block title %} {% endblock %} </title> <link rel="shortcut icon" href="/static/ndf/images/favicon/logo.png"> @@ -36,21 +36,13 @@ <!--[if lte IE 8]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <!-- External library stylesheets--> +{% endcache %} + <title>{{ site.SITE_NAME }} - {% block title %} {% endblock %} </title> {% block head %}{% endblock %} <style> - /*div.group-link > a{*/ - /*color: black;*/ - /*font-size: 1.25em;*/ - /*padding-top: 0.5em;*/ - /*}*/ -/* - div.group-link {padding-top: 0.6em;} - - ul.nroer-menu > li.active { box-shadow: 0 4px 0 0 #0eacb5; } -*/ {% block style %}{% endblock %} </style> @@ -63,7 +55,7 @@ {% check_accounts_url request.path as is_ac_url %} {% include "ndf/header.html" %} - + <div class="workspace"> <div class="off-canvas-wrap" data-offcanvas> <div class="inner-wrap"> @@ -128,13 +120,16 @@ </div> </div> <!-- end of workspace --> - + + {% cache 360 footer request.LANGUAGE_CODE %} <!-- cache for footer --> {% include "ndf/footer.html" with site=site %} <!-- JS --> <script src="/static/ndf/bower_components/foundation/js/foundation.min.js"></script> <script src="/static/ndf/js/app.js"></script> - + + {% endcache %} <!-- end of footer cache --> + <script type="text/javascript"> // Initialize Foundation CSS $(document).foundation(); diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/collection_ajax_view.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/collection_ajax_view.html index e61971c..1676f37 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/collection_ajax_view.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/collection_ajax_view.html @@ -1,10 +1,13 @@ {% load ndf_tags %} {% load i18n %} +{% load cache %} {% block head %} + {% cache 3600 collection_view_static_files %} <link href="/static/ndf/bower_components/jqtree/jqtree.css" rel="stylesheet"> <script src="/static/ndf/bower_components/jqtree/tree.jquery.js"></script> <!-- checked --> + {% endcache %} <script type="text/javascript"> $(document).ready(function() { diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_forum.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_forum.html index 2a10338..d9b2b60 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_forum.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_forum.html @@ -1,13 +1,14 @@ {% extends "ndf/base.html" %} {% load ndf_tags %} {% load i18n %} +{% load cache %} + +{% cache 3600 create_forum request.LANGUAGE_CODE %} + {% block title %}Create Forum{% endblock %} {% block head %} - <!-- <link rel="stylesheet" href="/static/ndf/css/foundation-datepicker.css"> - <script src="/static/ndf/js/foundation-datepicker.js"></script> - --> <!-- Datetimepicker --> <!-- <link rel="stylesheet" media="all" type="text/css" href="/static/ndf/css/jquery-ui.css" /> --> <!-- <link rel="stylesheet" media="all" type="text/css" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css" /> @@ -24,7 +25,7 @@ <!-- orgitdown! skin --> <link rel="stylesheet" type="text/css" href="/static/ndf/orgitdown/skins/gstudio/style.css" /> - <style type="text/css"> +<!-- <style type="text/css"> /* #save_form{ margin-top: 2em; } .startDtInput, .endDtInput {box-shadow: 0 5px 5px #808080; width: 230px; } @@ -39,22 +40,14 @@ .text-align-middle { padding: 0.6em 1em 0 2em ; } */ </style> - - <!-- <script type="text/javascript"> - // $(document).ready(function(){ - - // $('#startdate').fdatepicker(); - // $('#enddate').fdatepicker(); - - // }); - </script> --> - + --> {% endblock %} +<!-- end of head block --> {% block meta_content %} -{% blocktrans %} <h3 class="subheader">Starting Discussions</h3> - <p class="text-justify">Use a relevant topic for the <b>forum</b> so that interested people can join the discussion</p> {% endblocktrans %} + {% blocktrans %} <h3 class="subheader">Starting Discussions</h3> + <p class="text-justify">Use a relevant topic for the <b>forum</b> so that interested people can join the discussion</p> {% endblocktrans %} {% endblock %} {% block body_content %} @@ -190,7 +183,9 @@ </form> --> {% endcomment %} -{% endblock %} +{% endblock %} <!-- end of body block --> + +{% endcache %} <!-- end of cache --> {% block script %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_group.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_group.html index 0f52924..e418991 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_group.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_group.html @@ -1,7 +1,9 @@ {% extends "ndf/base.html" %} {% load i18n %} {% load ndf_tags %} +{% load cache %} +{% cache 300 create_group request.LANGUAGE_CODE %} {% block title %} Create a new group {% endblock %} {% block meta_content %} @@ -24,6 +26,7 @@ {% endfor %} {% endif %} {% endblock %} +{% endcache %} {% block body_content %} @@ -31,7 +34,7 @@ <form id="create_group" class="row" method="post" action="{% url 'create_group' group_id %}"> {% csrf_token %} - + {% cache 3600 create_group request.LANGUAGE_CODE %} <div class="small-12 columns" style='display:table; border:1px; border-spacing:10px; '> <div style='display:table-row;' > <div style='display:table-cell;'> @@ -132,9 +135,12 @@ </div> <!-- <input type="hidden" id="nodes_list" value="{{nodes_list}}"> --> </div> + {% endcache %} </form> + {% endblock %} + {% block head %} <script type="text/javascript"> /* diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_partner.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_partner.html index 34646ad..919c598 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_partner.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_partner.html @@ -1,7 +1,7 @@ - {% extends "ndf/base.html" %} {% load i18n %} {% load ndf_tags %} +{% load cache %} {% block title %} Create a new partner {% endblock %} @@ -19,12 +19,13 @@ {% endif %} {% endblock %} -{% block body_content %} +{% block body_content %} <h2>{% trans "Create a new partner" %}</h2><br> <form data-abide id="create_group" class="row" method="post" action="{% url 'create_partner' group_id %}"> {% csrf_token %} + {% cache 3600 create_partner request.user.id request.LANGUAGE_CODE %} <fieldset> <legend>Partners Details</legend> @@ -196,6 +197,7 @@ </div> </fieldset> + {% endcache %} {% comment %} <div class="small-12 columns" style='display:table; border:1px; border-spacing:10px; '> @@ -205,7 +207,7 @@ </div> <div style='display:table-cell;'> <input type="text" id="group_name" name="groupname" placeholder="Enter partner Name" required> - <small class="error">{% trans "Name is required and must be a string" %}</small> + <small class="error">{% trans "Name is required and must be a string" %}</small> <label id="message" style="display:none; color:red"></label> </div> <font size="3" >{% trans "Partner Type" %}</font> @@ -240,7 +242,7 @@ </select> </div> </div> - <div style='display:table-row;'> + <div style='display:table-row;'> <div style='display:table-cell;'> <font size="3" >{% trans "Group Encryption policy" %}</font> </div> @@ -268,7 +270,7 @@ <input type="submit" value="Create Partner" id="grpsubmit" class="button"> </div> </div> - {% endcomment %} + {% endcomment %} <!-- <input type="hidden" id="nodes_list" value="{{nodes_list}}"> --> <input type="" value="Create Partner" id="grpsubmit" class="button disabled"> </div> diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_sub_group.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_sub_group.html index 93bf6f7..4428c29 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_sub_group.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_sub_group.html @@ -1,6 +1,7 @@ {% extends "ndf/base.html" %} {% load i18n %} {% load ndf_tags %} +{% load cache %} {% block title %} Create a sub group of {{maingroup}}{% endblock %} @@ -31,6 +32,8 @@ <form class="row" method="post" action="{% url 'create_sub_group' group_id %}" id="create_sub_group"> {% csrf_token %} + {% cache 3600 create_sub_group request.LANGUAGE_CODE %} + <div class="small-12 columns" style='display:table; border:1px; border-spacing:10px; '> <div style='display:table-row;' > <div style='display:table-cell;'> @@ -131,6 +134,7 @@ </div> <!-- <input type="hidden" id="nodes_list" value="{{nodes_list}}"> --> </div> + {% endcache %} </form> {% endblock %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_thread.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_thread.html index cfdf652..92fffc2 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_thread.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_thread.html @@ -1,9 +1,12 @@ - {% extends "ndf/base.html" %} {% load i18n %} {% load ndf_tags %} +{% load cache %} + {% block title %}Creating Thread to Forum: {{forum.name}} {% endblock %} +{% cache 3600 create_thread request.LANGUAGE_CODE %} + {% block head %} <!-- orgitdown! --> @@ -49,6 +52,8 @@ <p>{% trans "Threads are new ideas on the topic" %}</p> {% endblock %} +{% endcache %} + {% block body_content %} @@ -80,6 +85,7 @@ <form id="create_thread" method="POST"> {% csrf_token %} + {% cache 3600 create_thread_form request.LANGUAGE_CODE %} <!-- forum name --> <div class="row"> @@ -113,7 +119,8 @@ </div> </div> - + + {% endcache %} </form> {% endblock %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_table.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_table.html index b4e725c..dabfef6 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_table.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/data_review_table.html @@ -1,5 +1,10 @@ +{% load cache %} + + <table id="data-review-table" style="width:auto"> <!-- <table> --> + + {% cache 3600 create_data_review_table_head request.LANGUAGE_CODE %} <thead> <tr> <th class="text-center right-border" colspan="5">Autogenerated</th> @@ -61,6 +66,8 @@ </tr> </thead> + {% endcache %} + <tbody> <!-- Looping through each resource --> {% for resource in files %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/discussion.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/discussion.html index e23dbf7..6d0eced 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/discussion.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/discussion.html @@ -1,7 +1,8 @@ {% load ndf_tags %} {% load i18n %} +{% load cache %} -<div id="" class=""> +<div> <br/> <div onclick="createDiscussion()" id="create-discussion" data-id="{{ node.pk }}" class="button" style="margin-bottom:0;"> diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/edit_forum.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/edit_forum.html index 1813fa4..93c1bc8 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/edit_forum.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/edit_forum.html @@ -1,6 +1,10 @@ {% extends "ndf/base.html" %} {% load ndf_tags %} {% load i18n %} +{% load cache %} + +{% cache 300 edit_forum request.LANGUAGE_CODE %} + {% block title %}Edit Forum{% endblock %} {% block head %} @@ -185,6 +189,7 @@ --> {% endcomment %} {% endblock %} +{% endcache %} {% block script %} var old_forum_name; diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/file.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/file.html index 9a8eede..1eeadbf 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/file.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/file.html @@ -44,7 +44,7 @@ <!-- left top panel --> {% block meta_content %} - <h2 class="subheader">{% trans "Gallery" %}</h2> + <h2 class="subheader">{% trans title %}</h2> {% endblock %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/graph_collection.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/graph_collection.html index 492f5ad..590da26 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/graph_collection.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/graph_collection.html @@ -1,4 +1,7 @@ {% load i18n %} +{% load cache %} + +{% cache 3600 graph_collection_static_head %} {% block head %} @@ -124,6 +127,9 @@ } </style> + + {% endcache %} + <body> <!-- This is panel on LHS of graph --> diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/group_dashboard.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/group_dashboard.html index e6f98e4..9f776c9 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/group_dashboard.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/group_dashboard.html @@ -1,6 +1,8 @@ {% extends "ndf/base.html" %} {% load ndf_tags %} {% load i18n %} +{% load cache %} + {% block title %} {{username}} Dashboard Updates {% endblock %} {% block head %} @@ -107,13 +109,15 @@ <div id="group_picture"> + {% cache 600 group_profile_pic group_id %} {% if prof_pic_obj %} <img alt="profile picture for this group." src="{% url 'get_mid_size_img' group_id prof_pic_obj.pk %}" id="group-image" class="group-images th"> {% else %} <img src="/static/ndf/images/metaStudio-profile.svg" alt="Profile picture for this group." id="group-image" class="group-images th"> - {% endif %} + {% endif %} + {% endcache %} <!-- empty image tag to hold uploaded image --> <img src="" class="hide group-images" id="temp-group-image"> diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/groupdashboard.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/groupdashboard.html index abd2a12..e3d8ca8 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/groupdashboard.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/groupdashboard.html @@ -1,6 +1,8 @@ {% extends "ndf/node_details_base.html" %} {% load i18n %} +{% load cache %} {% load ndf_tags %} + <!-- from django.contrib.auth.decorators import login_required --> {% block title %} Group Dashboard {% endblock %} @@ -138,6 +140,7 @@ $(document).ready(function() {% endblock %} <!-- overide meta_content block from base.html --> +{% cache 300 groupdashboard_meta_content %} {% block meta_content %} <h4> @@ -157,6 +160,7 @@ $(document).ready(function() </div> {% endblock %} +{% endcache %} <!-- end of meta_content block --> {% block app_action_list %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/header.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/header.html index 48abd50..30f116e 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/header.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/header.html @@ -1,15 +1,18 @@ {% load get_nroer_menu get_user_group get_existing_groups_excluded get_profile_pic get_gapps_iconbar from ndf_tags %} {% load i18n %} +{% load cache %} <!-- <div class="contain-to-grid sticky"> --> <div class="row" id="top-headers"> <!-- top LHS logo --> + {% cache 3600 site_logo %} <a class="large-2 small-5 medium-5 columns drop-shadow logo" href="{{site.HOME_PAGE|default_if_none:'/home/'}}"> <img src="{{site.LOGO}}"> </a> - + {% endcache %} + <!-- two menus headers --> <div class="large-10 small-7 medium-7 columns two-nav-container"> @@ -26,6 +29,7 @@ <!-- Left Nav Section --> <!-- add GSTUDIO_SITE_NAME = "NROER" in the local_settings.py file, to check locally --> + {% cache 3600 top_header request.LANGUAGE_CODE request.path request.user.username %} {% if site.SITE_NAME == "NROER" %} <!-- NROER level one menu --> @@ -54,14 +58,16 @@ <li> <a {% for mapk, mapv in nroer_menu.mapping.items %} - {% if mapv in "Teachers, Schools, Interest Groups" %} - {% if each_sub_menu == mapk %} - href="/{{mapv}}" - {% if nroer_menu.sub_menu_selected == mapk %} - class="active" + + {% if mapv in "Teachers, Schools, Interest Groups" %} + {% if each_sub_menu == mapk %} + href="/{{mapv}}" + {% if nroer_menu.sub_menu_selected == mapk %} + class="active" + {% endif %} {% endif %} - {% endif %} - {% endif %} + {% endif %} + {% if each_sub_menu == mapk %} href="{% url 'partnerlist' mapv %}" {% if nroer_menu.sub_menu_selected == mapk %} @@ -133,6 +139,8 @@ </ul> {% endif %} + {% endcache %} + <!-- Closes Left Nav section --> <!-- Right Nav Section --> @@ -175,6 +183,8 @@ <!-- If logged in show user options --> {% if user.is_authenticated %} <li class="has-dropdown"> + + {% cache 300 profile_pic request.user.pk %} {% get_profile_pic request.user.pk as prof_pic %} {% if prof_pic %} @@ -188,6 +198,7 @@ {{ user.username }} </a> {% endif %} + {% endcache %} <ul class="dropdown text-center"> @@ -245,9 +256,11 @@ <!-- start of second nav or group level header--> <div class="contain-to-grid {% if request.path != '/welcome' %}{% if not is_ac_url %}sticky{% endif %}{% endif %} drop-shadow" id="group-level-header"> + <nav class="top-bar" data-topbar data-options="sticky_on: large" role="navigation"> {% if not is_ac_url %} {% if request.path != "/welcome" %} + {% cache 3600 group_header request.LANGUAGE_CODE request.path request.user.username %} <ul class="title-area"> <li class="name"> <h1><a href="{{site.HOME_PAGE|default_if_none:'/home/'}}"><i class="fi-home"></i></a></h1> @@ -340,7 +353,8 @@ </ul> </section> - {% endif%} <!-- end of "/welcome" landing page check --> + {% endcache %} + {% endif %} <!-- end of "/welcome" landing page check --> {% endif %} <!-- end of "accounts" urls check --> </nav> </div> diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/landing_page_nroer.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/landing_page_nroer.html index e1501f6..38fced5 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/landing_page_nroer.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/landing_page_nroer.html @@ -2,6 +2,7 @@ {% load i18n %} {% load ndf_tags %} +{% load cache %} {% block title %} {% trans "Welcome" %} {% endblock %} @@ -21,46 +22,13 @@ {% get_site_variables as site %} {% get_all_users_int_count as all_users %} {% get_all_file_int_count as all_files %} -<!-- - <div> - <div class="row"> - <div class="medium-6 columns"> - <section class="logo"> - <img src="/static/ndf/css/themes/nroer/logo.svg"> - <h1>National Repository <br>Of Open Educational Resources</h1> - </section> - </div> - <div class="medium-6 columns"> - </div> - </div> - </div> - --> + {% cache 1800 welcome_slider request.LANGUAGE_CODE %} <!-- caching slider for 30 mins --> + <article class="landing row"> <section class="promo"> <div class="banner"> <div id="group-banner"> -<!-- - <div class="slide row" style="background-color:#10a05d"> - <br/> - <i class="fi-torsos"></i> - <h3 class="medium-12 columns"> - <blockquote>Connecting Knowledge, Connecting People..</blockquote> - </h3> - - <div class="medium-8 columns"> - <p>The NROER is an ambitious inititative by the Government Of India to design and develop a knowledge management system for the benefit of every human on this planet.</p> - </div> - - <div class="medium-4 columns"> - <a href="../accounts/register/" class="main large ui button">Let's Join NROER</a> - </div> - - <h4 class="medium-12 columns"> - {{all_files}} open resources | <span>{{all_users}} Members</span> - </h4> - </div> - --> <div class="slide" style="background-color:#10a05d"> <i class="fi-torsos slide-back-image"></i> @@ -91,38 +59,6 @@ </div> </div> </div> -<!-- - <div class="slide row" style="background-color:#3710a0"> - <br/> - <i class="fi-web"></i> - <div class="medium-12 columns"> - <div class="row"> - <div class="medium-3 columns"> - <h3>Collaborative</h3> - <br/> - <h5>Built by the people, and for the people, we believe in making education a truly social process</h5> - </div> - <div class="medium-3 columns"> - <h3>Open</h3> - <br/> - <h5>The project is built on the philosophies of keeping knowledge free and open to everyone</h5> - </div> - <div class="medium-3 columns"> - <h3>Accessible</h3> - <br/> - <h5>With official partnerships with national educational organisations and institutes, NROER offers unparalleled reach to humanity</h5> - </div> - <div class="medium-3 columns"> - <h3>Semantic</h3> - <br/> - <h5>Developed using the latest in open semantic standards, educational resources can finally become machine readable</h5> - </div> - </div> - </div> - - </div> - - --> <div class="slide row" style="background-color:#0F69B4"> <i class="fi-lightbulb slide-back-image"></i> @@ -169,48 +105,17 @@ </h3> </div> </div> -<!-- <div class="row"> - <div class="small-12 columns"> - <h2></h2> - </div> - </div> - --> + </div> </div> </div> <!-- end of banner --> -<!-- - <div class="meta row"> - <div class="medium-4 columns"> - <a href="{{ site.PARTNERS }}" class="main large ui button"> - <h4>Partners</h4> - <p>Join a prestiguous list of institutions that provide a curated selection of high quality open educational content to the repository</p> - </a> - </div> - <div class="medium-4 columns"> - <a href="{{ site.CONTRIBUTE }}" class="main large ui button"> - <h4>Teachers and Students</h4> - <p>Publish your teaching material and build a profile as a valuable resource person for the country</p> - </a> - </div> - <div class="medium-4 columns"> - <a href="/home/e-library" class="main large ui button expand"> - <h4>Explore</h4> - <div class="row"> - <div class="medium-6 columns"> {{all_files}} <small>Open Resources</small> - </div> - <div class="medium-6 columns"> {{all_users}} <small>Members</small> - </div> - </div> - </a> - </div> - </div> ---> </section> </article> + {% endcache %} <script> diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/map_widget.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/map_widget.html index 211b436..ccabc07 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/map_widget.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/map_widget.html @@ -1,5 +1,9 @@ +{% load i18n %} +{% load cache %} + +{% cache 3600 map_widget_header %} {% block head %} -{% load i18n%} + <meta content="width=device-width, initial-scale=1.0" name="viewport"> <!-- JS Links --> @@ -35,7 +39,7 @@ .popup-content:focus { background-color: #FFFFE0; border-color: buttonface; border-style: dashed; margin-bottom: 0.5em; padding: 0.25em; } </style> - +{% endcache %} <body> @@ -55,6 +59,7 @@ <input type="hidden" value="{{ visited_location }}" name="last_visited_location"/> + {% cache 300 map_widget_JS mode source %} <script type="text/javascript"> @@ -64,12 +69,12 @@ osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}); // Lets try to access some Bhuvan WMS tiles, currently does not work - var bhuvan = L.tileLayer.wms("http://tile3.nrsc.gov.in/tilecache/tilecache.py", { - layers: 'bhuvan_imagery', - format: 'image/jpeg', - crs : L.CRS.EPSG4326, - attribution: "Indian Remote Sensing Satellites, NRSC" -}); + // var bhuvan = L.tileLayer.wms("http://tile3.nrsc.gov.in/tilecache/tilecache.py", { + // layers: 'bhuvan_imagery', + // format: 'image/jpeg', + // crs : L.CRS.EPSG4326, + // attribution: "Indian Remote Sensing Satellites, NRSC" + // }); // initialize the map on the "map" div with a given center and zoom var map = L.map('map').setView([25.92,79.84], 5).addLayer(osm); @@ -396,3 +401,5 @@ {% endif %} </script> + + {% endcache %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html index 1cc4043..fea071f 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_view.html @@ -1,7 +1,11 @@ {% load ndf_tags %} {% load i18n %} +{% load cache %} + {% get_group_name groupid as group_name_tag %} +{% cache 360 node_ajax_view request.LANGUAGE_CODE %} + <script src="/static/ndf/bower_components/foundation/js/foundation.min.js"></script> <!-- checked --> <script type="text/javascript"> $(document).foundation(); @@ -292,6 +296,8 @@ ul#navigation li a.last { {% get_schema node as schema %} +{% endcache%} + {% check_user_join request groupid as user_is_joined %} <div class="row page" itemscope itemtype="{{schema.1.type}}"> @@ -1160,6 +1166,7 @@ ul#navigation li a.last { </div> <!-- Only visible to the group admins and super user for managing group activities --> + {% comment %} <div class="content" id="view-manage"> <div class="row"> @@ -1215,6 +1222,8 @@ ul#navigation li a.last { </div> <a class="close-reveal-modal" aria-label="Close">×</a> </div> + + {% endcomment %} <!-- /////////////////// --> <div class="content" id="view-discussion"> diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_details_base.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_details_base.html index fa6c5d8..9554f10 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_details_base.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_details_base.html @@ -1,7 +1,7 @@ {% extends "ndf/base.html" %} {% load i18n %} {% load ndf_tags %} -{% load i18n %} + {% get_group_name groupid as group_name_tag %} {% get_group_type request.path request.user as group_type %} diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_edit_base.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_edit_base.html index 5e5d377..c7b5c8c 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_edit_base.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_edit_base.html @@ -2,9 +2,11 @@ {% load i18n %} {% load ndf_tags %} +{% load cache %} {% block title %} {{title}} - {{node.name|default_if_none:"Create"}} {% endblock %} +{% cache 3600 node_edit_base style %} {% block style %} .divider-line { font-size: xx-large; color:lightgray; } @@ -34,7 +36,7 @@ background-repeat:no-repeat; background-size: 48px 48px } {% endblock %} - +{% endcache %} {% block body_content %} @@ -118,6 +120,8 @@ background-repeat:no-repeat; background-size: 48px 48px <h5>{% trans "Settings" %}</h5> <div class="row"> {% if node.created_by == request.user.pk %} + + {% cache 300 node_edit_base_visibility node.access_policy request.LANGUAGE_CODE %} <div class="large-4 columns"> <span data-tooltip class="has-tip" title="Public pages can be viewed and edited by any group member, while private pages are only for you"><label>{% trans "Visibility" %}</label></span> </div> @@ -142,6 +146,8 @@ background-repeat:no-repeat; background-size: 48px 48px <span></span> </div> </div> + {% endcache %} + {% else %} {% if not node %} @@ -167,6 +173,8 @@ background-repeat:no-repeat; background-size: 48px 48px </div> + {% cache 300 node_edit_base_lang_loc request.LANGUAGE_CODE %} + <div class="row"> <div class="large-4 columns"> <label class="inline">{% trans "Language" %}</label> @@ -188,7 +196,8 @@ background-repeat:no-repeat; background-size: 48px 48px <i class="fi-marker"></i> {% trans "Add Location" %} </a> </div> - </div> + </div> + {% endcache %} </div> </div> @@ -224,6 +233,8 @@ background-repeat:no-repeat; background-size: 48px 48px <div class="small-12 columns" {% ifequal title "Quiz" %}style="display:none;"{% endifequal %}></div> </div> + {% cache 3600 node_edit_base_coll_type_radio request.LANGUAGE_CODE %} + <div class="choose" style="display:none;"> <div class="row"> @@ -258,6 +269,8 @@ background-repeat:no-repeat; background-size: 48px 48px </div> </div> + {% endcache %} + <div class="row drawers" style="display:none;"> <div class="small-12 columns"> <div id="collection_drawer" > @@ -270,6 +283,7 @@ background-repeat:no-repeat; background-size: 48px 48px {% endblock %} + {% cache 300 node_edit_base_metadata request.LANGUAGE_CODE %} <div class="content contents" id="panel-metadata" style="width:95%; display:none;" > <div class="row"> <h4>{% trans "Please add or edit Metadata" %} </h4> @@ -323,6 +337,7 @@ background-repeat:no-repeat; background-size: 48px 48px </div> <div id="metadata_info"></div> </div> + {% endcache %} <!-- Kept this bellow commented part for future reference(Don't delete this) --> @@ -392,6 +407,7 @@ background-repeat:no-repeat; background-size: 48px 48px {% block add_fields %} {% endblock %} <!-- Overlay : Map Widget --> + {% cache 300 node_edit_base_map_widget %} <div class="content reveal-modal graph-div" id="view-map-edit-widget" data-reveal> <!-- #{#% #if '/edit/' in request.path or '/image_detail/' in request.path or '/video_detail/' in request.path%} --> <a class="close-reveal-modal" >×</a> @@ -399,6 +415,7 @@ background-repeat:no-repeat; background-size: 48px 48px <!-- <div style="background-color:gray; width:100%; height:80%;"></div> --> <!-- #{#%# endif %} --> </div> + {% endcache %} <!-- <input type="hidden" id="nodes_list" value="{{nodes_list}}"> --> <input type="submit" id="save-node" value="Save as Draft And Preview" class="round button" /> diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/repository.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/repository.html index b15c853..9b4b4a8 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/repository.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/repository.html @@ -1,6 +1,9 @@ {% extends "ndf/base.html" %} {% load ndf_tags %} +{% load cache %} + +{% cache 3600 repository request.LANGUAGE_CODE %} {% block title %} Repository {% endblock %} @@ -78,4 +81,5 @@ $article.removeClass("medium-10").addClass("large-12"); </script> -{% endblock %}
\ No newline at end of file +{% endblock %} +{% endcache %}
\ No newline at end of file diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html index 8fe71b7..dac786a 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html +++ b/gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/theme.html @@ -1,5 +1,6 @@ {% extends "ndf/base.html" %} {% load i18n %} +{% load cache %} {% load ndf_tags %} {% load pagination_tags %} @@ -471,11 +472,13 @@ <hr/> {% if node %} + {% cache 300 theme_tree node.name request.LANGUAGE_CODE %} <!-- If "Theme" node --> - <div id="app-set-item" class="themes" data-url="{% url 'get_tree_hierarchy' groupid node.pk %}"></div> + <div id="app-set-item" class="themes" data-url="{% url 'get_tree_hierarchy' groupid node.pk %}"></div> <!-- testing --> {% include 'ndf/theme_drag_zoom_d3tree.html' %} + {% endcache %} {% endif %} @@ -484,7 +487,8 @@ <!-- For displaying themes items --> {% if themes_cards %} - + {% cache 300 theme_card_listing request.LANGUAGE_CODE %} + <div class="content row" id="panel2-4"> <ul class="small-block-grid-1 medium-block-grid-2 large-block-grid-4"> @@ -543,8 +547,9 @@ </ul> </div> - - + + {% endcache %} + {% endif %} {% if themes_list_items %} |