Browse Source

Many changes for templates

master
tr4ck3ur des JM2L 9 years ago
parent
commit
7825a33533
42 changed files with 1308 additions and 422 deletions
  1. +1
    -0
      jm2l/__init__.py
  2. +10
    -2
      jm2l/auth.py
  3. +1
    -19
      jm2l/forms.py
  4. +8
    -0
      jm2l/static/css/jm2l.css
  5. +1
    -1
      jm2l/static/css/pylons.css
  6. BIN
      jm2l/static/favicon.ico
  7. BIN
      jm2l/static/img/2015/logo_1.png
  8. BIN
      jm2l/static/img/2015/logo_2.png
  9. BIN
      jm2l/static/img/chev-left.png
  10. BIN
      jm2l/static/img/chev-right.png
  11. BIN
      jm2l/static/img/chevrons.png
  12. BIN
      jm2l/static/img/puce.png
  13. +4
    -0
      jm2l/static/img/shadow.svg
  14. BIN
      jm2l/static/img/svg-icon.png
  15. +11
    -9
      jm2l/static/js/programme.js
  16. +474
    -0
      jm2l/static/vendor/datepicker/bootstrap-datepicker.js
  17. +182
    -0
      jm2l/static/vendor/datepicker/datepicker.css
  18. +64
    -37
      jm2l/templates/NewIndex.mako
  19. +4
    -1
      jm2l/templates/Participer.mako
  20. +47
    -10
      jm2l/templates/Profil/Profil.mako
  21. +25
    -32
      jm2l/templates/Profil/Sejour.mako
  22. +35
    -14
      jm2l/templates/Public/Plan.mako
  23. +8
    -1
      jm2l/templates/Public/Presse.mako
  24. +37
    -21
      jm2l/templates/Public/Programme.mako
  25. +5
    -0
      jm2l/templates/Staff/list.mako
  26. +7
    -1
      jm2l/templates/Staff/new.mako
  27. +21
    -4
      jm2l/templates/Staff/pole.mako
  28. +21
    -3
      jm2l/templates/Staff/tasks.mako
  29. +43
    -100
      jm2l/templates/edit_event.mako
  30. +13
    -14
      jm2l/templates/edit_tiers.mako
  31. +76
    -9
      jm2l/templates/helpers.mako
  32. +2
    -0
      jm2l/templates/jm2l.mako
  33. +46
    -20
      jm2l/templates/layout.mako
  34. +9
    -3
      jm2l/templates/list_tiers.mako
  35. +37
    -25
      jm2l/templates/login.mako
  36. +1
    -0
      jm2l/templates/modals.mako
  37. +9
    -28
      jm2l/templates/show_user.mako
  38. +26
    -16
      jm2l/templates/view_event.mako
  39. +27
    -15
      jm2l/templates/view_tiers.mako
  40. +6
    -0
      jm2l/templates/view_user.mako
  41. +3
    -0
      jm2l/upload.py
  42. +44
    -37
      jm2l/views.py

+ 1
- 0
jm2l/__init__.py View File

@@ -90,6 +90,7 @@ def main(global_config, **settings):
# HTML Routes - Logged
#config.add_route('profil', 'MesJM2L')
config.add_route('jm2l', '/MesJM2L')
config.add_route('sejour', '/MonSejour')
config.add_route('modal', '/{year:\d+}/modal/{modtype:\w+}/{id:(\d+)}')
# Handle exchanges


+ 10
- 2
jm2l/auth.py View File

@@ -1,4 +1,4 @@
# -*- coding: utf8 -*-
from pyramid.view import view_config
from pyramid.security import remember, forget
from pyramid.httpexceptions import HTTPFound
@@ -9,6 +9,10 @@ import datetime
def login(request):
return {}

@view_config(route_name='auth', match_param="action=forgot", renderer="jm2l:templates/login.mako")
def forgot(request):
return {'forgot':True}

@view_config(route_name='bymail', renderer="string")
def bymail(request):
myhash = request.matchdict.get('hash', "")
@@ -30,7 +34,7 @@ def bymail(request):
def sign_in_out(request):
username = request.POST.get('username')
if username:
user = User.by_name(username)
user = User.by_slug(username)
if user and user.verify_password(request.POST.get('password')):
user.last_logged=datetime.datetime.now()
DBSession.merge(user)
@@ -41,6 +45,10 @@ def sign_in_out(request):
headers = forget(request)
else:
headers = forget(request)
if request.matchdict.get('action')=='in':
request.session.flash(('error',u'Vous avez entré un mauvais couple identifiant/password !'))
return HTTPFound(location="/sign/login",
headers=headers)
return HTTPFound(location=request.route_url('home'),
headers=headers)



+ 1
- 19
jm2l/forms.py View File

@@ -94,25 +94,7 @@ class AddIntervenant(MyBaseForm):
csrf = False
event_uid = HiddenField()
nom = TextField(u'Nom', [validators.Length(max=80)],
filters=[strip_filter],
description = u"Les espaces sont autorisés, la ponctuation n'est " +
u"pas autorisée à l'exception des points, traits d'union, " +
u"apostrophes et tirets bas."
)
prenom = TextField(u'Prénom', [validators.Length(max=80)],
filters=[strip_filter],
description = u"Les espaces sont autorisés, la ponctuation n'est " +
u"pas autorisée à l'exception des points, traits d'union, " +
u"apostrophes et tirets bas."
)
email = TextField(u'Email', [validators.required(),
validators.length(max=10),
validators.Email(message='Ceci ne ressemble pas à une adresse valide')],
description=u"Afin d'éviter la duplication d'information et les doublons inutile, "+
u"pensez d'abord à lui demander de confirmer le mail qu'il a utilisé lors de "+
u"son inscription sur le site.")
add = SubmitField('Ajouter des intervenants')
intervenant = SelectField(u'Intervenant', coerce=int )

class ConfCreateForm(MyBaseForm):



+ 8
- 0
jm2l/static/css/jm2l.css View File

@@ -123,6 +123,14 @@ a {
right: 15px;
}


.carousel-vote {
padding: 15px 50px;
position: absolute;
right: 0;
bottom: 0;
}

.LogistiqueTable th, .LogistiqueTable td
{
text-align:center;


+ 1
- 1
jm2l/static/css/pylons.css View File

@@ -40,7 +40,7 @@ body h6{font-family:"NeutonRegular","Lucida Grande",Lucida,Verdana,sans-serif;fo
.wrapper{width:100%}
#top,#top-small,#bottom{width:100%;}
#top{color:#000000;height:215px;}
#bottom{color:#222;background-color:#ffffff;}
#bottom{color:#222;}
.top,.top-small,.middle,.bottom{width:750px;margin-right:auto;margin-left:auto;}
.top{padding-top:40px;}
.top-small{padding-top:10px;}


BIN
jm2l/static/favicon.ico View File

Before After

BIN
jm2l/static/img/2015/logo_1.png View File

Before After
Width: 1234  |  Height: 239  |  Size: 331 KiB

BIN
jm2l/static/img/2015/logo_2.png View File

Before After
Width: 1234  |  Height: 187  |  Size: 312 KiB

BIN
jm2l/static/img/chev-left.png View File

Before After
Width: 28  |  Height: 42  |  Size: 799 B

BIN
jm2l/static/img/chev-right.png View File

Before After
Width: 28  |  Height: 42  |  Size: 790 B

BIN
jm2l/static/img/chevrons.png View File

Before After
Width: 69  |  Height: 50  |  Size: 1.4 KiB

BIN
jm2l/static/img/puce.png View File

Before After
Width: 10  |  Height: 10  |  Size: 514 B

+ 4
- 0
jm2l/static/img/shadow.svg View File

@@ -24,5 +24,9 @@
<stop offset="0%" stop-color="#EEE" stop-opacity="0"/>
<stop offset="15%" stop-color="#fff4e5" stop-opacity="1"/>
</linearGradient>
<linearGradient id="BoxGradient-Concert" spreadMethod="pad" x1="100%" y1="0%" x2="50%" y2="100%">
<stop offset="0%" stop-color="#EEE" stop-opacity="0"/>
<stop offset="15%" stop-color="#2EE" stop-opacity="1"/>
</linearGradient>
</defs>
</svg>

BIN
jm2l/static/img/svg-icon.png View File

Before After
Width: 27  |  Height: 27  |  Size: 1.5 KiB

+ 11
- 9
jm2l/static/js/programme.js View File

@@ -50,7 +50,8 @@ d3.json("le-prog-json",
.attr("id", TypeArea+"-"+Keys[k])
.attr("area", TypeArea)
.style("float", "left")
.style("margin-left", "5px")
.style("margin-left", "20px")
.style("margin-right", "3px")
.property("checked",true);
d3.select("#Schedule_SVG_"+Keys[k])
@@ -64,10 +65,10 @@ d3.json("le-prog-json",
svg = d3.select("#Schedule_SVG_"+Keys[k])
.append("svg")
.attr("id", "TimeTable-"+Keys[k])
.attr("width", width + margin.right + margin.left)
.attr("height", height + margin.top + margin.bottom)
//.attr("viewBox", "0 0 " + width + " " + height )
//.attr("preserveAspectRatio", "xMidYMid");
.attr("width", "100%") //width + margin.right + margin.left)
//.attr("height", height + margin.top + margin.bottom)
.attr("viewBox", "0 0 " + (width + margin.right + margin.left) + " " + (height + margin.top + margin.bottom) )
.attr("preserveAspectRatio", "xMidYMid meet");

svg.append("g")
.attr("class", "xAxis axis");
@@ -78,7 +79,7 @@ d3.json("le-prog-json",
var chart = svg.append("g")
.attr("class", "timetable");

HandleEvents(Keys[k])
HandleEvents(Keys[k]);
displayit(json["all"][Keys[k]], Salles[Keys[k]], Keys[k]);
}
});
@@ -99,7 +100,7 @@ function HandleEvents(Ctrl) {
ArrayChoice.push(v.attributes['area'].value)
}
)
area_select = Array()
area_select = Array();
selection = Tasks[Ctrl].filter(function(v) {
return ArrayChoice.indexOf(v.status)>=0;
});
@@ -160,9 +161,10 @@ function displayit(Set_of_Task, Set_of_Area, key) {

content.enter()
.insert("foreignObject",":first-child")
.append("xhtml:div")
.append("xhtml:body")
.attr("class", "SvgBody")
.html(function(d) {
return '<div style="padding:5px;height:100%"><a href="/event/'+ d.uid +
return '<div class="EvtBox '+ taskStatus[d.status] +'"><a href="/event/'+ d.uid +
'">' + d.desc + '</a></div>'
})
.transition()


+ 474
- 0
jm2l/static/vendor/datepicker/bootstrap-datepicker.js View File

@@ -0,0 +1,474 @@
/* =========================================================
* bootstrap-datepicker.js
* http://www.eyecon.ro/bootstrap-datepicker
* =========================================================
* Copyright 2012 Stefan Petre
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================= */
!function( $ ) {
// Picker object
var Datepicker = function(element, options){
this.element = $(element);
this.format = DPGlobal.parseFormat(options.format||this.element.data('date-format')||'mm/dd/yyyy');
this.picker = $(DPGlobal.template)
.appendTo('body')
.on({
click: $.proxy(this.click, this)//,
//mousedown: $.proxy(this.mousedown, this)
});
this.isInput = this.element.is('input');
this.component = this.element.is('.date') ? this.element.find('.add-on') : false;
if (this.isInput) {
this.element.on({
focus: $.proxy(this.show, this),
//blur: $.proxy(this.hide, this),
keyup: $.proxy(this.update, this)
});
} else {
if (this.component){
this.component.on('click', $.proxy(this.show, this));
} else {
this.element.on('click', $.proxy(this.show, this));
}
}
this.minViewMode = options.minViewMode||this.element.data('date-minviewmode')||0;
if (typeof this.minViewMode === 'string') {
switch (this.minViewMode) {
case 'months':
this.minViewMode = 1;
break;
case 'years':
this.minViewMode = 2;
break;
default:
this.minViewMode = 0;
break;
}
}
this.viewMode = options.viewMode||this.element.data('date-viewmode')||0;
if (typeof this.viewMode === 'string') {
switch (this.viewMode) {
case 'months':
this.viewMode = 1;
break;
case 'years':
this.viewMode = 2;
break;
default:
this.viewMode = 0;
break;
}
}
this.startViewMode = this.viewMode;
this.weekStart = options.weekStart||this.element.data('date-weekstart')||0;
this.weekEnd = this.weekStart === 0 ? 6 : this.weekStart - 1;
this.onRender = options.onRender;
this.fillDow();
this.fillMonths();
this.update();
this.showMode();
};
Datepicker.prototype = {
constructor: Datepicker,
show: function(e) {
this.picker.show();
this.height = this.component ? this.component.outerHeight() : this.element.outerHeight();
this.place();
$(window).on('resize', $.proxy(this.place, this));
if (e ) {
e.stopPropagation();
e.preventDefault();
}
if (!this.isInput) {
}
var that = this;
$(document).on('mousedown', function(ev){
if ($(ev.target).closest('.datepicker').length == 0) {
that.hide();
}
});
this.element.trigger({
type: 'show',
date: this.date
});
},
hide: function(){
this.picker.hide();
$(window).off('resize', this.place);
this.viewMode = this.startViewMode;
this.showMode();
if (!this.isInput) {
$(document).off('mousedown', this.hide);
}
//this.set();
this.element.trigger({
type: 'hide',
date: this.date
});
},
set: function() {
var formated = DPGlobal.formatDate(this.date, this.format);
if (!this.isInput) {
if (this.component){
this.element.find('input').prop('value', formated);
}
this.element.data('date', formated);
} else {
this.element.prop('value', formated);
}
},
setValue: function(newDate) {
if (typeof newDate === 'string') {
this.date = DPGlobal.parseDate(newDate, this.format);
} else {
this.date = new Date(newDate);
}
this.set();
this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0);
this.fill();
},
place: function(){
var offset = this.component ? this.component.offset() : this.element.offset();
this.picker.css({
top: offset.top + this.height,
left: offset.left
});
},
update: function(newDate){
this.date = DPGlobal.parseDate(
typeof newDate === 'string' ? newDate : (this.isInput ? this.element.prop('value') : this.element.data('date')),
this.format
);
this.viewDate = new Date(this.date.getFullYear(), this.date.getMonth(), 1, 0, 0, 0, 0);
this.fill();
},
fillDow: function(){
var dowCnt = this.weekStart;
var html = '<tr>';
while (dowCnt < this.weekStart + 7) {
html += '<th class="dow">'+DPGlobal.dates.daysMin[(dowCnt++)%7]+'</th>';
}
html += '</tr>';
this.picker.find('.datepicker-days thead').append(html);
},
fillMonths: function(){
var html = '';
var i = 0
while (i < 12) {
html += '<span class="month">'+DPGlobal.dates.monthsShort[i++]+'</span>';
}
this.picker.find('.datepicker-months td').append(html);
},
fill: function() {
var d = new Date(this.viewDate),
year = d.getFullYear(),
month = d.getMonth(),
currentDate = this.date.valueOf();
this.picker.find('.datepicker-days th:eq(1)')
.text(DPGlobal.dates.months[month]+' '+year);
var prevMonth = new Date(year, month-1, 28,0,0,0,0),
day = DPGlobal.getDaysInMonth(prevMonth.getFullYear(), prevMonth.getMonth());
prevMonth.setDate(day);
prevMonth.setDate(day - (prevMonth.getDay() - this.weekStart + 7)%7);
var nextMonth = new Date(prevMonth);
nextMonth.setDate(nextMonth.getDate() + 42);
nextMonth = nextMonth.valueOf();
var html = [];
var clsName,
prevY,
prevM;
while(prevMonth.valueOf() < nextMonth) {
if (prevMonth.getDay() === this.weekStart) {
html.push('<tr>');
}
clsName = this.onRender(prevMonth);
prevY = prevMonth.getFullYear();
prevM = prevMonth.getMonth();
if ((prevM < month && prevY === year) || prevY < year) {
clsName += ' old';
} else if ((prevM > month && prevY === year) || prevY > year) {
clsName += ' new';
}
if (prevMonth.valueOf() === currentDate) {
clsName += ' active';
}
html.push('<td class="day '+clsName+'">'+prevMonth.getDate() + '</td>');
if (prevMonth.getDay() === this.weekEnd) {
html.push('</tr>');
}
prevMonth.setDate(prevMonth.getDate()+1);
}
this.picker.find('.datepicker-days tbody').empty().append(html.join(''));
var currentYear = this.date.getFullYear();
var months = this.picker.find('.datepicker-months')
.find('th:eq(1)')
.text(year)
.end()
.find('span').removeClass('active');
if (currentYear === year) {
months.eq(this.date.getMonth()).addClass('active');
}
html = '';
year = parseInt(year/10, 10) * 10;
var yearCont = this.picker.find('.datepicker-years')
.find('th:eq(1)')
.text(year + '-' + (year + 9))
.end()
.find('td');
year -= 1;
for (var i = -1; i < 11; i++) {
html += '<span class="year'+(i === -1 || i === 10 ? ' old' : '')+(currentYear === year ? ' active' : '')+'">'+year+'</span>';
year += 1;
}
yearCont.html(html);
},
click: function(e) {
e.stopPropagation();
e.preventDefault();
var target = $(e.target).closest('span, td, th');
if (target.length === 1) {
switch(target[0].nodeName.toLowerCase()) {
case 'th':
switch(target[0].className) {
case 'switch':
this.showMode(1);
break;
case 'prev':
case 'next':
this.viewDate['set'+DPGlobal.modes[this.viewMode].navFnc].call(
this.viewDate,
this.viewDate['get'+DPGlobal.modes[this.viewMode].navFnc].call(this.viewDate) +
DPGlobal.modes[this.viewMode].navStep * (target[0].className === 'prev' ? -1 : 1)
);
this.fill();
this.set();
break;
}
break;
case 'span':
if (target.is('.month')) {
var month = target.parent().find('span').index(target);
this.viewDate.setMonth(month);
} else {
var year = parseInt(target.text(), 10)||0;
this.viewDate.setFullYear(year);
}
if (this.viewMode !== 0) {
this.date = new Date(this.viewDate);
this.element.trigger({
type: 'changeDate',
date: this.date,
viewMode: DPGlobal.modes[this.viewMode].clsName
});
}
this.showMode(-1);
this.fill();
this.set();
break;
case 'td':
if (target.is('.day') && !target.is('.disabled')){
var day = parseInt(target.text(), 10)||1;
var month = this.viewDate.getMonth();
if (target.is('.old')) {
month -= 1;
} else if (target.is('.new')) {
month += 1;
}
var year = this.viewDate.getFullYear();
this.date = new Date(year, month, day,0,0,0,0);
this.viewDate = new Date(year, month, Math.min(28, day),0,0,0,0);
this.fill();
this.set();
this.element.trigger({
type: 'changeDate',
date: this.date,
viewMode: DPGlobal.modes[this.viewMode].clsName
});
}
break;
}
}
},
mousedown: function(e){
e.stopPropagation();
e.preventDefault();
},
showMode: function(dir) {
if (dir) {
this.viewMode = Math.max(this.minViewMode, Math.min(2, this.viewMode + dir));
}
this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show();
}
};
$.fn.datepicker = function ( option, val ) {
return this.each(function () {
var $this = $(this),
data = $this.data('datepicker'),
options = typeof option === 'object' && option;
if (!data) {
$this.data('datepicker', (data = new Datepicker(this, $.extend({}, $.fn.datepicker.defaults,options))));
}
if (typeof option === 'string') data[option](val);
});
};

$.fn.datepicker.defaults = {
onRender: function(date) {
return '';
}
};
$.fn.datepicker.Constructor = Datepicker;
var DPGlobal = {
modes: [
{
clsName: 'days',
navFnc: 'Month',
navStep: 1
},
{
clsName: 'months',
navFnc: 'FullYear',
navStep: 1
},
{
clsName: 'years',
navFnc: 'FullYear',
navStep: 10
}],
dates:{
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"],
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
},
isLeapYear: function (year) {
return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0))
},
getDaysInMonth: function (year, month) {
return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]
},
parseFormat: function(format){
var separator = format.match(/[.\/\-\s].*?/),
parts = format.split(/\W+/);
if (!separator || !parts || parts.length === 0){
throw new Error("Invalid date format.");
}
return {separator: separator, parts: parts};
},
parseDate: function(date, format) {
var parts = date.split(format.separator),
date = new Date(),
val;
date.setHours(0);
date.setMinutes(0);
date.setSeconds(0);
date.setMilliseconds(0);
if (parts.length === format.parts.length) {
var year = date.getFullYear(), day = date.getDate(), month = date.getMonth();
for (var i=0, cnt = format.parts.length; i < cnt; i++) {
val = parseInt(parts[i], 10)||1;
switch(format.parts[i]) {
case 'dd':
case 'd':
day = val;
date.setDate(val);
break;
case 'mm':
case 'm':
month = val - 1;
date.setMonth(val - 1);
break;
case 'yy':
year = 2000 + val;
date.setFullYear(2000 + val);
break;
case 'yyyy':
year = val;
date.setFullYear(val);
break;
}
}
date = new Date(year, month, day, 0 ,0 ,0);
}
return date;
},
formatDate: function(date, format){
var val = {
d: date.getDate(),
m: date.getMonth() + 1,
yy: date.getFullYear().toString().substring(2),
yyyy: date.getFullYear()
};
val.dd = (val.d < 10 ? '0' : '') + val.d;
val.mm = (val.m < 10 ? '0' : '') + val.m;
var date = [];
for (var i=0, cnt = format.parts.length; i < cnt; i++) {
date.push(val[format.parts[i]]);
}
return date.join(format.separator);
},
headTemplate: '<thead>'+
'<tr>'+
'<th class="prev">&lsaquo;</th>'+
'<th colspan="5" class="switch"></th>'+
'<th class="next">&rsaquo;</th>'+
'</tr>'+
'</thead>',
contTemplate: '<tbody><tr><td colspan="7"></td></tr></tbody>'
};
DPGlobal.template = '<div class="datepicker dropdown-menu">'+
'<div class="datepicker-days">'+
'<table class=" table-condensed">'+
DPGlobal.headTemplate+
'<tbody></tbody>'+
'</table>'+
'</div>'+
'<div class="datepicker-months">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
'</table>'+
'</div>'+
'<div class="datepicker-years">'+
'<table class="table-condensed">'+
DPGlobal.headTemplate+
DPGlobal.contTemplate+
'</table>'+
'</div>'+
'</div>';

}( window.jQuery );

