Commit 3d5092ae authored by Kedar A.'s avatar Kedar A. 💻

Template level memcache added

parent 3f24b855
{% 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>
......
{% 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">&#215;</a>
</div>
{% endcache %}
<!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();
......
{% 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() {
......
{% 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 %}
......
{% 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">
/*
......
{% 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>
......
{% 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 %}
......
{% 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 %}
......
{% 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 %}
......
{% 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;">
......
{% 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;
......
......@@ -44,7 +44,7 @@
<!-- left top panel -->
{% block meta_content %}
<h2 class="subheader">{% trans "Gallery" %}</h2>
<h2 class="subheader">{% trans title %}</h2>
{% endblock %}
......
{% 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 -->
......
{% 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">
......
{% 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 %}
......
{% 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>
......
......@@ -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 &nbsp; | &nbsp; <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>