...
 
Commits (4)
......@@ -141,9 +141,6 @@ INSTALLED_APPS = (
'ckeditor',
'haystack',
'taggit',
'jquery',
'datetimewidget',
'django_bootstrap_staticfiles',
'emissions',
'newsletter',
'matos',
......@@ -155,7 +152,10 @@ INSTALLED_APPS = (
'gadjo',
'combo.data',
'combo.manager',
'combo.apps.assets',
'combo.apps.maps',
'combo.apps.notifications',
'combo.apps.pwa',
'sorl.thumbnail',
'gallery',
'panikombo',
......
......@@ -17,6 +17,7 @@ div#top {
div#top a {
padding: 0 1ex;
color: white;
}
div#main-content {
......@@ -226,9 +227,11 @@ a.big-friendly-button:hover {
}
a.actually-not-that-friendly {
background: #F52F2D;
border-color: #F52F2D;
color: #F52F2D;
position: absolute;
right: -10px;
padding: 0 1ex;
}
a.actually-not-that-friendly:hover {
......@@ -592,3 +595,22 @@ form#track-search p {
form#track-search button {
margin-top: 2.5ex;
}
#more-user-links a {
background: white;
border: 1px solid #386ede;
padding: 1ex;
border-radius: 3px;
font-weight: bold;
}
.home .block {
background: white;
padding: 1rem;
margin-bottom: 1rem;
border-radius: 3px;
}
.home .block hr {
border-color: white;
}
......@@ -14,7 +14,10 @@
{% block css %}
{{ block.super }}
{% import_django_select2_js_css %}
<link href="/static/django_select2/css/select2.css" rel="stylesheet">
<link href="/static/django_select2/css/extra.css" rel="stylesheet"><script type="text/javascript" src="/static/django_select2/js/select2.js"></script>
<script type="text/javascript" src="/static/django_select2/js/heavy_data.js"></script>
<link href="{{ STATIC_URL }}css/datetimepicker.css" rel="stylesheet" type="text/css"/>
{% endblock %}
......
......@@ -9,23 +9,23 @@
{% if can_manage %}
<p>
<a class="big-friendly-button" href="edit/">Modifier</a>
<a class="button" href="edit/">Modifier</a>
{% if perms.emissions.add_diffusion %}
<a class="big-friendly-button" id="add-diffusion-link" href="#">Ajouter une diffusion</a>
<a class="button" id="add-diffusion-link" href="#">Ajouter une diffusion</a>
{% endif %}
<a class="big-friendly-button" id="add-soundfile-link" href="#">Ajouter un son</a>
<a class="button" id="add-soundfile-link" href="#">Ajouter un son</a>
{% if episode.effective_start and episode.effective_end %}
{% if internal_ip %}
<a class="big-friendly-button" id="download-recording" download href="{{ episode.get_pige_download_url }}">Télécharger l'enregistrement</a>
<a class="button" id="download-recording" download href="{{ episode.get_pige_download_url }}">Télécharger l'enregistrement</a>
{% endif %}
{% elif not soundfiles %}
{% if episode.effective_start %}
<a class="big-friendly-button" id="stop-recording" href="stop">Arrêter l'enregistrement</a>
<a class="button" id="stop-recording" href="stop">Arrêter l'enregistrement</a>
{% else %}
<a class="big-friendly-button" id="start-recording" href="start">Démarrer l'enregistrement</a>
<a class="button" id="start-recording" href="start">Démarrer l'enregistrement</a>
{% endif %}
{% endif %}
<a class="big-friendly-button actually-not-that-friendly" href="delete/">Supprimer</a>
<a class="button actually-not-that-friendly" href="delete/">Supprimer</a>
</p>
{% endif %}
......@@ -77,7 +77,7 @@ Tags :
<form id="add-diffusion-form" action="add-diffusion" method="POST" style="display: none;">
{% csrf_token %}
{{ add_diffusion_form.as_p }}
<input type="submit" value="Ajouter cet horaire"/>
<button>Ajouter cet horaire</button>
<button class="cancel">Annuler</button>
</form>
......@@ -131,7 +131,7 @@ Tags :
<form id="add-soundfile-form" action="add-soundfile" method="POST" style="display: none;">
{% csrf_token %}
{{ add_soundfile_form.as_p }}
<input type="submit" value="Ajouter ce son"/>
<button>Ajouter ce son</button>
<button class="cancel">Annuler</button>
</form>
......
......@@ -13,7 +13,7 @@
{% if perms.emissions.add_newsitem %}
<p>
<a class="big-friendly-button" href="{% url 'newsitem-add' %}">Ajouter une actu</a>
<a class="button" href="{% url 'newsitem-add' %}">Ajouter une actu</a>
</p>
{% endif %}
......
{% extends "base.html" %}
{% block bodyargs %}class="home"{% endblock %}
{% block appbar %}
{% if perms.emissions.change_emission %}
<span><a href="{% url 'emission-list' %}">Toutes les émissions</a>
......@@ -34,14 +36,14 @@
<h2>Émissions</h2>
{% for emission in emissions %}
<div class="emission">
<div class="emission block">
<h3><a href="{% url 'emission-view' slug=emission.slug %}">{{ emission.title }}</a></h3>
<a class="big-friendly-button" href="{% url 'episode-add' emission_slug=emission.slug %}">Ajouter un épisode</a>
<a class="button" href="{% url 'episode-add' emission_slug=emission.slug %}">Ajouter un épisode</a>
<a class="big-friendly-button" href="{% url 'emission-newsitem-add' emission_slug=emission.slug %}">Ajouter une actu</a>
<a class="button" href="{% url 'emission-newsitem-add' emission_slug=emission.slug %}">Ajouter une actu</a>
<a class="big-friendly-button" href="{% url 'emission-update' slug=emission.slug %}">Modifier le profil de l'émission</a>
<a class="button" href="{% url 'emission-update' slug=emission.slug %}">Modifier le profil de l'émission</a>
<div class="two-columns">
......@@ -63,7 +65,7 @@
<ul class="episode-list">
{% for newsitem in emission.get_sorted_newsitems|slice:":5" %}
<li>{{ newsitem.date|date:"d E o H:i"|lower }}
<li>{{ newsitem.date|date:"d E o"|lower }}
<a href="{% url 'newsitem-view' slug=newsitem.slug %}">{{ newsitem.title }}</a>
</li>
{% empty %}
......@@ -80,14 +82,14 @@ Aucune actu.
{% for news_category in news_categories %}
<div class="newsitems">
<div class="newsitems block">
<h3>Actu : {{ news_category.title }}</h3>
<a class="big-friendly-button" href="{% url 'newsitem-add' slug=news_category.slug %}">Ajouter une actu</a>
<a class="button" href="{% url 'newsitem-add' slug=news_category.slug %}">Ajouter une actu</a>
<ul class="episode-list">
{% for newsitem in news_category.get_sorted_newsitems|slice:":10" %}
<li>{{ newsitem.date|date:"d E o H:i"|lower }}
<li>{{ newsitem.date|date:"d E o"|lower }}
<a href="{% url 'newsitem-view' slug=newsitem.slug %}">{{ newsitem.title }}</a>
</li>
{% empty %}
......@@ -99,7 +101,7 @@ Aucune actu.
{% endfor %}
{% if perms.emissions.add_focus %}
<div class="newsitems">
<div class="newsitems block">
<h3>Focus</h3>
<ul class="episode-list">
......
{% extends "registration/base.html" %}
{% load url from future %}
{% block user-links %}{% endblock %}
{% block bodyargs %}{{block.super}} class="login"{% endblock %}
......@@ -22,7 +21,7 @@ de nouveaux épisodes et nouvelles actualités.
<p>Mot de passe incorrect. Essayez encore.</p>
{% endif %}
<form method="post" id="login-form" action="{% url 'django.contrib.auth.views.login' %}">
<form method="post" id="login-form" action="{% url 'auth_login' %}">
{% csrf_token %}
<p>
......@@ -34,7 +33,7 @@ de nouveaux épisodes et nouvelles actualités.
{{ form.password }}
</p>
<input type="submit" value="Se connecter" class="submit login" />
<button>Se connecter</button>
<input type="hidden" name="next" value="{{ next }}" />
</form>
......
......@@ -36,7 +36,7 @@
</fieldset>
<div class="submit-row">
<input type="submit" value="{% trans 'Change my password' %}" class="default" />
<button>{% trans 'Change my password' %}</button>
</div>
<script type="text/javascript">document.getElementById("id_old_password").focus();</script>
......
......@@ -14,7 +14,7 @@
<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p>
{{ form.new_password2.errors }}
<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p>
<p><input type="submit" value="{% trans 'Change my password' %}" /></p>
<p><button>{% trans 'Change my password' %}</button></p>
</form>
{% else %}
......
......@@ -12,7 +12,8 @@
<form action="" method="post">{% csrf_token %}
{{ form.email.errors }}
<p><label for="id_email">{% trans 'Email address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p>
<p><label for="id_email">{% trans 'Email address:' %}</label> {{ form.email }}
<button>{% trans 'Reset my password' %}</button></p>
</form>
{% endblock %}
......@@ -9,7 +9,7 @@
<tr>
<td>&nbsp;</td>
<td>
<input type="submit" value="Rechercher">
<button>Rechercher</button>
</td>
</tr>
</table>
......
from django.conf.urls import patterns, include, url
from django.conf.urls import include, url
from django.conf import settings
from django.views.generic import RedirectView
from django.core.urlresolvers import reverse_lazy
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import logout_then_login
from django.contrib import admin
......@@ -18,6 +19,10 @@ from emissions.models import Emission, Episode, NewsItem
from newsletter.urls import management_patterns as newsletter_urlpatterns
from matos.urls import urlpatterns as matos_urlpatterns
from nonstop.urls import urlpatterns as nonstop_urlpatterns
import panikombo.views
from .poll import views as poll_views
from . import views
from combo.manager.urls import urlpatterns as combo_manager_urls
......@@ -26,14 +31,14 @@ from urls_utils import decorated_includes, cms_permission_required
sqs = SearchQuerySet().models(Emission, Episode, NewsItem).facet('categories').facet('tags')
urlpatterns = patterns('',
url(r'^$', 'panikdb.views.home', name='home'),
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^ckeditor/upload/', login_required(ckeditor_upload)),
url(r'^ckeditor/browse/', login_required(ckeditor_browse)),
url(r'^search/', search_view_factory(view_class=FacetedSearchView,
form_class=FacetedSearchForm, searchqueryset=sqs), name='haystack_search'),
url(r'^emissions/$', 'panikdb.views.emissions_list', name='emission-list'),
url(r'^emissions/$', views.emissions_list, name='emission-list'),
url(r'^emissions/',
decorated_includes(login_required, include(emissions_urlpatterns))),
......@@ -44,36 +49,36 @@ urlpatterns = patterns('',
url(r'^nonstop/',
decorated_includes(login_required, include(nonstop_urlpatterns))),
url(r'^newsletters/add$', 'panikdb.views.newsletter_create', name='newsletter-create'),
url(r'^newsletters/add$', views.newsletter_create, name='newsletter-create'),
url(r'^newsletters/',
decorated_includes(login_required, include(newsletter_urlpatterns))),
url(r'^cms/',
decorated_includes(cms_permission_required, include(combo_manager_urls))),
url(r'^news/$', 'panikdb.views.news', name='news-list'),
url(r'^news/$', views.news, name='news-list'),
url(r'^focus/set/(?P<object_type>[\w,-]+)/(?P<object_id>\d+)$',
'panikdb.views.focus_set', name='focus-set'),
views.focus_set, name='focus-set'),
url(r'^focus/unset/(?P<object_type>[\w,-]+)/(?P<object_id>\d+)$',
'panikdb.views.focus_unset', name='focus-unset'),
views.focus_unset, name='focus-unset'),
url(r'^cms/pages/(?P<page_pk>\w+)/make-topik$', 'panikdb.views.make_topik',
url(r'^cms/pages/(?P<page_pk>\w+)/make-topik$', views.make_topik,
name='make-topik'),
url(r'^cms/pages/topik/(?P<pk>\w+)/edit-topik$', 'panikombo.views.topik_edit',
url(r'^cms/pages/topik/(?P<pk>\w+)/edit-topik$', panikombo.views.topik_edit,
name='edit-topik'),
url(r'^accounts/logout/', 'django.contrib.auth.views.logout_then_login', name='logout'),
url(r'^accounts/logout/', logout_then_login, name='logout'),
url(r'^accounts/', include('registration.backends.default.urls')),
url(r'^combok/soundfiles/', 'panikombo.views.soundfiles'),
url(r'^combok/episodes/', 'panikombo.views.episodes'),
url(r'^combok/soundfiles/', panikombo.views.soundfiles),
url(r'^combok/episodes/', panikombo.views.episodes),
url(r'^vote/$', 'panikdb.poll.views.vote', name='vote'),
url(r'^vote/results/$', 'panikdb.poll.views.vote_results', name='vote-results'),
url(r'^vote/$', poll_views.vote, name='vote'),
url(r'^vote/results/$', poll_views.vote_results, name='vote-results'),
url(r'^admin/', include(admin.site.urls)),
)
]
from combo import plugins
urlpatterns = plugins.register_plugins_urls(urlpatterns)
......