Adnane Belmadiaf has proposed merging lp:~daker/loco-directory/fix.707614 into
lp:loco-directory.
Requested reviews:
loco-directory-dev (loco-directory-dev)
Related bugs:
Bug #707614 in LoCo Team Directory: "wrong irc chat name when name contains a
dot"
https://bugs.launchpad.net/loco-directory/+bug/707614
For more details, see:
https://code.launchpad.net/~daker/loco-directory/fix.707614/+merge/65124
--
https://code.launchpad.net/~daker/loco-directory/fix.707614/+merge/65124
Your team loco-directory-dev is requested to review the proposed merge of
lp:~daker/loco-directory/fix.707614 into lp:loco-directory.
=== added directory 'loco_directory/common/templatetags'
=== added file 'loco_directory/common/templatetags/__init__.py'
=== added file 'loco_directory/common/templatetags/teams_tags.py'
--- loco_directory/common/templatetags/teams_tags.py 1970-01-01 00:00:00 +0000
+++ loco_directory/common/templatetags/teams_tags.py 2011-06-19 14:01:23 +0000
@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+from django import template
+
+register = template.Library()
+
+def irc(nickname):
+ """
+ Replace dots with underscores
+ """
+ return nickname.replace('.', '_')
+
+register.filter('irc', irc)
=== modified file 'loco_directory/templates/teams/team_detail.html'
--- loco_directory/templates/teams/team_detail.html 2011-06-13 11:17:32 +0000
+++ loco_directory/templates/teams/team_detail.html 2011-06-19 14:01:23 +0000
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-{% load i18n %}
+{% load i18n teams_tags %}
{% block title %}{% trans team.name %} | {% trans "Ubuntu LoCo Team Directory" %} {% endblock %}
@@ -215,7 +215,7 @@
{% if team.irc_chan %}
<div id="webchat">
{% if user.is_authenticated %}
- <iframe src="http://webchat.freenode.net/?channels={{ team.irc_chan }}&prompt=1&uio=OT10cnVlJjEwPXRydWUmMTE9MjM218&nick={{ user.username }}" width="900" height="400"></iframe>
+ <iframe src="http://webchat.freenode.net/?channels={{ team.irc_chan }}&prompt=1&uio=OT10cnVlJjEwPXRydWUmMTE9MjM218&nick={{ user.username|irc }}" width="900" height="400"></iframe>
{% else %}
<iframe src="http://webchat.freenode.net/?channels={{ team.irc_chan }}&prompt=1&uio=OT10cnVlJjEwPXRydWUmMTE9MjM218&nick=locodir-user" width="900" height="400"></iframe>
{% endif %}
_______________________________________________
Mailing list: https://launchpad.net/~loco-directory-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~loco-directory-dev
More help : https://help.launchpad.net/ListHelp