From: yomguy Date: Sat, 21 Apr 2012 14:33:58 +0000 (+0200) Subject: fix chat room input style X-Git-Tag: 0.3~12 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=08cb51dd40f5af1f0fefedf7972cffa3e8bf4944;p=teleforma.git fix chat room input style --- diff --git a/teleforma/static/teleforma/css/teleforma.css b/teleforma/static/teleforma/css/teleforma.css index ca708bdd..a9bf7084 100644 --- a/teleforma/static/teleforma/css/teleforma.css +++ b/teleforma/static/teleforma/css/teleforma.css @@ -1552,6 +1552,11 @@ input,textarea{ font-size: 0.8125em; } +.msg-black { + font-size: 0.9em; + background-image: url(/static/telemeta/images/tw_hd.png); + } + #users { padding: 0.8em 0em 0em 0em; background-color: #FFF; diff --git a/teleforma/templates/teleforma/course_conference.html b/teleforma/templates/teleforma/course_conference.html index cabe3890..26e77c91 100644 --- a/teleforma/templates/teleforma/course_conference.html +++ b/teleforma/templates/teleforma/course_conference.html @@ -46,19 +46,9 @@ {% block chat %} {% if room %}
-
-

rss{% trans "Local tweeter" %}

- -
-
Loading...
-
{% csrf_token %} - - - -
- -
-
+{% with trans "Local tweeter" as title %} +{% include "teleforma/inc/chat_room.html" %} +{% endwith %}
{% endif %} {% endblock chat %} diff --git a/teleforma/templates/teleforma/course_detail.html b/teleforma/templates/teleforma/course_detail.html index 3899ad62..659db372 100644 --- a/teleforma/templates/teleforma/course_detail.html +++ b/teleforma/templates/teleforma/course_detail.html @@ -58,19 +58,9 @@ $(document).ready(function(){ {% block chat %} {% if room %}
-
-

rss{% trans "Local tweeter" %}

- -
-
Loading...
-
{% csrf_token %} - - - -
- -
-
+{% with "Local tweeter" as title %} +{% include "teleforma/inc/chat_room.html" %} +{% endwith %}
{% endif %} {% endblock chat %} diff --git a/teleforma/templates/teleforma/course_document.html b/teleforma/templates/teleforma/course_document.html index 8794dbc2..21c663ef 100644 --- a/teleforma/templates/teleforma/course_document.html +++ b/teleforma/templates/teleforma/course_document.html @@ -76,19 +76,9 @@ PDFJS.getDocument('{% url teleforma-document-download document.id %}').then(func {% block chat %} {% if room %}
-
-

rss{% trans "Local tweeter" %}

- -
-
Loading...
-
{% csrf_token %} - - - -
- -
-
+{% with trans "Local tweeter" as title %} +{% include "teleforma/inc/chat_room.html" %} +{% endwith %}
{% endif %} {% endblock chat %} diff --git a/teleforma/templates/teleforma/course_media.html b/teleforma/templates/teleforma/course_media.html index 4018442a..1656e4ab 100644 --- a/teleforma/templates/teleforma/course_media.html +++ b/teleforma/templates/teleforma/course_media.html @@ -73,19 +73,9 @@ $(document).ready(function(){ {% block chat %} {% if room %}
-
-

rss{% trans "Local tweeter" %}

- -
-
Loading...
-
{% csrf_token %} - - - -
- -
-
+{% with trans "Local tweeter" as title %} +{% include "teleforma/inc/chat_room.html" %} +{% endwith %}
{% endif %} {% endblock chat %} diff --git a/teleforma/templates/teleforma/courses.html b/teleforma/templates/teleforma/courses.html index 319a94a6..454aa4c0 100644 --- a/teleforma/templates/teleforma/courses.html +++ b/teleforma/templates/teleforma/courses.html @@ -91,19 +91,9 @@ $(document).ready(function(){ {% block chat %} {% if room %}
-
-

rss{% trans "General tweeter" %}

- -
-
Loading...
-
{% csrf_token %} - - - -
- -
-
+{% with "General tweeter" as title %} +{% include "teleforma/inc/chat_room.html" %} +{% endwith %}
{% endif %} {% endblock chat %} diff --git a/teleforma/templates/teleforma/inc/chat_room.html b/teleforma/templates/teleforma/inc/chat_room.html new file mode 100644 index 00000000..3d2502a5 --- /dev/null +++ b/teleforma/templates/teleforma/inc/chat_room.html @@ -0,0 +1,18 @@ +{% load i18n %} +{% load telemeta_utils %} +{% load teleforma_tags %} + +
+

rss{% trans title %}

+
+
Loading...
+
{% csrf_token %} + +
+ + +
+
+ +
+
diff --git a/teleforma/templates/telemeta/users.html b/teleforma/templates/telemeta/users.html index 2f321389..b0583b5c 100644 --- a/teleforma/templates/telemeta/users.html +++ b/teleforma/templates/telemeta/users.html @@ -11,6 +11,7 @@ {% block content %}
+

playlists{% trans "Trainings" %}

@@ -24,6 +25,20 @@
+
+

playlists{% trans "IEJ" %}

+
+ +
+
+ + {% if all_users %}
{% trans "Grouped message" %} @@ -40,7 +55,7 @@
{% endif %} -
{% trans "Users" %}{% if training %} - {{ training }}{% else %} - {% trans "All trainings" %}{% endif %}
+
{% trans "Users" %}{% if training %} - {{ training }}{% elif iej %} - {{ iej }}{% endif %}

{% if users %} {% include "telemeta/inc/user_list.html" %} diff --git a/teleforma/urls.py b/teleforma/urls.py index 2a611479..c05fcbae 100644 --- a/teleforma/urls.py +++ b/teleforma/urls.py @@ -62,6 +62,7 @@ urlpatterns = patterns('', # Users url(r'^users/$', UsersView.as_view(), name="teleforma-users"), url(r'^users/by_training/(\w+)/$', UsersTrainingView.as_view(), name="teleforma-training-users"), + url(r'^users/by_iej/(\w+)/$', UsersIejView.as_view(), name="teleforma-iej-users"), url(r'^users/all/export/$', user_export.all, name="teleforma-users-xls-export"), url(r'^users/by_training/(?P.*)/export/$', user_export.by_training, name="teleforma-training-users-export"), url(r'^users/(?P.*)/login/$', UserLoginView.as_view(), name="teleforma-user-login"), diff --git a/teleforma/views.py b/teleforma/views.py index 4a126fed..dfa681d1 100755 --- a/teleforma/views.py +++ b/teleforma/views.py @@ -211,6 +211,7 @@ class UsersView(ListView): context = super(UsersView, self).get_context_data(**kwargs) context['trainings'] = Training.objects.all() context['all_users'] = User.objects.all() + context['iejs'] = IEJ.objects.all() paginator = NamePaginator(self.object_list, on="last_name", per_page=12) try: page = int(self.request.GET.get('page', '1')) @@ -246,19 +247,35 @@ class UserLoginView(View): class UsersTrainingView(UsersView): def get_queryset(self): - self.trainings = Training.objects.filter(id=self.args[0]) - return User.objects.filter(student__training__in=self.trainings).order_by('last_name') + self.training = Training.objects.filter(id=self.args[0]) + return User.objects.filter(student__training__in=self.training).order_by('last_name') def get_context_data(self, **kwargs): context = super(UsersTrainingView, self).get_context_data(**kwargs) context['training'] = Training.objects.get(id=self.args[0]) - context['all_users'] = User.objects.filter(student__training__in=self.trainings).all() + context['all_users'] = User.objects.filter(student__training__in=self.training).all() return context @method_decorator(login_required) def dispatch(self, *args, **kwargs): return super(UsersTrainingView, self).dispatch(*args, **kwargs) +class UsersIejView(UsersView): + + def get_queryset(self): + self.iej = IEJ.objects.filter(id=self.args[0]) + return User.objects.filter(student__iej__in=self.iej).order_by('last_name') + + def get_context_data(self, **kwargs): + context = super(UsersIejView, self).get_context_data(**kwargs) + context['iej'] = IEJ.objects.get(id=self.args[0]) + context['all_users'] = User.objects.filter(student__iej__in=self.iej).all() + return context + + @method_decorator(login_required) + def dispatch(self, *args, **kwargs): + return super(UsersIejView, self).dispatch(*args, **kwargs) + class UsersXLSExport(object):