Commit e558a176 authored by Mathieu Rodic's avatar Mathieu Rodic

[CODE] rewrote HTML templates

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