Commit 3ef8eb75 authored by Mathieu Rodic's avatar Mathieu Rodic

[CODE] rewrote HTML templates

applied proper indentation and nesting
parent a20dbe4f
<html>
<body>
<head>
<link rel="stylesheet" type="text/css" href="/static/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="/static/css/morris.css">
</head>
<body>
<div id="grp-container">
<!-- HEADER -->
<header id="grp-header" class="">
<!-- NAVIGATION -->
<div id="grp-navigation">
<h1 id="grp-admin-title">Gargantext</h1>
......@@ -19,13 +18,9 @@
</div>
</header>
<!-- CONTENT -->
<article id="grp-content" class="">
<!-- CONTENT TITLE -->
<header id="grp-content-title">
<br><br><br>
......@@ -35,7 +30,6 @@
<div class="jumbotron">
<!-- CONTENT-CONTAINER -->
<div id="grp-content-container">
<div class="g-d-c g-d-10 g-centered">
<form action="" method="post"><input type='hidden' name='csrfmiddlewaretoken' value='Yopwc8YatA3C68kSevZX9upoXdIcZzPn' />
<fieldset class="grp-module grp-module-login">
......@@ -43,25 +37,22 @@
<span class="grp-current-page">Login</span>
</h2a>
<div class="grp-module">
{% block main %}
<div id="login">
{% csrf_token %}
{% if next_page %}
<input type="hidden" name="the_next_page" value="{{ next_page }}" />
{% endif %}
<div class="grp-row">
<label class="control-label" for="username">Username</label>
<input type="text" id="username" name="username" placeholder="Username">
</div>
<div class="grp-row grp-connected">
<label class="control-label" for="password">Password</label>
<input type="password" name="password" id="password" placeholder="Password">
</div>
<div id="login">
{% csrf_token %}
{% if next_page %}
<input type="hidden" name="the_next_page" value="{{ next_page }}" />
{% endif %}
<div class="grp-row">
<label class="control-label" for="username">Username</label>
<input type="text" id="username" name="username" placeholder="Username">
</div>
<div class="grp-row grp-connected">
<label class="control-label" for="password">Password</label>
<input type="password" name="password" id="password" placeholder="Password">
</div>
</div>
{% endblock %}
</div>
</fieldset>
<div class="grp-module grp-submit-row">
......@@ -70,15 +61,14 @@
</ul>
</div>
</form>
</div>
{% endblock %}
</div>
</div>
</div>
</div>
</article>
</div>
</div>
</article>
</div>
......
......@@ -36,33 +36,36 @@
<div class="panel-body">
<div class="container">
<ul>
<li>Version 2.0</li>
<ul>
<li>[NAME] Red Lemon</li>
<li>[NLP] Turbo Parser, MELT</li>
<li>[FEATURE] Ngrams Table management</li>
<li>[FEATURE] Annotation local view</li>
<li>[FEATURE] Lexical Graph with temporal filter</li>
<li>[FEATURE] Graph bi-Partite</li>
</ul>
<li>Versions from 1.0 to 1.9</li>
<ul>
<li>[NAME] Rose Bonbon</li>
<li>[Law] Licence of Gargantext is (and will be for next versions) AGPL</li>
<li>[NLP] Turbo Parser, TreeTagger</li>
<li>[FEATURE] Advanced Chart</li>
<li>[FEATURE] Remove duplicates</li>
</ul>
<li>Versions from 0.1 to 0.9</li>
<ul>
<li>[NAME] Black Salade</li>
<li>[Law] Licence of Gargantext is GPL v3+ </li>
<li>[NLP] NLTK, TreeTagger</li>
<li>[FEATURE] Graph Explorer</li>
</ul>
<li>
Version 2.0
<ul>
<li>[NAME] Red Lemon</li>
<li>[NLP] Turbo Parser, MELT</li>
<li>[FEATURE] Ngrams Table management</li>
<li>[FEATURE] Annotation local view</li>
<li>[FEATURE] Lexical Graph with temporal filter</li>
<li>[FEATURE] Graph bi-Partite</li>
</ul>
</li>
<li>
Versions from 1.0 to 1.9
<ul>
<li>[NAME] Rose Bonbon</li>
<li>[Law] Licence of Gargantext is (and will be for next versions) AGPL</li>
<li>[NLP] Turbo Parser, TreeTagger</li>
<li>[FEATURE] Advanced Chart</li>
<li>[FEATURE] Remove duplicates</li>
</ul>
</li>
<li>
Versions from 0.1 to 0.9
<ul>
<li>[NAME] Black Salade</li>
<li>[Law] Licence of Gargantext is GPL v3+ </li>
<li>[NLP] NLTK, TreeTagger</li>
<li>[FEATURE] Graph Explorer</li>
</ul>
</li>
</ul>
</div>
</div>
......@@ -72,35 +75,41 @@
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseCommunity">
<center>
<h2>Community</h2>
</center>
</a>
</h2>
<h2 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseCommunity">
<center>
<h2>Community</h2>
</center>
</a>
</h2>
</div>
<div id="collapseCommunity" class="panel-collapse collapse" role="tabpanel">
<div class="panel-body">
<div class="container">
<ul>
<li>Mailing-lists</li>
<ul>
<li>User mailing-list: soon</li>
<li>Devel mailing-list: soon</li>
</ul>
<li>Code and repository access</li>
<ul>
<li>You are free to participate. Present yourself on mailing-lists or irc.</li>
</ul>
<li>IRC</li>
<ul>
<li>#gargantext on OFTC:</li>
<li>
<p><iframe src="http://webchat.oftc.net/?channels=#gargantext" width="500" height="350"></iframe></p>
<p>If the window is too small, just click <a href="http://webchat.oftc.net/?channels=#gargantext">here</a></p>
</li>
</ul>
<li>
Mailing-lists
<ul>
<li>User mailing-list: soon</li>
<li>Devel mailing-list: soon</li>
</ul>
</li>
<li>
Code and repository access
<ul>
<li>You are free to participate. Present yourself on mailing-lists or irc.</li>
</ul>
</li>
<li>
IRC
<ul>
<li>#gargantext on OFTC:</li>
<li>
<p><iframe src="http://webchat.oftc.net/?channels=#gargantext" width="500" height="350"></iframe></p>
<p>If the window is too small, just click <a href="http://webchat.oftc.net/?channels=#gargantext">here</a></p>
</li>
</ul>
</li>
</ul>
</div>
</div>
......@@ -109,98 +118,98 @@
{% if team %}
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseTeam">
<center>
<h2>Core team</h2>
</center>
</a>
</h2>
</div>
<div id="collapseTeam" class="panel-collapse collapse" role="tabpanel">
<div class="panel-body">
<div class="container">
<div class="row">
<div class="thumbnails">
{% for member in team %}
<div class="col-md-3 ">
<div class="thumbnail">
{% if member.picture %}
<img src="{% static "img/credits/"%}{{ member.picture }}" style="100px; height:150px">
{% else %}
<img src="{% static "img/logo.png" %}" style="100px; height:150px">
{% endif %}
<div class="caption">
<h3>{{ member.first_name }} {{member.last_name }}</h3>
{% if member.role %}
<p class="description">{{ member.role }}</p>
{% endif %}
{% if member.mail %}
<a href="mailto:{{ member.mail }}" class="btn btn-primary btn-xs">Mail</a>
{% endif %}
{% if member.website %}
<a href="{{ member.website }}" class="btn btn-primary btn-xs">Website</a>
<div class="panel-heading">
<h2 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseTeam">
<center>
<h2>Core team</h2>
</center>
</a>
</h2>
</div>
<div id="collapseTeam" class="panel-collapse collapse" role="tabpanel">
<div class="panel-body">
<div class="container">
<div class="row">
<div class="thumbnails">
{% for member in team %}
<div class="col-md-3 ">
<div class="thumbnail">
{% if member.picture %}
<img src="{% static "img/credits/"%}{{ member.picture }}" style="100px; height:150px">
{% else %}
<img src="{% static "img/logo.png" %}" style="100px; height:150px">
{% endif %}
<div class="caption">
<h3>{{ member.first_name }} {{member.last_name }}</h3>
{% if member.role %}
<p class="description">{{ member.role }}</p>
{% endif %}
{% if member.mail %}
<a href="mailto:{{ member.mail }}" class="btn btn-primary btn-xs">Mail</a>
{% endif %}
{% if member.website %}
<a href="{{ member.website }}" class="btn btn-primary btn-xs">Website</a>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endif %}
</div>
</div>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">
<center>
<h2>Institutional, research and financial support</h2>
<center>
<h3>Host institutions</h3>
<a href="http://www.cnrs.fr" target="_blank" >
<img src="{% static "img/credits/cnrs.png"%}" alt="CNRS" style="height:100px">
</a>
<a href="http://www.iscpif.fr" target="_blank" >
<img src="{% static "img/credits/iscpif.svg"%}" style="height:100px">
</a>
<a href="http://cams.ehess.fr" target="_blank" >
<img src="{% static "img/credits/cams.jpg"%}" style="height:100px">
<h2 class="panel-title">Institutional, research and financial support</h2>
<h3>Host institutions</h3>
<a href="http://www.cnrs.fr" target="_blank" >
<img src="{% static "img/credits/cnrs.png"%}" alt="CNRS" style="height:100px">
</a>
<a href="http://www.iscpif.fr" target="_blank" >
<img src="{% static "img/credits/iscpif.svg"%}" style="height:100px">
</a>
<a href="http://cams.ehess.fr" target="_blank" >
<img src="{% static "img/credits/cams.jpg"%}" style="height:100px">
</a>
<h3>Institutional Partners</h3>
<p>
{% for institution in institutions %}
<a href="{{ institution.website }}" target="_blank" >
<img src="{% static "img/credits/"%}{{ institution.picture }}" style="height:100px">
</a>
{% endfor %}
</p>
<h3>Institutional Partners</h3>
<p>
{% for institution in institutions %}
<a href="{{ institution.website }}" target="_blank" >
<img src="{% static "img/credits/"%}{{ institution.picture }}" style="height:100px">
</a>
{% endfor %}
</p>
<h4>Laboratory Partners</h4>
<p>
{% for labo in labos %}
<a href="{{ labo.website }}" target="_blank" >
<img src="{% static "img/credits/"%}{{ labo.picture }}" style="height:50px">
</a>
{% endfor %}
</p>
<h4>Grants</h4>
{% for grant in grants %}
<a href="{{ grant.website }}" target="_blank" >
<img src="{% static "img/credits/"%}{{ grant.picture }}" style="height:100px">
<h4>Laboratory Partners</h4>
<p>
{% for labo in labos %}
<a href="{{ labo.website }}" target="_blank" >
<img src="{% static "img/credits/"%}{{ labo.picture }}" style="height:50px">
</a>
{% endfor %}
</p>
<h4>Grants</h4>
{% for grant in grants %}
<a href="{{ grant.website }}" target="_blank" >
<img src="{% static "img/credits/"%}{{ grant.picture }}" style="height:100px">
</a>
{% endfor %}
</center>
</div>
</div>
</div>
</div>
......
......@@ -13,52 +13,51 @@
{% block content %}
<div class="container theme-showcase" role="main">
<div class="jumbotron">
<div class="row">
<div class="col-md-4 content">
<h1>Gargantext</h1>
<p>A web platform to explore text-mining</p>
<a class="btn btn-primary btn-lg" href="/projects" title="Click and test by yourself">Test Gargantext
</a>
<div class="jumbotron">
<div class="row">
<div class="col-md-4 content">
<h1>Gargantext</h1>
<p>A web platform to explore text-mining</p>
<a class="btn btn-primary btn-lg" href="/projects" title="Click and test by yourself">Test Gargantext
</a>
<p>
<span class="glyphicon glyphicon-warning-sign" aria-hidden="true"></span>
<small>
<i>
Some features may not work without a javascript optimized browser (Chromium for instance).
</i>
</small>
<span class="glyphicon glyphicon-warning-sign" aria-hidden="true"></span>
<small>
<i>
Some features may not work without a javascript optimized browser (Chromium for instance).
</i>
</small>
</p>
</div>
<div class="col-md-2 content"></div>
<div class="col-md-2 content"></div>
<div class="col-md-2 content">
<p class="right">
<div style="border:15px">
<img src="{% static "img/logo.png"%}" title="Logo designed by dacha and anoe" style="100px; height:150px; border:3px solid white">
</div>
</p>
</div>
</div>
<div class="col-md-2 content"></div>
<div class="col-md-2 content">
<p class="right">
<div style="border:15px">
<img src="{% static "img/logo.png"%}" title="Logo designed by dacha and anoe" style="100px; height:150px; border:3px solid white">
</div>
</p>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="content">
<center>
<img src="{% static "img/Gargantextuel-212x300.jpg"%}" title="Gargantextuel drawn by Cecile Meadel" style="border:2px solid black">
<!--
<h2>Introduction Video</h2>
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support this video sorry. Try Firefox or Chromium.
</video>
-->
</center>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="content">
<center>
<img src="{% static "img/Gargantextuel-212x300.jpg"%}" title="Gargantextuel drawn by Cecile Meadel" style="border:2px solid black">
<!--
<h2>Introduction Video</h2>
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support this video sorry. Try Firefox or Chromium.
</video>
-->
</center>
</div>
</div>
</div>
</div>
......@@ -66,28 +65,28 @@
<div class="container">
<div class="row">
<div class="row">
<div class="col-md-4 content">
<h3><a href="#" title="Random sentences in Gargantua's Books chapters, historically true">Historic</a></h3>
<p> {{ paragraph_gargantua }}</p>
</div>
<div class="col-md-4 content">
<h3><a href="#" title="Random sentences in Gargantua's Books chapters, historically true">Historic</a></h3>
<p> {{ paragraph_gargantua }}</p>
</div>
<div class="col-md-4 content">
<h3><a href="#" title="Randomized words, semantically and syntaxically falses." >Presentation</a></h3>
<p> {{ paragraph_lorem }}
</p>
</div>
<div class="col-md-4 content">
<h3><a href="#" title="Randomized words, semantically and syntaxically falses." >Presentation</a></h3>
<p> {{ paragraph_lorem }}
</p>
</div>
<div class="col-md-4 content">
<h3><a href="#" title="Randomized letters, true or false ?">Tutoreil</a></h3>
<p>
{{ paragraph_tutoreil }}
<!-- Why not French ? -->
<!-- find Cambridge source which inspired this --!>
</p>
</div>
<div class="col-md-4 content">
<h3><a href="#" title="Randomized letters, true or false ?">Tutoreil</a></h3>
<p>
{{ paragraph_tutoreil }}
<!-- Why not French ? -->
<!-- find Cambridge source which inspired this -->
</p>
</div>
......
......@@ -14,15 +14,10 @@
{% block content %}
<div class="container theme-showcase" role="main">
<div class="jumbotron">
<h1>Gargantext in maintenance</h1>
<h2>Thanks for your comprehension</h2>
</div>
<div class="jumbotron">
<h1>Gargantext in maintenance</h1>
<h2>Thanks for your comprehension</h2>
</div>
</div>
{% endblock %}
<html>
{% load staticfiles %}
<head>
<link rel="shortcut icon" href="{% static "/favicon.ico"%}">
{% block css %}
{% endblock %}
</head>
<body>
<!-- Fixed navbar -->
<div id="dafixedtop" class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-inner">
<button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" style="line-height:15px; height:10px; padding: 10px 10px;" href="/"><img src="/generated/img/logo.svg" title="Back to home."></a>
{% load staticfiles %}
<head>
<link rel="shortcut icon" href="{% static "/favicon.ico" %}">
{% block css %}
{% endblock %}
</head>
<body>
<!-- Fixed navbar -->
<div id="dafixedtop" class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-inner">
<button class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" style="line-height:15px; height:10px; padding: 10px 10px;" href="/"><img src="/generated/img/logo.svg" title="Back to home."></a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="/about/" title="More informations about the project, its sponsors and its authors.">About</a>
</li>
{% if user.is_authenticated %}
<li><a href="/projects/" title="All your projects are here.">Projects</a></li>
{% endif %}
{% if project %}
<li><a href="/project/{{project.id}}">{{project.name}}</a></li>
{% endif %}
{% if corpus %}
<li><a href="/project/{{project.id}}/corpus/{{corpus.id}}">{{corpus.name}}</a></li>
{% endif %}
</ul>
<ul class="nav pull-right">
<li class="dropdown">
<a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown" title="That is your login">
<i class="icon-user"></i>
{{ user }}
<i class="caret"></i>
</a>
<ul class="dropdown-menu">
<li><a tabindex="-1" href="http://www.iscpif.fr/tiki-index.php?page=gargantext_feedback" title="Send us a message (bug, thanks, congrats...)">Report Feedback</a></li>
<li class="divider"></li>
{% if user.is_authenticated %}
<li><a tabindex="-1" href="/auth/logout" title="Click here to logout especially on public devices">Logout</a></li>
{% else %}
<li><a tabindex="-1" href="/auth/login">Login</a></li>
{% endif %}
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="/about/" title="More informations about the project, its sponsors and its authors.">About</a>
</li>
{% if user.is_authenticated %}
<li><a href="/projects/" title="All your projects are here.">Projects</a></li>
{% endif %}
{% if project %}
<li><a href="/project/{{project.id}}">{{project.name}}</a></li>
{% endif %}
{% if corpus %}
<li><a href="/project/{{project.id}}/corpus/{{corpus.id}}">{{corpus.name}}</a></li>
{% endif %}
</ul>
<ul class="nav pull-right">
<li class="dropdown">
<a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown" title="That is your login"><i class="icon-user"></i> {{ user }}<i class="caret"></i>
</a>
<ul class="dropdown-menu">
<li><a tabindex="-1" href="http://www.iscpif.fr/tiki-index.php?page=gargantext_feedback" title="Send us a message (bug, thanks, congrats...)">Report Feedback</a></li>
<li class="divider"></li>
{% if user.is_authenticated %}
<li><a tabindex="-1" href="/auth/logout" title="Click here to logout especially on public devices">Logout</a></li>
{% else %}
<li><a tabindex="-1" href="/auth/login">Login</a></li>
{% endif %}
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--/.nav-collapse -->
{% block corpusBannerTop %}
{% endblock %}
{% block content %}
{% endblock %}
{% block corpusBannerBottom %}
{% endblock %}
<hr>
<footer>
<p>Gargantext, version 2.0, <a href="http://www.cnrs.fr" target="blank" title="Institution that enables this project.">Copyrights CNRS {{ date.year }}</a>,
<a href="http://www.gnu.org/licenses/agpl-3.0.html" target="blank" title="Legal instructions of the project.">Licence aGPLV3</a>.</p>
</footer>
<!-- Place at the end of the document so the pages load faster -->
{% load staticfiles %}
<!--
<script src="{% static "js/easy/jquery.easypiechart.js"%}"></script>
<script type="text/javascript">
$(function() {
$('.chart').easyPieChart({
//your configuration goes here
size : 50
});
});
</script>
<script type="text/javascript" src="{% static "js/jquery/jquery.min.js" %}"></script>
-->
<script src="{% static "js/bootstrap/bootstrap.min.js" %}"></script>
<script>$(function () { $("[data-toggle='popover']").popover({
html:true,
title: function() {
return $("#popover-head").html();
},
content: function() {
return $("#popover-content").html();
}
});});</script>
{% if debug == False %}
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//piwik.iscpif.fr/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 2]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//piwik.iscpif.fr/piwik.php?idsite=2" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
{% endif %}
</body>
<!--/.nav-collapse -->
{% block corpusBannerTop %}
{% endblock %}
{% block content %}
{% endblock %}
{% block corpusBannerBottom %}
{% endblock %}
<hr>
<footer>
<p>
Gargantext, version 2.0,
<a href="http://www.cnrs.fr" target="blank" title="Institution that enables this project.">
Copyrights CNRS {{ date.year }}
</a>
<a href="http://www.gnu.org/licenses/agpl-3.0.html" target="blank" title="Legal instructions of the project.">
Licence aGPLV3
</a>
.
</p>
</footer>
<!-- Place at the end of the document so the pages load faster -->
{% load staticfiles %}
<!--
<script type="text/javascript" src="{% static "js/easy/jquery.easypiechart.js"%}"></script>
<script type="text/javascript">
$(function() {
$('.chart').easyPieChart({
//your configuration goes here
size : 50
});
});
</script>
<script type="text/javascript" src="{% static "js/jquery/jquery.min.js" %}"></script>
-->
<script type="text/javascript" src="{% static "js/bootstrap/bootstrap.min.js" %}"></script>
<script type="text/javascript">
$(function () { $("[data-toggle='popover']").popover({
html: true,
title: function() {
return $("#popover-head").html();
},
content: function() {
return $("#popover-content").html();
}
});});
</script>
{% if debug == False %}
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//piwik.iscpif.fr/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', 2]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript>
<p>
<img src="//piwik.iscpif.fr/piwik.php?idsite=2" style="border:0;" alt="" />
</p>
</noscript>
<!-- End Piwik Code -->
{% endif %}
</body>
</html>
......@@ -41,6 +41,7 @@
<div class="container">
<div class="row">
{% if projects %}
{% for project in projects %}
<!--<div class="col-md-offset-7 col-md-4 content" style="background-color:grey">!-->
......@@ -62,152 +63,143 @@
</h3>
<h4>{{ project.subtitle }}<h4>
</div>
{% endfor %}
{% endif %}
{% if common_projects %}
<br><br><br><br><br><br>
<h3><i> - - Shared projects - -</i></h3>
{% for project in common_projects %}
<!--<div class="col-md-offset-7 col-md-4 content" style="background-color:grey">!-->
<div class="col-md-3 content">
<h3><a href="/project/{{ project.id }}">{{ project.name }}</a>
<button type="button" class="btn btn-xs btn-default" data-container="body" data-toggle="popover" data-placement="bottom"
data-content='
<ul>
<li> Rename </li>
<li><a href="/project/{{ project.id }}">Add new corpus</a></li>
<li><a href="/delete/{{ project.id }}">Delete</a></li>
</ul>
'>Manage</button>
</h3>
<h4>{{ project.subtitle }}<h4>
</div>
{% endfor %}
{% endif %}
</div>
</div>
{% endfor %}
{% endif %}
{% if common_projects %}
<br><br><br><br><br><br>
<h3><i> - - Shared projects - -</i></h3>
{% for project in common_projects %}
<!--<div class="col-md-offset-7 col-md-4 content" style="background-color:grey">!-->
<div class="col-md-3 content">
<h3><a href="/project/{{ project.id }}">{{ project.name }}</a>
<button type="button" class="btn btn-xs btn-default" data-container="body" data-toggle="popover" data-placement="bottom"
data-content='
<ul>
<li> Rename </li>
<li><a href="/project/{{ project.id }}">Add new corpus</a></li>
<li><a href="/delete/{{ project.id }}">Delete</a></li>
</ul>
'>Manage</button>
</h3>
<h4>{{ project.subtitle }}<h4>
</div>
{% endfor %}
{% endif %}
<div id="sharemodal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 class="modal-title">Share this Corpus with your Groups</h3>
</div>
</div>
</div>
<div class="modal-body form-horizontal">
<h4>List of available groups:</h4>
<div id="groups_list">here show the groups</div>
<div class="modal-footer">
<button id="closesharemodal" type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button id="send_share" type="button" class="btn btn-primary" >Share<span id="simpleloader"></span></button>
</div>
<div id="sharemodal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
</div>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 class="modal-title">Share this Corpus with your Groups</h3>
</div>
<div class="modal-body form-horizontal">
<h4>List of available groups:</h4>
<div id="groups_list">here show the groups</div>
<div class="modal-footer">
<button id="closesharemodal" type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button id="send_share" type="button" class="btn btn-primary" >Share<span id="simpleloader"></span></button>
</div>
</div>
</div>
</div>
</div>
<style>
label {
padding:10px;
margin:0 0 10px;
display:block;
}
label:hover {
background:#eee;
cursor:pointer;
}
</style>
<script>
function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
<style type="text/css">
label {
padding:10px;
margin:0 0 10px;
display:block;
}
label:hover {
background:#eee;
cursor:pointer;
}
</style>
<script type="text/javascript">
function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
return cookieValue;
}
var last_project = -1
function get_groups() {
console.log( "IN get_groups()!" )
var url_ = "/get_groups"
$.ajax({
type: "GET",
url: url_,
dataType: "json",
success : function(data, textStatus, jqXHR) {
var _content = ""
for(var i in data) {
var g_id = data[i][0] , g_name=data[i][1]
_content += '<label><input name="groups" data-id="'+g_id+'" type="checkbox" />&nbsp;'+g_name+'</label>'
}
$("#groups_list").html( _content )
},
error: function(exception) {
console.log("exception!:"+exception.status)
return cookieValue;
}
var last_project = -1
function get_groups() {
console.log( "IN get_groups()!" )
var url_ = "/get_groups"
$.ajax({
type: "GET",
url: url_,
dataType: "json",
success : function(data, textStatus, jqXHR) {
var _content = ""
for(var i in data) {
var g_id = data[i][0] , g_name=data[i][1]
_content += '<label><input name="groups" data-id="'+g_id+'" type="checkbox" />&nbsp;'+g_name+'</label>'
}
$("#groups_list").html( _content )
},
error: function(exception) {
console.log("exception!:"+exception.status)
}
});
}
if( $(".share_button").length>0 ) {
$(".share_button").click(function(){
last_project = $(this).data("id")
get_groups()
$("#sharemodal").modal("show");
});
$("#send_share").click(function() {
$('input[name=groups]:checked').each(function () {
$("#send_share").attr("disabled","disabled")
console.log( $(this).data("id") );
$("#simpleloader").html('<img width="30px" src="{% static "js/libs/img2/loading-bar.gif" %}"></img>')
$.ajax({
url: "/api/share/"+last_project+"/"+$(this).data("id"),
type: 'POST',
beforeSend: function(xhr) {
xhr.setRequestHeader("X-CSRFToken", getCookie("csrftoken"));
},
success: function(data) {
console.log("SUCCESS!")
window.location.reload();
},
error: function(result) {
console.log("FAIL!")
console.log(result)
}
});
});
}
if( $(".share_button").length>0 ) {
$(".share_button").click(function(){
last_project = $(this).data("id")
get_groups()
$("#sharemodal").modal("show");
});
$("#send_share").click(function() {
$('input[name=groups]:checked').each(function () {
$("#send_share").attr("disabled","disabled")
console.log( $(this).data("id") );
$("#simpleloader").html('<img width="30px" src="{% static "js/libs/img2/loading-bar.gif" %}"></img>')
$.ajax({
url: "/api/share/"+last_project+"/"+$(this).data("id"),
type: 'POST',
beforeSend: function(xhr) {
xhr.setRequestHeader("X-CSRFToken", getCookie("csrftoken"));
},
success: function(data) {
console.log("SUCCESS!")
window.location.reload();
},
error: function(result) {
console.log("FAIL!")
console.log(result)
}
});
});
});
}
</script>
}
</script>
{% endblock %}
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment