font-weight: bold;
}
+
+#module-set-left .module h3 a {
+ color: #FFF;
+ }
+
#module-set-left .module ul {
margin: 0em 0em 0em 0.5em;
font-size: 0.8125em;
background-color: #FFF;
color: #0000 ;
font-weight: bold;
+ max-height: 250px;
+ overflow-y: scroll;
+
}
#module-set-left .module a {
float: left;
width:55%;
padding: 0em 0em 0em 1em;
+ max-height: 600px;
+ overflow-y: scroll;
}
.desk_large {
+ float: left;
+ width:75%;
+ padding: 0em 0.8em 0em 1em;
+ max-height: 600px;
+ overflow-y: scroll;
+ }
+
+.desk_course {
float: left;
width:75%;
padding: 0em 0em 0em 1em;
}
+.desk_media {
+ float: left;
+ width: 640px;
+ padding: 0em 0em 0em 1em;
+ }
.course {
margin: 0em 0em 2em 0em;
}
.course_content {
- /*max-height: 200px;
- overflow-y: scroll;*/
background-color: #FFF;
-moz-border-radius: 8px 0px 8px 8px;
-webkit-border-radius: 8px 0px 8px 8px;
border-radius: 8px 0px 8px 8px;
- padding: 0em 0em 0em 0.3em;
+ padding: 0em 0em 0em 0em;
}
.course_content h2 {
- padding: 0.5em 0em 0em 0.3em;
+ padding: 0.5em 0.8em 0em 0.8em;
}
.course_media {
+ float: left;
background-color: transparent;
- margin: 0em 0em 2em 0em;
+ margin: 0em 0em 2em 1em;
-moz-border-radius: 8px 0px 8px 8px;
-webkit-border-radius: 8px 0px 8px 8px;
border-radius: 8px 0px 8px 8px;
+ width: 640px;
/* border: 2px solid #CCC; */
}
-moz-border-radius: 8px 0px 8px 8px;
-webkit-border-radius: 8px 0px 8px 8px;
border-radius: 8px 0px 8px 8px;
-
+ padding: 0.5em 0.8em 0.8em 0.8em;
}
#pm_messages {
#chatwindow {
height: 340px;
- width: 187px;
border-bottom: 1px solid;
padding: 0.8em 2em 0em 0em;
overflow: auto;
--- /dev/null
+from optparse import make_option
+from django.conf import settings
+from django.core.management.base import BaseCommand, CommandError
+from django.contrib.auth.models import User
+from django.template.defaultfilters import slugify
+from telemeta.models import *
+from telemeta.util.unaccent import unaccent
+from teleforma.models import *
+import logging
+import codecs
+import xlrd
+from xlwt import Workbook
+
+class Command(BaseCommand):
+ help = "Export users to a XLS file (see an example in example/data/"
+ args = "path"
+ first_row = 2
+ admin_email = 'webmaster@parisson.com'
+
+ def export_user(self, count, user):
+ student = Student.objects.filter(user=user)
+ if student:
+ student = Student.objects.get(user=user)
+ row = self.sheet.row(count)
+ row.write(0, user.last_name)
+ row.write(1, user.first_name)
+ row.write(9, user.email)
+
+ row.write(2, unicode(student.iej))
+ row.write(3, unicode(student.training))
+ row.write(4, unicode(student.procedure))
+ row.write(5, unicode(student.written_speciality))
+ row.write(6, unicode(student.oral_speciality))
+ row.write(7, unicode(student.oral_1))
+ row.write(8, unicode(student.oral_2))
+ row.write(15, unicode(student.category))
+# address = row[10].value
+# p_code = row[11].value
+# city = row[12].value
+# tel = row[13].value
+# date = row[14].value
+
+ print 'exported: ' + user.first_name + ' ' + user.last_name + ' ' + user.username
+
+
+
+ def handle(self, *args, **options):
+ file = args[0]
+ self.book = Workbook()
+ self.sheet = self.book.add_sheet('Etudiants')
+ users = User.objects.all()
+ count = 0
+ for user in users:
+ self.export_user(count, user)
+ count += 1
+ self.book.save(file)
+
+
class Meta:
db_table = app_label + '_' + 'course'
verbose_name = _('course')
+ ordering = ['title']
class Professor(Model):
class Meta:
db_table = app_label + '_' + 'conference'
verbose_name = _('conference')
+ ordering = ['-date_begin']
class MediaBase(Model):
class Meta:
abstract = True
- ordering = ['date_added']
+ ordering = ['-date_added']
class Document(MediaBase):
</div>
</div>
-
-
{% endblock postman_menu %}
\ No newline at end of file
{% block content %}
-<div id="postman" class="desk_center">
+<div id="postman" class="desk_media">
<h1>{% block pm_folder_title %}{% endblock %}</h1>
{% autopaginate pm_messages %}
{% if invalid_page %}
{% endif %}
{% endblock %}
{% block content %}
-<div id="postman" class="desk_center">
+<div id="postman" class="desk_course">
<h1>{% block pm_write_title %}{% endblock %}</h1>
<form id="_messageForm" action="{% if next_url %}?next={{ next_url|urlencode }}{% endif %}" method="post">{% csrf_token %}
<table>
{% load postman_tags %}
{% block content %}
-<div id="postman" class="desk_center">
+<div id="postman" class="desk_media">
<h1>{% if pm_messages|length > 1 %}{% trans "Conversation" %}{% else %}{% trans "Message" %}{% endif %}</h1>
<br /><br />
{% for message in pm_messages %}
{% endblock courses %}
{% block course %}
-
+<div class="desk_course">
<div class="course">
<div class="course_title">{{ course.title }}{% if course.description %} - {{ course.description }}{% endif %}
{% endwith %}
{% endblock %}
+</div>
</div>
{% endblock course %}
{% endblock extra_javascript %}
{% block course %}
-
<div class="course_media">
<div class="course_title">{{ course.title }}{% if course.description %} - {{ course.description }}{% endif %}
{% block chat %}
{% if room %}
-<div id="module-set" style="width: 290px">
+<div id="module-set" style="width: 270px">
<div class="module">
<h3><img src="{% url telemeta-images "search_wh2.png" %}" alt="rss" style="vertical-align:middle" />{% trans "Questions" %}</h3>
<div id="module-set-left" style="width: 20%">
<div class="module">
-<h3><img src="{% url telemeta-images "module_playlist.png" %}" alt="playlists" style="vertical-align:middle" />{% trans "My courses" %}</h3>
+<h3><a href="{% url teleforma-courses %}"><img src="{% url telemeta-images "module_playlist.png" %}" alt="playlists" style="vertical-align:middle" />{% trans "My courses" %}</a></h3>
<div style="background: white;">
<ul>
{% block courses %}
</div>
-
-<div class="desk_center">
- {% block course %}
+{% block course %}
+<div class="desk_large">
{% for course in object_list %}
<div class="course">
<div class="course_title">{{ course.title }}{% if course.description %} - {{ course.description }}{% endif %}
</div>
+ {% if course.conference.all or course.document.all or course.media.all %}
{% block document %}
- {% with course as course and %}
+ {% with course as course %}
{% include "teleforma/inc/document_list.html" %}
{% endwith %}
{% endblock %}
{% block media %}
- {% with course as course and %}
+ {% with course as course %}
{% include "teleforma/inc/media_list.html" %}
{% endwith %}
{% endblock %}
{% block conference %}
- {% with course as course and %}
+ {% with course as course %}
{% include "teleforma/inc/conference_list.html" %}
{% endwith %}
{% endblock %}
-
+ {% else %}
+ <div class="course_content">
+ <h2>{% trans "No document" %}</h2>
+ </div>
+ {% endif %}
</div>
{% endfor %}
- {% endblock course %}
- </div>
+
+</div>
+{% endblock course %}
</div>
{% block chat %}
{% load i18n %}
+{% if course.conference.all %}
<div class="course_content">
<h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Conferences"%}</h2>
<table class="listing" width="100%">
{% endfor %}
</tbody>
</table>
-</div>
\ No newline at end of file
+</div>
+{% endif %}
\ No newline at end of file
{% load i18n %}
+{% if course.document.all %}
<div class="course_content">
<h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Documents"%}</h2>
<table class="listing" width="100%">
{% endfor %}
</tbody>
</table>
-</div>
\ No newline at end of file
+</div>
+{% endif %}
\ No newline at end of file
{% load i18n %}
+{% if course.media.all %}
<div class="course_content">
<h2><img src="{% url telemeta-images "item_title.png" %}" style="vertical-align:middle" /> {% trans "Medias"%}</h2>
<table class="listing" width="100%">
{% endfor %}
</tbody>
</table>
-</div>
\ No newline at end of file
+</div>
+{% endif %}
\ No newline at end of file
<tr><th>{% trans "Last Name"%}</th>
<th>{% trans "First Name"%}</th>
<th>{% trans "User"%}</th>
- <th>{% trans "Training"%}</th>
<th>{% trans "IEJ"%}</th>
<th>{% trans "Procedure"%}</th>
<th>{% trans "Oral spe"%}</th>
<th>{% trans "Written spe"%}</th>
<th>{% trans "Oral 1"%}</th>
<th>{% trans "Oral 2"%}</th>
- <th>{% trans "Synthesis"%}</th>
<th>{% trans "Messages"%}</th>
</tr>
</thead>
{% if user.student.get %}
{% with user.student.get as student %}
- <td>{{ student.training.code }}</td>
<td>{{ student.iej.name }}</td>
<td>{{ student.procedure.code }}</td>
<td>{{ student.oral_speciality.code }}</td>
<td>{{ student.written_speciality.code }}</td>
<td>{{ student.oral_1.code }}</td>
<td>{{ student.oral_2.code }}</td>
- <td></td>
{% endwith %}
{% elif user.professor.get %}
<td>{% trans "Professor" %}</td>
<td></td>
<td></td>
<td></td>
- <td></td>
- <td></td>
{% endif %}
<td><a href="{% url postman_write user.username %}" class="component_icon button" id="action_green">{% trans "Write" %}</a></td>
</div>
</div>
-<div class="desk_large">
+<div class="desk_course">
<div class="course_title">{% trans "Users" %}</div>
{% if users %}
{% include "telemeta/inc/user_list.html" %}