+ 182
- 0
jm2l/static/vendor/datepicker/datepicker.css View File

@@ -0,0 +1,182 @@
/*!
* Datepicker for Bootstrap
*
* Copyright 2012 Stefan Petre
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
.datepicker {
top: 0;
left: 0;
padding: 4px;
margin-top: 1px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
/*.dow {
border-top: 1px solid #ddd !important;
}*/

}
.datepicker:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: 6px;
}
.datepicker:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
position: absolute;
top: -6px;
left: 7px;
}
.datepicker > div {
display: none;
}
.datepicker table {
width: 100%;
margin: 0;
}
.datepicker td,
.datepicker th {
text-align: center;
width: 20px;
height: 20px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.datepicker td.day:hover {
background: #eeeeee;
cursor: pointer;
}
.datepicker td.day.disabled {
color: #eeeeee;
}
.datepicker td.old,
.datepicker td.new {
color: #999999;
}
.datepicker td.active,
.datepicker td.active:hover {
color: #ffffff;
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(to bottom, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #0044cc;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */

filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker td.active:hover,
.datepicker td.active:hover:hover,
.datepicker td.active:focus,
.datepicker td.active:hover:focus,
.datepicker td.active:active,
.datepicker td.active:hover:active,
.datepicker td.active.active,
.datepicker td.active:hover.active,
.datepicker td.active.disabled,
.datepicker td.active:hover.disabled,
.datepicker td.active[disabled],
.datepicker td.active:hover[disabled] {
color: #ffffff;
background-color: #0044cc;
*background-color: #003bb3;
}
.datepicker td.active:active,
.datepicker td.active:hover:active,
.datepicker td.active.active,
.datepicker td.active:hover.active {
background-color: #003399 \9;
}
.datepicker td span {
display: block;
width: 47px;
height: 54px;
line-height: 54px;
float: left;
margin: 2px;
cursor: pointer;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.datepicker td span:hover {
background: #eeeeee;
}
.datepicker td span.active {
color: #ffffff;
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(to bottom, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #0044cc;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */

filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker td span.active:hover,
.datepicker td span.active:focus,
.datepicker td span.active:active,
.datepicker td span.active.active,
.datepicker td span.active.disabled,
.datepicker td span.active[disabled] {
color: #ffffff;
background-color: #0044cc;
*background-color: #003bb3;
}
.datepicker td span.active:active,
.datepicker td span.active.active {
background-color: #003399 \9;
}
.datepicker td span.old {
color: #999999;
}
.datepicker th.switch {
width: 145px;
}
.datepicker th.next,
.datepicker th.prev {
font-size: 21px;
}
.datepicker thead tr:first-child th {
cursor: pointer;
}
.datepicker thead tr:first-child th:hover {
background: #eeeeee;
}
.input-append.date .add-on i,
.input-prepend.date .add-on i {
display: block;
cursor: pointer;
width: 16px;
height: 16px;
}

+ 64
- 37
jm2l/templates/NewIndex.mako View File

@@ -2,7 +2,7 @@
<%def name="jsAddOn()">
<script src="/vendor/timeline/js/timeline-src.js"></script>
<script>
var timeline = new VMM.Timeline("timeline", '850px', '500px');
var timeline = new VMM.Timeline("timeline", '95%', '500px');
var c = {language:{ lang:"fr",api:{wikipedia:"fr"},date:{month:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],month_abbr:["janv.","févr.","mars","avril","mai","juin","juil.","août","sept.","oct.","nov.","dec."],day:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],day_abbr:["Dim.","Lu.","Ma.","Me.","Jeu.","Vend.","Sam."]},dateformats:{year:"yyyy",month_short:"mmm",month:"mmmm yyyy",full_short:"d mmm",full:"d mmmm yyyy",time_short:"HH:MM:SS",time_no_seconds_short:"HH:MM",time_no_seconds_small_date:"HH:MM'<br/><small>'d mmmm yyyy'</small>'",full_long:"dddd',' d mmm yyyy 'à' HH:MM",full_long_small_date:"HH:MM'<br/><small>'dddd',' d mmm yyyy'</small>'"},messages:{loading_timeline:"Chargement de la frise en cours... ",return_to_title:"Retour à la page d'accueil",expand_timeline:"Elargir la frise",contract_timeline:"Réduire la frise",wikipedia:"Extrait de Wikipedia, l'encyclopédie libre",loading_content:"Chargement",loading:"Chargement",swipe_nav:"Swipe to Navigate"}}};
timeline.init(c, "/2015/timeline-json");
</script>
@@ -10,42 +10,69 @@
<%def name="cssAddOn()">
<!-- The default timeline stylesheet -->
<link rel="stylesheet" href="/vendor/timeline/css/timeline.css" />
<style>
.enum li {
list-style-type: none;
background-image: url(/img/puce.png);
background-repeat: no-repeat;
background-position: 0 6px;
padding-left: 16px;
}
</style>
</%def>
<div class="pull-right">
Synchronisez votre calendrier avec <a href="/2015/JM2L.ics">le fichier ical JM2L 2015</a>
</div>
<br>
<div id="timeline" style="margin-left: -50px;display:block;"></div>
<div class="clearfix">&nbsp;</div>
<div style="top:500px;position: relative">
Le 28 Novembre 2015 aura lieu la 9e édition des Journées Méditerranéennes du Logiciel Libre (JM2LL) à
Sophia-Antipolis destinées tout public (http://jm2l.linux-azur.org/).
<br>
Le thème de cette année sera « Do It Yourself » ou « Faîtes le vous-même » :
<ul>
<li>Migration vers les logiciels libres</li>
<li>Libres enfants du numérique : jeux et loisirs pour les juniors.</li>
<li>Gérer ses données personnelles</li>
<li>Do It Yourself (jeux vidéos, fablabs…)</li>
<li>Culture libre</li>
<li>Communautés du libre</li>
</ul>
Nous faisons appel aux acteurs du numérique libre pour alimenter le programme des conférences/ateliers :
si vous souhaitez échanger avec le public et partager un bon moment avec la communauté, inscrivez-vous !
<H2 style="text-align: center;">9<sup>ème</sup> édition des JM2L</H2>
<br>
Nous vous proposons cinq formats de contribution :
<ul>
<li>Stands au sein du village associatif</li>
<li>Conférences de 20 ou 40 minutes suivies d’un échange</li>
<li>Ateliers de 45 minutes ou 1h15</li>
<li>Démos de vos matériels, logiciels ou projets libres</li>
<li>Animations ouvertes</li>
</ul>
<p>
Il sera bien sûr possible de combiner plusieurs formats (par exemple, une démo ou une conférence suivie
d’un atelier).
</p>
<p>
Vous pouvez nous faire parvenir vos propositions directement via le menu participer.
</p>
<div class="row-fluid">
<div class="span4 offset1">
<blockquote>
Le 28 Novembre 2015 aura lieu la 9<sup>ème</sup> édition des Journées Méditerranéennes du Logiciel Libre (JM2L) à
Polytech'Nice destinée à tout public.
</blockquote>
Le thème de cette année sera « Do It Yourself » ou « Faîtes le vous-même » :
<ul class="enum">
<li>Migration vers les logiciels libres</li>
## <li>Libres enfants du numérique : jeux et loisirs pour les juniors.</li>
## <li>Gérer ses données personnelles</li>
<li>Do It Yourself (jeux vidéos, fablabs…)</li>
<li>Culture libre</li>
## <li>Communautés du libre</li>
</ul>
</div>
<div class="span4 offset1">
<p>
Nous faisons appel aux acteurs du numérique libre pour alimenter le programme des conférences/ateliers :
<br>
Vous pouvez nous faire parvenir vos propositions directement via le menu <a href="/participer-l-evenement">participer.</a>
<br>
Si vous souhaitez échanger avec le public et partager un bon moment avec la communauté, <a href="/participer-l-evenement#inscription">inscrivez-vous !</a>
<br>
Vous pouvez d'ores et déjà synchroniser votre calendrier avec <a href="/2015/JM2L.ics">notre fichier ical JM2L 2015</a>
</p>
</div>
</div>


## Nous vous proposons plusieurs formats de contribution :
## <ul class="enum">
## <li>Stands au sein du village associatif</li>
## <li>Conférences de 20 à 70 minutes suivies d’un échange</li>
## <li>Ateliers de 45 minutes ou 1h15</li>
## <li>Démos de vos matériels, logiciels ou projets libres</li>
## <li>Animations ouvertes</li>
## <li>Vous pouvez aussi aider l'équipe à la logistique.</li>
## </ul>
## <p>
## Il sera bien sûr possible de combiner plusieurs formats (par exemple, une démo ou une conférence suivie
## d’un atelier).
## </p>

<div class="row-fluid">
<div class="span12">
<!-- TimeLine -->
<div id="timeline"></div>
</div>
</div>
<div class="row-fluid">
<div style="height:500px">
</div>
</div>

+ 4
- 1
jm2l/templates/Participer.mako View File

@@ -47,6 +47,8 @@
</ol>
% if not link:
<strong>Remplissez ce formulaire :</strong>
<div class="row-fluid">
<div class="span7 offset3">
<%
DicForm ={
'nom': {'PlaceHolder':u"Mon nom", 'ContainerStyle':'float:left;'},
@@ -68,10 +70,11 @@ DicForm ={
</div>
<button class="btn btn-large btn-primary" type="submit">C'est parti !</button>
</form>
</div>
</div>
% else:
<p>
Vous venez de recevoir un mail...
Ici, ... le texte à définir ...
</p>
Cliquez sur ce lien pour finir votre inscription : <a href="${request.route_path('bymail', hash=link)}">Mon lien</a>
% endif


+ 47
- 10
jm2l/templates/Profil/Profil.mako View File

@@ -1,11 +1,6 @@
<%namespace name="Modals" file="jm2l:templates/modals.mako"/>
<%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
<%def name="profil_wrapper(uprofil, profil_form)">
<div id="Photos">
${helpers.show_my_pictures(uprofil)}
</div>
<a href="/sign/jm2l/${uprofil.my_hash}">Mon lien</a>
<h3>${profil_form.prenom.data} ${profil_form.nom.data}</h3>

##<form id="ProfilForm" action="javascript:DoPost('/2015/modal/Place/${form.place_id.data}');">
% if uprofil!=request.user and request.user.uid==1:
@@ -14,8 +9,42 @@
<form id="ProfilForm" action="/MesJM2L" method="POST">
% endif

<div class="row-fluid">
<div class="span8">
<a href="/sign/jm2l/${uprofil.my_hash}">Mon lien de connection</a> -
<a href="/user/${request.user.slug}">Mon profil publique</a><br>
<h3>${profil_form.prenom.data} ${profil_form.nom.data}</h3>
<%
DicForm = {
DicFormA = {
'nom': {'PlaceHolder':u"Mon Nom", 'ContainerClass':"span6", 'next':False},
'prenom': {'PlaceHolder':u"Mon Prénom", 'ContainerClass':"span6", 'next':True},
'pseudo': {'PlaceHolder':u"Mon Pseudo", 'ContainerClass':"span6", 'next':False},
'mail': {'PlaceHolder':u"mon.mail@fqdn.tld", 'ContainerClass':"span6", 'next':True},
'phone': {'PlaceHolder':u"0612345678", 'ContainerClass':"span6", 'next':False},
'website': {'PlaceHolder':u"http://ma-page-web.moi",'ContainerClass':"span6", 'next':True},
'gpg_key': {'PlaceHolder':u"Ma clé gpg", 'ContainerClass':"span6", 'next':False},
'soc_link':{'PlaceHolder':u"#jm2l sur irc.freenode.org",'ContainerClass':"span6", 'next':True},
'bio': {'Ignore':True},
'tiersship': {'Ignore':True},
'id': {'Ignore':True},
'user_id': {'Ignore':True},
}

DicFormB = {
'nom': {'Ignore':True },
'prenom': {'Ignore':True },
'pseudo': {'Ignore':True },
'mail': {'Ignore':True },
'phone': {'Ignore':True },
'website': {'Ignore':True },
'gpg_key': {'Ignore':True},
'soc_link': {'Ignore':True},
'bio': {'PlaceHolder':u"Ma Bilibiographie", "ckeditor":1, 'ContainerClass':"span11", 'next':False },
'tiersship': {'Ignore':True}
}


DicForm2 = {
'nom': {'PlaceHolder':u"Mon Nom", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
'prenom': {'PlaceHolder':u"Mon Prénom", "FieldStyle":"width:16em;"},
'pseudo': {'PlaceHolder':u"Mon Pseudo", "FieldStyle":"width:16em;", 'ContainerStyle':"float:left;"},
@@ -27,10 +56,17 @@ DicForm = {
'bio': {'PlaceHolder':u"Ma Bilibiographie", "FieldStyle":"width:95%;min-height:150px;", "fieldset":True, "ckeditor":1 },
'tiersship': {'Ignore':True}
}
%>
${helpers.DisplayForm(profil_form, DicForm)}

<fieldset>
%>
${helpers.DisplayRespForm(profil_form, DicFormA)}
</div>
<div class="span4">
${helpers.show_my_pictures(uprofil)}
</div>
</div>
${helpers.DisplayRespForm(profil_form, DicFormB)}
<fieldset>
<legend>Activité</legend>
Si vous ne trouvez pas l'entité que vous souhaitez promouvoir (Association, GULL, Entreprise, Logiciel, ...).
Vous pouvez <a href="/entity"> en ajouter une. </a>
@@ -110,8 +146,9 @@ DicForm = {
</div>
</fieldset>

<div class="span2 offset5">
<input class="btn btn-primary" type="submit" value="Enregistrer !" />
</div>
</form>

</%def>

+ 25
- 32
jm2l/templates/Profil/Sejour.mako View File

@@ -4,21 +4,21 @@ fieldset:disabled {
color:#CCC;
}
</style>
##<input type="checkbox" onclick="javascript:$('.ComeToJM2L').attr( 'disabled', !this.checked );">Je viens aux JM2L 2015</input>
<form id="ProfilForm" action="/MonSejour" method="POST">
<fieldset class="ComeToJM2L">
<legend>Arriv&eacute;e</legend>
<div class="form-inline">
J'arrive
<select style="width:12em;" id="Arrival:Place" name="Arrival:Place" title="Lieu">
% for place in Places:
<option value="${place.place_id}">${place.display_name}</option>
% endfor
% for place in Places:
<option value="${place.place_id}">${place.display_name}</option>
% endfor
</select>
le
<select style="width:7em;" id="Arrival:Day" name="Arrival:Day" title="Jour">
<option value="Jeudi">Jeudi</option>
<option value="Vendredi">Vendredi</option>
<option value="Samedi">Samedi</option>
<option value="26">Jeudi</option>
<option value="27">Vendredi</option>
<option value="28">Samedi</option>
</select>
,
<select style="width:15em;" id="Arrival:Confidence" name="Arrival:Confidence">
@@ -29,14 +29,14 @@ fieldset:disabled {
</select>

&agrave;
<select style="width:6em;" id="Arrival:Hour" class="formforform-field" name="field_8" title="Le">
<select style="width:6em;" id="Arrival:Hour" class="formforform-field" name="Arrival:Hour" title="Le">
% for hour in range(24):
% for minutes in range(0,60,10):
<option value="${hour}h${minutes}"
% if str("%dh%.2d" % (hour, minutes))=='10h00':
selected="selected"
% endif
>${"%dh%.2d" % (hour, minutes)}</option>
% for minutes in range(0,60,10):
<option value="${"%d:%.2d" % (hour, minutes)}"
% if str("%dh%.2d" % (hour, minutes))=='10h00':
selected="selected"
% endif
>${"%dh%.2d" % (hour, minutes)}</option>
% endfor
% endfor
</select>
@@ -46,13 +46,7 @@ fieldset:disabled {
context._kwargs['postpone_js'].append( "$('#Arrival\\\\:Day').select2({width:'resolve'});" % jsitem )
context._kwargs['postpone_js'].append( "$('#Arrival\\\\:Confidence').select2({width:'resolve'});" % jsitem )
context._kwargs['postpone_js'].append( "$('#Arrival\\\\:Hour').select2({width:'resolve'});" % jsitem )
%>
##<script type="text/javascript">
## $("#Arrival\\:Place").select2({});
## $("#Arrival\\:Day").select2({});
## $("#Arrival\\:Confidence").select2({});
## $("#Arrival\\:Hour").select2({});
##</script>
%>
</div>
<p>
<div class="control-group" style="background-color: #fafafa;padding: 10px 50px; width:60%">
@@ -97,9 +91,9 @@ fieldset:disabled {
</select>
le
<select style="width:7em;" id="Departure:Day" class="formforform-field" name="field_8" title="Le">
<option value="Samedi">Samedi</option>
<option value="Dimanche">Dimanche</option>
<option value="Lundi">Lundi</option>
<option value="28">Samedi</option>
<option value="29">Dimanche</option>
<option value="30">Lundi</option>
</select>
,
<select style="width:14em;" id="Departure:Confidence" class="formforform-field" name="field_8" title="Le">
@@ -127,14 +121,6 @@ fieldset:disabled {
context._kwargs['postpone_js'].append( "$('#Departure\\\\:Confidence').select2({width:'resolve'});" % jsitem )
context._kwargs['postpone_js'].append( "$('#Departure\\\\:Hour').select2({width:'resolve'});" % jsitem )
%>

##<script type="text/javascript">
## $("#Departure\\:Place").select2({});
## $("#Departure\\:Day").select2({});
## $("#Departure\\:Confidence").select2({});
## $("#Departure\\:Hour").select2({});
##</script>
</div>
<p>
<div class="control-group" style="background-color: #fafafa;padding: 10px 50px; width:60%">
@@ -169,4 +155,11 @@ fieldset:disabled {
</div>
</p>
</fieldset>
<center>
<button type="submit" class="btn btn-large btn-primary" />
<i class="icon-ok icon-white"></i> Enregistrer
</button>
</center>
</form>

</%def>

+ 35
- 14
jm2l/templates/Public/Plan.mako View File

@@ -1,4 +1,16 @@
<%inherit file="jm2l:templates/layout.mako"/>
<%def name="jsAddOn_head()">
<script src="/vendor/leaflet/js/leaflet.js"></script>
</%def>
<%def name="cssAddOn()">
<link rel="stylesheet" href="/vendor/leaflet/css/leaflet.css" />
<style>
#come_map {
height: 300px;
}
</style>
</%def>

<h2 class="page-title">Nous rejoindre...</h2>

<div class="span10 offset1">
@@ -12,9 +24,11 @@
<div class="span4 offset1">
<h4>Le staff</h4>
<dl>
<dt>Mail</dt>
<dt>sur IRC</dt>
<dd>» #jm2l@irc.freenode.net</dd>
<dt>par Mail</dt>
<dd>» contact at jm2l.linux-azur.org</dd>
<dt>Téléphone</dt>
<dt>par Téléphone</dt>
<dd>» +33 (0)&nbsp;6 52 42 31 37</dd>
</dl>
</div>
@@ -25,12 +39,28 @@
930, route des Colles (site des Templiers)&nbsp;<br>
06903 Sophia Antipolis (Biot)
</address>
<p>GPS Lat.: 43°36'57.72"N - Lon.: 7°4'17.03"E</p>
<p>GPS Lat.: 43°61'56.9"N - Lon.: 7°0'71.95"E</p>
</div>
</div>

<div class="row-fluid">
<div class="span6">
<div class="span8 offset2">
<div id="come_map"></div>
<script type="text/javascript">
var map = L.map('come_map');
// create the tile layer with correct attribution
var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmAttrib='Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors';
var osm = new L.TileLayer(osmUrl, {minZoom: 7, maxZoom: 18, attribution: osmAttrib});
// start the map on specified GPS Coords
map.setView(new L.LatLng(43.61562,7.0724),15);
marker = L.marker([43.615693, 7.0726221]).addTo(map);
map.addLayer(osm);
</script>
</div>
</div>
<br>
<div class="row-fluid">
<div class="span10 offset1">
<div class="tabbable" id="main_tab">
<ul class="nav nav-tabs">
<li class="active"><a href="#Trsp" data-toggle="tab"><img style="margin-bottom: -15px;" alt="en bus" src="/img/tr_bus_.png"></a></li>
@@ -137,15 +167,6 @@
</div>
</div>
</div>
<div class="span6">
<p>
<img alt="" src="http://jm2l.linux-azur.org/sites/jm2l.linux-azur.org/files/jm2l_plan_acces_polytech.png" style="height:507px; width:665px">
</p>
<p>
<a href="http://www.openstreetmap.org/?lat=43.61211&amp;lon=7.07081&amp;zoom=14&amp;layers=M&amp;mlat=43.61637&amp;mlon=7.08520">Voir une carte plus grande</a>
</p>
</div>

</div>
<br>


+ 8
- 1
jm2l/templates/Public/Presse.mako View File

@@ -1,7 +1,9 @@
<%inherit file="jm2l:templates/layout.mako"/>
<%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
<%
DisplayYear = request.session.get('year',2015)
%>
<div class="span9">
<h1 class="page-title">Dossier de presse ${DisplayYear}</h1>
% if content and content.doss_presse:
<div class="span10 offset1">
@@ -76,4 +78,9 @@ DisplayYear = request.session.get('year',2015)
<p class="spip">Et pour ce ux qui veullent tout mettre en local sur leur espace web, l’image banner2007.png est ici&nbsp;: <a href="/web/20071231104349/http://jm2l.linux-azur.org/IMG/png/banner2007.png" class="spip_url spip_out">http://jm2l.linux-azur.org/IMG/png/...</a>
Préférez quand même la première méthode qui présente l’avantage de nous permettre de faire quelques statistiques.</p>
% endif
<br><br>

</div>
<div class="span3">
<!--Sidebar content-->
${helpers.participants(DisplayYear)}
</div>

+ 37
- 21
jm2l/templates/Public/Programme.mako View File

@@ -1,4 +1,5 @@
<%inherit file="jm2l:templates/layout.mako"/>
<%namespace name="helpers" file="jm2l:templates/helpers.mako"/>
<%
TabDisplay = [
(u'Tables rondes', 'Table ronde'),
@@ -7,6 +8,11 @@ TabDisplay = [
(u'Stands', 'Stand'),
]
%>
<%def name="jsAddOn()">
<script type="text/javascript" src="/vendor/d3js/d3.v3.min.js"></script>
<script type="text/javascript" src="/js/programme.js"></script>
</%def>
<%def name="cssAddOn()">
<style>
.myblock {
background-color:#EEE;
@@ -31,11 +37,9 @@ TabDisplay = [
}
.Atelier {
fill: #faebeb;
stroke: #dc7070;
}
.Table-ronde {
fill: #fff4e5;
stroke: #ff9912;
}
.Repas {
fill: #2EE;
@@ -54,26 +58,38 @@ rect {
fill: none;
stroke: #222;
}

</style>
<h2>Le Programme ${DisplayYear}</h2>

<div class="tabbable" id="main_tab">
<ul class="nav nav-tabs" style="margin-bottom: 5px;">
% for Num, (Day, IdDay) in enumerate(Days):
<li class="${['','active'][Num==0]}"><a href="#Day${Num}" id="Schedule_${Num}" data-toggle="tab">${Day}</a></li>
% endfor
</ul>
<div class="tab-content" style="padding:0">
% for Num, (Day, IdDay) in enumerate(Days):
<div class="tab-pane fade ${['','active '][Num==0]}in" id="Day${Num}">
## Container for SVG version of Programme
<div id="Schedule_SVG_${IdDay}">
</%def>
<div class="row-fluid">
<div class="span9">
<h2>Le Programme ${DisplayYear}</h2>
<div class="tabbable" id="main_tab">
<ul class="nav nav-tabs" style="margin-bottom: 5px;">
% for Num, (Day, IdDay) in enumerate(Days):
<li class="${['','active'][Num==0]}"><a href="#Day${Num}" id="Schedule_${Num}" data-toggle="tab">${Day}</a></li>
% endfor
</ul>
<div class="tab-content" style="padding:0">
% for Num, (Day, IdDay) in enumerate(Days):
<div class="tab-pane fade ${['','active '][Num==0]}in" id="Day${Num}">
## Container for SVG version of Programme
<div id="Schedule_SVG_${IdDay}">
</div>
</div>
% endfor
</div>
% endfor
</div>

</div>
<div class="span3">
<!--Sidebar content-->
${helpers.participants(DisplayYear)}
</div>
</div>
<div class="row-fluid">
<div class="span10 offset1">

<div id="DivProg" style="border: 1px solid black;"></div>

@@ -99,7 +115,7 @@ if Counter==0:
<thead>
<tr>
<th style="width:7em;text-align:center;">Date</th>
<th style="text-align:center;">Sujet - ${Counter} ${Title}</th>
<th style="text-align:center;">${Counter} ${Title}</th>
</tr>
</thead>
<tbody>
@@ -154,6 +170,6 @@ if Counter==0:
% endfor
##</div>
<br/><br/>
<script type="text/javascript" src="/vendor/d3js/d3.v3.min.js"></script>
<script type="text/javascript" src="/js/programme.js"></script>
</div>
</div>

+ 5
- 0
jm2l/templates/Staff/list.mako View File

@@ -8,6 +8,9 @@ from slugify import slugify
</a>
<h3>Liste des tâches JM2L Staff</h3>

<div class="row-fluid">
<div class="span10 offset1">

<div class="tabbable" id="main_tab">
<ul class="nav nav-tabs" style="margin-bottom: 5px;">
% for Num, Entity in enumerate(sorted(tasks.keys(), key=lambda x:x.name)):
@@ -84,6 +87,8 @@ from slugify import slugify
</div>
</div>

</div>
</div>
<%def name="jsAddOn()">
<script>
$('a[data-toggle="tab"]')


+ 7
- 1
jm2l/templates/Staff/new.mako View File

@@ -1,9 +1,15 @@
# -*- coding: utf-8 -*-
<%inherit file="jm2l:templates/layout.mako"/>

<div class="row-fluid">
<div class="span10 offset1">

<h1>Add a new task</h1>

<form action="/Staff/new" method="post">
<input type="text" maxlength="100" name="name">
<input type="submit" class="btn btn-primary" name="add" value="ADD" class="button">
</form>
</form>

</div>
</div>

+ 21
- 4
jm2l/templates/Staff/pole.mako View File

@@ -15,6 +15,14 @@
<noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-noscript.css"></noscript>
<noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui-noscript.css"></noscript>
</%def>

<div class="row-fluid">
<div class="span10 offset1">

<a class="btn" href="${request.route_path('list_task', _anchor=form.name.data)}">
<i class="icon-arrow-left"></i> Retour à la liste
</a>

% if 'uid' in form._fields.keys():
<h3>Editer un Pôle</h3>
% else:
@@ -34,11 +42,20 @@ DicForm = {
<form action="/Staff/poles" method="post">
%endif
${helpers.DisplayForm(form, DicForm)}
<input type="submit" class="btn btn-primary" />

<br>
<center>
<button type="submit" class="btn btn-large btn-primary" />
<i class="icon-ok icon-white"></i> Enregistrer
</button>
</center>

</form>
% if 'uid' in form._fields.keys():
<center>
${helpers.uploader("poles", form.uid.data, u"Attachement" )}
</center>
%endif
<script>
## var editor = CKEDITOR.replace( 'description', { autoGrow_onStartup: true, language: 'fr' } );
</script>
</div>
</div>

+ 21
- 3
jm2l/templates/Staff/tasks.mako View File

@@ -25,8 +25,14 @@
<noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-noscript.css"></noscript>
<noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui-noscript.css"></noscript>
</%def>
<p>Green checkmarks indicate that class is visible in your current viewport.</p>
<a style="float:right;" href="${request.route_path('list_task', _anchor=area)}">Retour à la liste</a>

<div class="row-fluid">
<div class="span10 offset1">

<a class="btn" href="${request.route_path('list_task', _anchor=area)}">
<i class="icon-arrow-left"></i> Retour à la liste
</a>

% if 'uid' in form._fields.keys():
<h3>Editer une tâche</h3>
% else:
@@ -49,8 +55,20 @@ DicForm = {
<form action="/Staff/tasks" method="post">
%endif
${helpers.DisplayForm(form, DicForm)}
<input type="submit" class="btn btn-primary" value="Valider" />

<br>
<center>
<button type="submit" class="btn btn-large btn-primary" />
<i class="icon-ok icon-white"></i> Enregistrer
</button>
</center>

</form>
% if 'uid' in form._fields.keys():
<center>
${helpers.uploader("tasks", form.uid.data, u"une pièce jointe" )}
</center>
%endif

</div>
</div>

+ 43
- 100
jm2l/templates/edit_event.mako View File

@@ -16,33 +16,10 @@
<noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui-noscript.css"></noscript>
</%def>
<% from datetime import datetime %>
<style>
.borderbox {
border: 1px solid #e1e4e5;
margin: 1px 0 24px;
color: #404040;
line-height: 1.5;
margin: 0;
overflow: auto;
padding: 12px;
background: none repeat scroll 0 0 #fcfcfc;
font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
}
.titleborderbox {
background: none repeat scroll 0 0 #ffffff;
border: 1px solid #eee;
display: inline;
left: 16px;
padding: 2px 7px;
position: relative;
top: 10px;
}
.borderboxtime {
float:right;
padding:1px 15px;
border: 1px solid #eee;
}
</style>

<div class="row-fluid">
<div class="span10 offset1">


% if 'uid' in form._fields:
<div class="borderboxtime">
@@ -63,7 +40,7 @@
% else:
% for num, iterv in enumerate(event.intervenants):
<li>
<strong><a href="/MesJM2L?user=${iterv.uid}">${iterv.prenom} ${iterv.nom}</a></strong>.
<strong><a href="/user/${iterv.slug}">${iterv.prenom} ${iterv.nom}</a></strong>.
% if iterv.pseudo:
(${iterv.pseudo})
%endif
@@ -125,56 +102,20 @@ DicForm = {
<fieldset>
<legend>Ajouter vos co-intervenants</legend>
<p>
Vous avez la possibilité d'être plusieurs pour un même évenement.
Pour enregistrer une autre personne, deux cas peuvent se présenter:
<ul>
<li>Votre partenaire n'est pas inscrit sur le site</li>
<p>
Inscrivez son email avec son accord dans le champ suivant,
Un mail lui sera envoyé pour qu'il procède à son inscription.
Un fois son inscription effectué, reportez vous au deuxième cas.
</p>
<li>Votre partenaire est inscrit sur le site</li>
<p>
Demandez lui l'email utilisé lors de son inscription sur le site des JM2L.
Complétez le champ suivant et validez.
</p>
</ul>
Notez que les intervenants d'un même évenement ont tous les droits de modification.
Vous avez la possibilité d'être plusieurs pour un même évenement.<br>
Chacun des intervenants doit être inscrit sur le site.
<form action="/MesJM2L/${form.for_year.data}/${form.event_type.data}/link" method="POST">
${formAdd.event_uid}
<input type="hidden" id="intervenant" name="intervenant" style="width:20em;"
class="form-control select2-offscreen" tabindex="-1">
</input>
<button type="submit" class="btn btn-primary" />
<i class="icon-plus icon-white"></i> Ajouter cet intervenant
</button>
</form>
NB : Notez que les intervenants d'un même évenement ont tous les droits de modification.
</p>
<form action="/MesJM2L/${form.for_year.data}/${form.event_type.data}/link" method="POST">
${formAdd.event_uid}
<%
TabFields = [
( formAdd._fields["prenom"], u"Prénom", "padding-right:5px;float:left;" ),
( formAdd._fields["nom"], u"Nom", "padding-right:5px;" ),
( formAdd._fields["email"], u"son.mail@fqdn.tld", "padding-right:5px;" ),
]
%>
% for Field, PlaceHolder, DivClass in TabFields:
<div style="padding-right:5px;${DivClass}">
<label for="${Field.label.field_id}">${Field.label.text}
% if len(Field.description):
<a id="${Field.label.field_id}-help" data-toggle="popover"
data-original-title="${Field.label.text}"
data-content="${Field.description}">
<i class="icon-me" style="background-image: url('/img/Help.png');background-position:1px 2px;"></i>
</a>
% endif
</label>
% for error in Field.errors:
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>Erreur!</h4>
${ error }
</div>
% endfor
${Field(placeholder=PlaceHolder, style="width:16em;")}
</div>
% endfor
## Then the submit for this form
${formAdd.add}
</form>

</fieldset>
<div class="clearfix">&nbsp;</div>
<p style="float:right;">Créé le ${event.created.strftime('%d %b %Y').decode('utf-8')}</p>
@@ -186,27 +127,31 @@ TabFields = [
<br/>
<hr/>

% if 0:
% if 'uid' in form._fields:
${helpers.uploader_js()}
% endif
<script type="text/javascript">
## Handle Popover of this form
% for field in form._fields.keys():
$('#${field}-help').popover();
% if form._fields[field].type=='SelectField':
$('#${field}').select2({width:'resolve'});
% endif
%endfor
% if formAdd:
% for field in formAdd._fields.keys():
$('#${field}-help').popover();
%endfor
% endif
var editor = CKEDITOR.replace('description', { autoGrow_onStartup: true, language: 'fr' } );
</script>
% else:
</div>
</div>

<%def name="jsAddOn()">
<script src="/vendor/select2/js/select2.js"></script>
<script>
jQuery(function() {
$("#intervenant").select2(
{
placeholder: 'Entrez ici un Nom ou un Prénom',
minimumInputLength: 2, allowClear: true,
ajax: {
quietMillis: 250, url: "/json-users", dataType: 'json',
data: function (term, page) {
return { pageSize: 8, pageNum: page, searchTerm: term };
},
results: function (data, page) {
var more = (page * 8) < data.Total;
return { results: data.Results, more: more };
}
}
});
});
</script>
</%def>
<%
for jsitem in form._fields.keys():
context._kwargs['postpone_js'].append( "$('#%s-help').popover();" % jsitem )
@@ -216,5 +161,3 @@ if formAdd:
for jsitem in formAdd._fields.keys():
context._kwargs['postpone_js'].append( "$('#%s-help').popover();" % jsitem )
%>
##${helpers.uploader_js()}
% endif

+ 13
- 14
jm2l/templates/edit_tiers.mako View File

@@ -8,6 +8,11 @@
<noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-noscript.css"></noscript>
<noscript><link rel="stylesheet" href="/vendor/fileupload/css/jquery.fileupload-ui-noscript.css"></noscript>
</%def>
<div class="row-fluid">
<div class="span10 offset1">
<a class="pull-right" href="/categorie/entity">Editer les catégories</a>
<br>
<form action="" method="POST">
@@ -30,18 +35,18 @@ DicForm = {
<fieldset>
<legend>Acteurs</legend>
<div class="repeat">
<table class="wrapper" width="100%">
<table class="wrapper table table-striped table-bordered" width="100%">
<thead>
<tr class="row">
<th style="width:5em;text-align:center;">Année</th>
<th>Personne</th>
<th style="width:22em;">Personne</th>
<th style="width:22em;">Rôle</th>
<th style="width:5em;">Action</th>
</tr>
</thead>
<tbody class="container">
<tr class="row template" style="line-height:2.2em;">
<td><span class="move btn btn-mini btn-info">Move</span></td>
##<td><span class="move btn btn-mini btn-info">Move</span></td>
<td>
<select class="form-control" style="width:5em;" name="membership-{{row-count-placeholder}}-year_uid"
id="membership-{{row-count-placeholder}}-year_uid">
@@ -65,6 +70,7 @@ DicForm = {
<option value="${opt.uid}">${opt.exch_subtype}</option>
% endfor
</select>
<input type="text" class="form-control" name="membership-{{row-count-placeholder}}-role" />
</td>
<td>
<span class="remove btn btn-mini btn-danger">
@@ -74,7 +80,7 @@ DicForm = {
</tr>
% for num, dicdata in enumerate(form._fields.get("membership").data):
<tr class="row" style="padding:5px;line-height:2.2em;">
<td><span class="move btn btn-mini btn-info">Move</span></td>
##<td><span class="move btn btn-mini btn-info">Move</span></td>
<td style="text-align:center;">
<input type="hidden" class="form-control" name="membership-${num}-year_uid"
value="${dicdata.get('year_uid')}" style="width:4em;" />
@@ -91,8 +97,6 @@ DicForm = {
% endif
</td>
<td style="text-align:center;">
<input type="hidden" class="form-control" name="membership-${num}-role"
value="${dicdata.get('role')}" />
<i>${dicdata.get('role', 'Aucun')}</i>
</td>
<td>
@@ -140,13 +144,9 @@ DicForm = {
<br>NB: Vous devez proposer votre entité avant de pouvoir
téléverser des fichiers la concernant.
% endif
<br>
<br>
<br>
##% if 'uid' in form._fields:
## ${helpers.uploader_js()}
##% endif
</div>
</div>
<%def name="jsAddOn()">
<script src="/vendor/select2/js/select2.js"></script>
@@ -154,7 +154,7 @@ DicForm = {
<script src="/vendor/ckeditor/ckeditor.js"></script>
<script type="text/javascript">
var year_data = Array();
##var editor = CKEDITOR.replace('description', { autoGrow_onStartup: true, language: 'fr' } );
var editor = CKEDITOR.replace('description', { autoGrow_onStartup: true, language: 'fr' } );
for (var i=2005;i<2015;i++)
{ year_data[i.toString()] = i.toString(); };
@@ -190,7 +190,6 @@ jQuery(function() {
}
});
$("#membership-"+ (numrow-1) +"-year_uid").select2({});
$("#membership-"+ (numrow-1) +"-role").select2({});
}
});
});


+ 76
- 9
jm2l/templates/helpers.mako View File

@@ -1,6 +1,72 @@
## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
## Afficher un form
## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
<%def name="DisplayRespForm(form, DicFormat)">
<%
TabJs = {'select':[], 'desc':[]}
%>
<div class="row-fluid">
% for FieldName, Field in form._fields.items():
% if DicFormat.has_key(Field.name) and DicFormat[Field.name].get("Ignore"):
<% continue %>
% endif
% if Field.type in ['HiddenField', 'CSRFTokenField']:
${Field}
<% continue %>
% elif Field.type=="SelectField":
<% TabJs['select'].append(Field.label.field_id) %>
% endif
<div class="${DicFormat[Field.name].get("ContainerClass")}">
<label for="${Field.label.field_id}">${Field.label.text}
% if Field.description:
<% TabJs['desc'].append(Field.label.field_id) %>
<a id="${Field.label.field_id}-help" data-toggle="popover"
data-original-title="${Field.label.text}"
data-content="${Field.description}">
<i class="icon-me" style="background-image: url('/img/Help.png');background-position:1px 2px;"></i>
</a>
% endif
</label>
% if DicFormat.has_key(Field.name):
<%
PlaceHolder = DicFormat[Field.name].get("PlaceHolder")
Class = [False,"ckeditor"][ "ckeditor" in DicFormat[Field.name] ]
%>
% if Field.type == "date":
${Field(placeholder=PlaceHolder or False, class_="datepicker", style="width:100%" )}
% else:
${Field(placeholder=PlaceHolder or False, class_=Class, style="width:100%")}
% endif
% else:
${Field(style="width:100%")}
% endif
% for error in Field.errors:
<div class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<h4>Erreur!</h4>
${ error }
</div>
% endfor
</div>

% if DicFormat.has_key(Field.name) and DicFormat[Field.name].get("next")==True:
</div>
<div class="row-fluid">
% endif

% endfor
</div>
<%
for jsitem in TabJs['select']:
context._kwargs['postpone_js'].append( "$('#%s').select2({});" % jsitem )
for jsitem in TabJs['desc']:
context._kwargs['postpone_js'].append( "$('#%s-help').popover();" % jsitem )
%>

</%def>
## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
## Afficher un form
## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
<%def name="DisplayForm(form, DicFormat)">
<%
TabJs = {'select':[], 'desc':[]}
@@ -361,14 +427,12 @@ TabJs = {'select':[], 'desc':[]}
## Wrapper pour les photos
## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
<%def name="show_my_pictures(uprofil)"> \
<div class="profile-icon" style="float:right;height:250px;width:250px;">
<div class="profile-icon">
<% photos = uprofil.PhotosLinks %>
<div style="text-align: center;line-height:20px;"><b>${request.user.slug}</b></div>
<div style="text-align: center;line-height:20px;">
<a data-target="#AjaxModal" Myhref="/2015/modal/Password/1" role="button" handle="modal">Changer mon mot de passe</a>
</div>
<div style="text-align: center;line-height:20px;">
<a data-target="#AjaxModal" Myhref="/2015/modal/UserPicture/${uprofil.uid}" handle="modal">Changer ma photo</a>
</div>
<div id="MyPictureCarousel" class="carousel slide">
% if len(photos)>1:
<!-- Carousel nav -->
@@ -376,24 +440,27 @@ TabJs = {'select':[], 'desc':[]}
<a class="Ucarousel-control right" href="#MyPictureCarousel" data-slide="next">&rsaquo;</a>
% endif
<!-- Carousel items -->
<div class="carousel-inner" style="height: 220px;">
<div class="carousel-inner">
% if len(photos):
% for num, link in enumerate(photos):
<div class="${['','active '][num==0]}item" id="UserPic${num}">
<div style="margin:auto;">
<img src="${link}" class="img-polaroid" style="max-height:205px;max-width:235px;" alt="Photo ${uprofil.slug}" />
<div style="margin:auto;text-align:center;">
<img src="${link}" class="img-polaroid" style="max-height:310px;" alt="Photo ${uprofil.slug}" />
</div>
</div>
% endfor
% else:
<div class="active item" id="UserPic0">
<div style="margin:auto;width:170px;">
<img src="/img/default-user.png" class="img-polaroid" alt="Photo ${uprofil.slug}" style="max-height:205px;" />
<div style="margin:auto;text-align:center;">
<img src="/img/default-user.png" style="max-height:310px;" class="img-polaroid" alt="Photo ${uprofil.slug}" />
</div>
</div>
% endif
</div>
</div>
<div style="text-align: center;line-height:20px;">
<a data-target="#AjaxModal" Myhref="/2015/modal/UserPicture/${uprofil.uid}" handle="modal">Changer ma photo</a>
</div>
</div>
</%def> \
## -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


+ 2
- 0
jm2l/templates/jm2l.mako View File

@@ -57,6 +57,7 @@
</div>

<div class="row-fluid">
<div class="span10 offset1">
<div class="tabbable" id="main_tab">
<ul class="nav nav-tabs" style="margin-bottom: 5px;">
<li class="active"><a href="#Profil" id="Map_Profil" data-toggle="tab">Mon Profil</a></li>
@@ -149,5 +150,6 @@
</div>
</div>
</div>
</div>
##${h.uploader_js()}

+ 46
- 20
jm2l/templates/layout.mako View File

@@ -21,12 +21,15 @@
<link rel="stylesheet" href="/static/ie6.css" type="text/css" media="screen" charset="utf-8" />
<![endif]-->
<script src="/vendor/modernizr-2.8.3-respond-1.4.2.min.js"></script>
${self.cssAddOn()}
${self.jsAddOn_head()}
</head>
<body>
<%
context._kwargs['postpone_js']=[]
DisplayYear = request.session.get('year', 2015)
%>
<%def name="jsAddOn_head()"></%def>
<%def name="jsAddOn()"></%def>
<%def name="cssAddOn()"></%def>
${helpers.uploader_js()}
@@ -36,8 +39,10 @@ ${helpers.uploader_js()}
% if DisplayYear!=2015:
## style="background: url( ${"/img/%s/headerbg.png" % DisplayYear} ) repeat-x scroll 0 top #ffffff;">
<div class="align-center">
<a href="/">
<div style="height:215px;background: url( ${"/img/%s/logo.png" % DisplayYear} ) no-repeat scroll center center transparent">
</div>
</a>
</div>
% else:
<!-- Carousel
@@ -51,14 +56,28 @@ ${helpers.uploader_js()}
</ol>
<div class="carousel-inner" role="listbox">
<div class="item active">