Merge branch 'master' into wip/portail-entreprise
Conflicts: portail_citoyen/locale/fr/LC_MESSAGES/django.po
This commit is contained in:
commit
29d373ae6f
|
@ -1,6 +1,3 @@
|
||||||
recursive-include portail_citoyen/apps/login_plugin/templates *.html
|
|
||||||
recursive-include portail_citoyen/apps/login_plugin/static *.css *.gif *.png *.js
|
|
||||||
recursive-include portail_citoyen/apps/login_plugin/locale *.po *.mo
|
|
||||||
recursive-include portail_citoyen/apps/data_source_plugin/templates *.html
|
recursive-include portail_citoyen/apps/data_source_plugin/templates *.html
|
||||||
recursive-include portail_citoyen/apps/data_source_plugin/static *.css *.gif *.png *.js
|
recursive-include portail_citoyen/apps/data_source_plugin/static *.css *.gif *.png *.js
|
||||||
recursive-include portail_citoyen/apps/data_source_plugin/locale *.po *.mo
|
recursive-include portail_citoyen/apps/data_source_plugin/locale *.po *.mo
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
from django.utils.translation import ugettext_lazy as _
|
|
||||||
from django.contrib.auth.forms import AuthenticationForm
|
|
||||||
from django.core.urlresolvers import reverse
|
|
||||||
|
|
||||||
from cms.plugin_base import CMSPluginBase
|
|
||||||
from cms.plugin_pool import plugin_pool
|
|
||||||
from models import LoginPlugin as LoginPluginModel
|
|
||||||
|
|
||||||
class LoginPlugin(CMSPluginBase):
|
|
||||||
model = LoginPluginModel
|
|
||||||
name = _('Login Plugin')
|
|
||||||
render_template = "login_plugin/plugin.html"
|
|
||||||
text_enabled = False
|
|
||||||
|
|
||||||
def render(self, context, instance, placeholdre):
|
|
||||||
context.update({
|
|
||||||
'form': AuthenticationForm(),
|
|
||||||
'action': reverse('login'),
|
|
||||||
})
|
|
||||||
return context
|
|
||||||
|
|
||||||
plugin_pool.register_plugin(LoginPlugin)
|
|
|
@ -1,37 +0,0 @@
|
||||||
# Translation of portail-citoyen strings
|
|
||||||
# Copyright (C) 2013 Entr'ouvert
|
|
||||||
# This file is distributed under the same license as the portail-citoyen package.
|
|
||||||
# Benjamin Dauvergne <bdauvergne@entrouvert.com>, 2013.
|
|
||||||
#
|
|
||||||
msgid ""
|
|
||||||
msgstr ""
|
|
||||||
"Project-Id-Version: portail_citoyen 0.1.0\n"
|
|
||||||
"Report-Msgid-Bugs-To: \n"
|
|
||||||
"POT-Creation-Date: 2013-03-19 15:11+0100\n"
|
|
||||||
"PO-Revision-Date: 2013-03-19 15:15+0100\n"
|
|
||||||
"Last-Translator: Benjamin Dauvergne <bdauvergne@entrouvert.com>\n"
|
|
||||||
"Language: fr\n"
|
|
||||||
"MIME-Version: 1.0\n"
|
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
|
||||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
||||||
|
|
||||||
#: cms_plugins.py:11
|
|
||||||
msgid "Login Plugin"
|
|
||||||
msgstr "Bloc de connexion"
|
|
||||||
|
|
||||||
#: templates/login_plugin/plugin.html:27
|
|
||||||
#, python-format
|
|
||||||
msgid ""
|
|
||||||
"\n"
|
|
||||||
" <p>Bonjour %(name)s !</p>\n"
|
|
||||||
" "
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: templates/login_plugin/plugin.html:31
|
|
||||||
msgid "Logout"
|
|
||||||
msgstr "Déconnexion"
|
|
||||||
|
|
||||||
#: templates/login_plugin/plugin.html:33
|
|
||||||
msgid "Mon profil"
|
|
||||||
msgstr ""
|
|
|
@ -1,6 +0,0 @@
|
||||||
from cms.models import CMSPlugin
|
|
||||||
|
|
||||||
class LoginPlugin(CMSPlugin):
|
|
||||||
|
|
||||||
def __unicode__(self):
|
|
||||||
return 'Login'
|
|
|
@ -1,27 +0,0 @@
|
||||||
{% load url from future %}
|
|
||||||
{% load i18n %}
|
|
||||||
<div id="login">
|
|
||||||
{% if not request.user.is_authenticated %}
|
|
||||||
<form action="{{ action }}" method="post">
|
|
||||||
{% csrf_token %}
|
|
||||||
|
|
||||||
{{ form.as_p }}
|
|
||||||
|
|
||||||
<input type="submit" value="Connexion" />
|
|
||||||
{% if next %}
|
|
||||||
<input type="hidden" name="next" value="{{ next }}">
|
|
||||||
{% endif %}
|
|
||||||
</form>
|
|
||||||
<p><a href="{% url 'password_reset' %}">Mot de passe perdu ?</a></p>
|
|
||||||
{% url 'registration_register' as registration_url %}
|
|
||||||
{% if registration_url %}
|
|
||||||
<p><a href="{{ registration_url }}">Pas encore de compte ?</a></p>
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
{% blocktrans with name=request.user %}
|
|
||||||
<p>Bonjour {{ name }} !</p>
|
|
||||||
{% endblocktrans %}
|
|
||||||
{% url 'auth_logout' as logout_url %}
|
|
||||||
{% if logout_url %}<p><a href="{{ logout_url }}">{% trans "Logout" %}</a></p>{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
|
@ -1,16 +0,0 @@
|
||||||
"""
|
|
||||||
This file demonstrates writing tests using the unittest module. These will pass
|
|
||||||
when you run "manage.py test".
|
|
||||||
|
|
||||||
Replace this with more appropriate tests for your application.
|
|
||||||
"""
|
|
||||||
|
|
||||||
from django.test import TestCase
|
|
||||||
|
|
||||||
|
|
||||||
class SimpleTest(TestCase):
|
|
||||||
def test_basic_addition(self):
|
|
||||||
"""
|
|
||||||
Tests that 1 + 1 always equals 2.
|
|
||||||
"""
|
|
||||||
self.assertEqual(1 + 1, 2)
|
|
|
@ -1 +0,0 @@
|
||||||
# Create your views here.
|
|
|
@ -31,9 +31,9 @@ class FormPluginBase(CMSPluginBase):
|
||||||
form_class = self.get_form_class(request, context, instance,
|
form_class = self.get_form_class(request, context, instance,
|
||||||
placeholder)
|
placeholder)
|
||||||
if issubclass(form_class, ModelForm):
|
if issubclass(form_class, ModelForm):
|
||||||
if not hasattr(self, 'get_object'):
|
if not hasattr(self, 'get_form_instance'):
|
||||||
raise ImproperlyConfigured('Your plugin class is missing a get_object method but use a ModelForm')
|
raise ImproperlyConfigured('Your plugin class is missing a get_object method but use a ModelForm')
|
||||||
kwargs['instance'] = context['object'] = self.get_object(request, context, instance, placeholder)
|
kwargs['instance'] = context['object'] = self.get_form_instance(request, context, instance, placeholder)
|
||||||
if utils.callable_has_arg(form_class.__init__, 'plugin_instance'):
|
if utils.callable_has_arg(form_class.__init__, 'plugin_instance'):
|
||||||
kwargs['plugin_instance'] = instance
|
kwargs['plugin_instance'] = instance
|
||||||
if utils.callable_has_arg(form_class.__init__, 'request'):
|
if utils.callable_has_arg(form_class.__init__, 'request'):
|
||||||
|
@ -66,7 +66,7 @@ class ProfileFormPlugin(FormPluginBase):
|
||||||
module = importlib.import_module(module_path)
|
module = importlib.import_module(module_path)
|
||||||
return getattr(module, class_name)
|
return getattr(module, class_name)
|
||||||
|
|
||||||
def get_object(self, request, context, instance, placeholder):
|
def get_form_instance(self, request, context, instance, placeholder):
|
||||||
return request.user
|
return request.user
|
||||||
plugin_pool.register_plugin(ProfileFormPlugin)
|
plugin_pool.register_plugin(ProfileFormPlugin)
|
||||||
|
|
||||||
|
|
|
@ -4412,7 +4412,7 @@
|
||||||
"model": "cms.title",
|
"model": "cms.title",
|
||||||
"fields": {
|
"fields": {
|
||||||
"menu_title": "",
|
"menu_title": "",
|
||||||
"redirect": "/mes-e-services",
|
"redirect": "/accueil",
|
||||||
"meta_keywords": "",
|
"meta_keywords": "",
|
||||||
"page_title": "",
|
"page_title": "",
|
||||||
"language": "fr",
|
"language": "fr",
|
||||||
|
@ -4435,14 +4435,14 @@
|
||||||
"meta_keywords": "",
|
"meta_keywords": "",
|
||||||
"page_title": "",
|
"page_title": "",
|
||||||
"language": "fr",
|
"language": "fr",
|
||||||
"title": "Mes e-services",
|
"title": "Accueil",
|
||||||
"has_url_overwrite": false,
|
"has_url_overwrite": false,
|
||||||
"application_urls": "",
|
"application_urls": "",
|
||||||
"creation_date": "2013-04-17T14:38:21.239Z",
|
"creation_date": "2013-04-17T14:38:21.239Z",
|
||||||
"page": 4,
|
"page": 4,
|
||||||
"path": "mes-e-services",
|
"path": "accueil",
|
||||||
"meta_description": "",
|
"meta_description": "",
|
||||||
"slug": "mes-e-services"
|
"slug": "accueil"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -4469,7 +4469,7 @@
|
||||||
"model": "cms.title",
|
"model": "cms.title",
|
||||||
"fields": {
|
"fields": {
|
||||||
"menu_title": "",
|
"menu_title": "",
|
||||||
"redirect": "/mes-e-services",
|
"redirect": "/accueil",
|
||||||
"meta_keywords": "",
|
"meta_keywords": "",
|
||||||
"page_title": "",
|
"page_title": "",
|
||||||
"language": "fr",
|
"language": "fr",
|
||||||
|
@ -4492,14 +4492,14 @@
|
||||||
"meta_keywords": "",
|
"meta_keywords": "",
|
||||||
"page_title": "",
|
"page_title": "",
|
||||||
"language": "fr",
|
"language": "fr",
|
||||||
"title": "Mes e-services",
|
"title": "Accueil",
|
||||||
"has_url_overwrite": false,
|
"has_url_overwrite": false,
|
||||||
"application_urls": "",
|
"application_urls": "",
|
||||||
"creation_date": "2013-04-17T14:38:21.239Z",
|
"creation_date": "2013-04-17T14:38:21.239Z",
|
||||||
"page": 7,
|
"page": 7,
|
||||||
"path": "mes-e-services",
|
"path": "accueil",
|
||||||
"meta_description": "",
|
"meta_description": "",
|
||||||
"slug": "mes-e-services"
|
"slug": "accueil"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -5135,16 +5135,6 @@
|
||||||
"movie_url": "https://www.youtube.com/watch?v=4ria7AhD7ro"
|
"movie_url": "https://www.youtube.com/watch?v=4ria7AhD7ro"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"pk": 606,
|
|
||||||
"model": "login_plugin.loginplugin",
|
|
||||||
"fields": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pk": 1289,
|
|
||||||
"model": "login_plugin.loginplugin",
|
|
||||||
"fields": {}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"pk": 2,
|
"pk": 2,
|
||||||
"model": "data_source_plugin.datasource",
|
"model": "data_source_plugin.datasource",
|
||||||
|
|
|
@ -140,7 +140,6 @@ INSTALLED_APPS = (
|
||||||
'cms.plugins.teaser',
|
'cms.plugins.teaser',
|
||||||
'cms.plugins.video',
|
'cms.plugins.video',
|
||||||
'cmsplugin_text_wrapper',
|
'cmsplugin_text_wrapper',
|
||||||
'login_plugin',
|
|
||||||
'feed_plugin',
|
'feed_plugin',
|
||||||
'data_source_plugin',
|
'data_source_plugin',
|
||||||
'a2_service_list_plugin',
|
'a2_service_list_plugin',
|
||||||
|
|
|
@ -39,6 +39,8 @@ a {
|
||||||
body {
|
body {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
background: white;
|
background: white;
|
||||||
|
max-width: 1000px;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#page {
|
div#page {
|
||||||
|
@ -49,18 +51,14 @@ div#header {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 0 0 0;
|
margin: 0 0 0 0;
|
||||||
position: absolute;
|
position: relative;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
margin-left: -500px;
|
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
div#top {
|
div#top {
|
||||||
height: 456px;
|
|
||||||
width: 1500px;
|
|
||||||
margin: 0 auto 0 auto;
|
margin: 0 auto 0 auto;
|
||||||
margin-left: 50%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
div#top h1 {
|
div#top h1 {
|
||||||
|
@ -85,8 +83,8 @@ div#top a img {
|
||||||
div#main-content-wrapper {
|
div#main-content-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
width: 1000px;
|
max-width: 1000px;
|
||||||
margin: 200px auto 0px auto;
|
margin: 0px auto 0px auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#main-content {
|
div#main-content {
|
||||||
|
@ -98,7 +96,7 @@ div#footer {
|
||||||
clear: both;
|
clear: both;
|
||||||
background: white;
|
background: white;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
width: 1000px;
|
width: 90%;
|
||||||
margin: 10px auto 0 auto;
|
margin: 10px auto 0 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
@ -367,7 +365,7 @@ div.login-actions {
|
||||||
|
|
||||||
|
|
||||||
.region-header {
|
.region-header {
|
||||||
width: 1000px;
|
width: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
}
|
}
|
||||||
|
@ -992,3 +990,52 @@ p.fullname {
|
||||||
display: inline;
|
display: inline;
|
||||||
margin-right: 1.5em;
|
margin-right: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 760px) {
|
||||||
|
body.narrow-page div.right {
|
||||||
|
clear: none;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
#left, #right {
|
||||||
|
clear: none;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 490px) {
|
||||||
|
#single-title {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
#nav {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
#nav ul {
|
||||||
|
column-count: 2;
|
||||||
|
-webkit-column-count: 2;
|
||||||
|
}
|
||||||
|
#nav ul li {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
#real-content {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
#toplinks {
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 98%;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 400px) {
|
||||||
|
div#top h1 {
|
||||||
|
padding-left: 1ex;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
div#welcome {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
h2#welcome-title {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -76,5 +76,24 @@
|
||||||
jQuery('#messages').delay(3000*(1+{{ messages|length }})).fadeOut('slow');
|
jQuery('#messages').delay(3000*(1+{{ messages|length }})).fadeOut('slow');
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<script>
|
||||||
|
jQuery(window).resize(function() {
|
||||||
|
if (jQuery(window).width() < 490) {
|
||||||
|
if (! jQuery('#nav').hasClass('small')) {
|
||||||
|
jQuery('#nav').addClass('small');
|
||||||
|
jQuery('#nav').hide();
|
||||||
|
jQuery('#single-title').click(function() {
|
||||||
|
jQuery('#nav').slideToggle();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (jQuery('#nav').hasClass('small')) {
|
||||||
|
jQuery('#nav').removeClass('small');
|
||||||
|
jQuery('#nav').show();
|
||||||
|
jQuery('#single-title').unbind('click');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).trigger('resize');
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
portail-citoyen-manage dumpdata --indent=2 sites cms cms.cmsplugin cmsplugin_text_wrapper \
|
portail-citoyen-manage dumpdata --indent=2 sites cms cms.cmsplugin cmsplugin_text_wrapper \
|
||||||
file googlemap link picture snippet teaser video login_plugin data_source_plugin \
|
file googlemap link picture snippet teaser video data_source_plugin \
|
||||||
a2_service_list_plugin feed_plugin idp attribute_aggregator > demo.json
|
a2_service_list_plugin feed_plugin idp attribute_aggregator > demo.json
|
||||||
|
|
Reference in New Issue