Ronnie has proposed merging lp:~ronnie.vd.c/loco-directory/my-teams into
lp:loco-directory.
Requested reviews:
loco-directory-dev (loco-directory-dev)
For more details, see:
https://code.launchpad.net/~ronnie.vd.c/loco-directory/my-teams/+merge/54126
Added my Teams page
--
https://code.launchpad.net/~ronnie.vd.c/loco-directory/my-teams/+merge/54126
Your team loco-directory-dev is requested to review the proposed merge of
lp:~ronnie.vd.c/loco-directory/my-teams into lp:loco-directory.
=== modified file '.bzrignore'
--- .bzrignore 2010-08-28 19:27:47 +0000
+++ .bzrignore 2011-03-20 15:23:28 +0000
@@ -10,3 +10,5 @@
local_settings.py
loco_directory/ubuntu_website
data
+bzr_apps
+loco_directory/media/js/twidenash
=== modified file 'loco_directory/events/models.py'
--- loco_directory/events/models.py 2011-03-16 18:52:30 +0000
+++ loco_directory/events/models.py 2011-03-20 15:23:28 +0000
@@ -90,6 +90,10 @@
class TeamEventManager(models.Manager):
""" manager for a team event """
+ def next_3_events(self):
+ """ a list with the next 3 events """
+ return self.filter(date_end__gt=datetime.datetime.now()).order_by('date_end')[:3]
+
def next_5_events(self):
""" a list with the next 5 events """
return self.filter(date_end__gt=datetime.datetime.now()).order_by('date_end')[:5]
=== modified file 'loco_directory/media/css/newstyle.css'
--- loco_directory/media/css/newstyle.css 2011-03-15 13:08:01 +0000
+++ loco_directory/media/css/newstyle.css 2011-03-20 15:23:28 +0000
@@ -479,3 +479,69 @@
position: absolute;
right: 10px;
}
+
+/* My Teams style */
+h2.dynamic-width {
+ display: inline-block;
+ margin-bottom: 0;
+}
+
+.resources {
+ font-size: 0.75em;
+ float: right;
+ margin-top: 21px;
+}
+
+.resources a {
+ margin-left: 8px;
+}
+
+.flickr a {
+ display: inline-block;
+ padding: 7px;
+}
+
+.main-content-split {
+ width:450px;
+ margin-top: 15px;
+}
+
+.main-content-split.left {
+ float: left;
+}
+
+.main-content-split.right {
+ float: right;
+}
+
+.main-content-split.left .title {
+ font-size: 0.875em;
+}
+
+.main-content-split.left .new {
+ float: right;
+ font-size: 0.75em;
+}
+
+.event-summary {
+ margin-top:15px;
+}
+
+hr.no-top {
+ margin: 0 0;
+}
+
+img.bottom {
+ vertical-align: bottom;
+}
+
+ul.indent {
+ list-style: none;
+ background-color: #F7F7F7;
+ padding: 2px 2px 2px 15px;
+}
+
+ul.indent li {
+ line-height:1.2em;
+ margin: 0.5em 0;
+}
=== modified file 'loco_directory/media/css/twidenash.css'
--- loco_directory/media/css/twidenash.css 2010-09-28 17:21:02 +0000
+++ loco_directory/media/css/twidenash.css 2011-03-20 15:23:28 +0000
@@ -7,30 +7,31 @@
*/
-ul.twidenash li {
+.twidenash li {
list-style-type: none;
clear: both;
padding: 3px;
- font-size: 100%;
+ font-size: 0.75em;
}
-ul.twidenash li img {
+.twidenash li img {
float: left;
vertical-align: top;
padding-right: 10px;
+ margin-top: 3px;
}
-ul.twidenash li .comment {
+.twidenash li .comment {
margin-left: 5px;
display: block;
overflow: auto;
}
-ul.twidenash li .nick {
+.twidenash li .nick {
font-weight: bold;
}
-ul.twidenash li .time {
+.twidenash li .time {
font-size: 0.75em;
color: #555;
}
=== added file 'loco_directory/media/img/rss.png'
Binary files loco_directory/media/img/rss.png 1970-01-01 00:00:00 +0000 and loco_directory/media/img/rss.png 2011-03-20 15:23:28 +0000 differ
=== removed file 'loco_directory/media/js/twidenash.js'
--- loco_directory/media/js/twidenash.js 2010-09-28 17:21:02 +0000
+++ loco_directory/media/js/twidenash.js 1970-01-01 00:00:00 +0000
@@ -1,140 +0,0 @@
-/*
-*
-* Copyright (c) 2010 Stuart Langridge
-*
-* Permission is hereby granted, free of charge, to any person obtaining a copy
-* of this software and associated documentation files (the "Software"), to deal
-* in the Software without restriction, including without limitation the rights
-* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-* copies of the Software, and to permit persons to whom the Software is
-* furnished to do so, subject to the following conditions:
-*
-* The above copyright notice and this permission notice shall be included in
-* all copies or substantial portions of the Software.
-*
-* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-* THE SOFTWARE.
-*
-* Website: http://code.google.com/p/twidenash/
-*/
-
-/*
-* With modification by Michael Hall for use in loco.ubuntu.com
-*/
-
-twidenash = {
- init: function() {
- if (!twidenash.hashtag) return;
- // request hashtag search values for both twitter and identica
- twidenash.callbacks = 0;
- twidenash.items = [];
- twidenash.add_script("http://locoteams.status.net/api/search.json?" +
- "callback=twidenash.cb&rpp=10&q=%23" + twidenash.hashtag);
- twidenash.add_script("http://identi.ca/api/search.json?" +
- "callback=twidenash.cb&rpp=10&q=%23" + twidenash.hashtag);
- twidenash.add_script("http://search.twitter.com/search.json?" +
- "callback=twidenash.cb&rpp=10&q=%23" + twidenash.hashtag);
- twidenash.printed = 0;
- },
- add_script: function(url) {
- var scr = document.createElement("script");
- scr.src = url;
- document.getElementsByTagName("head")[0].appendChild(scr);
- },
- cb: function(data) {
- for (var i=0; i<data.results.length; i++) {
- var dupe = false;
- for (var j=0; j<twidenash.items.length; j++) {
- // Strip characters that may be specific to networks
- var comp1 = data.results[i].text.replace(/[âº\!\#\@]/g, '');
- var comp2 = twidenash.items[j].text.replace(/[âº\!\#\@]/g, '');
- var compdate = Date.parse(data.results[i].created_at);
- var datediff = Math.abs(Date.parse(data.results[i].created_at) - twidenash.items[j].dt)
- if (comp1 == comp2 && datediff < 120000) {
- dupe = true;
- break;
- }
- }
- if (dupe) continue;
- twidenash.items.push({ text: data.results[i].text,
- img: data.results[i].profile_image_url,
- dt: Date.parse(data.results[i].created_at),
- user: data.results[i].from_user })
- }
- twidenash.callbacks += 1;
- if (twidenash.callbacks == 2) {
- twidenash.items.sort(function(a,b) { return b.dt - a.dt });
- var ul = document.createElement("ul");
- ul.className = "twidenash";
- for (i=0; i<twidenash.items.length && twidenash.printed < 5; i++) {
- var li = document.createElement("li");
- var img = document.createElement("img");
- img.src = twidenash.items[i].img;
- img.width = 48;
- var relative_to = (arguments.length > 1) ? arguments[1] : new Date();
- var delta = parseInt((relative_to.getTime() - twidenash.items[i].dt) / 1000);
- var pluralize = function (singular, n) {
- return '' + n + ' ' + singular + (n == 1 ? '' : 's');
- };
- if(delta < 60) {
- date_msg = 'less than a minute ago ';
- } else if(delta < (45*60)) {
- date_msg = 'about ' + pluralize("minute", parseInt(delta / 60)) + ' ago ';
- } else if(delta < (24*60*60)) {
- date_msg = 'about ' + pluralize("hour", parseInt(delta / 3600)) + ' ago ';
- } else {
- date_msg = 'about ' + pluralize("day", parseInt(delta / 86400)) + ' ago ';
- }
- var span = document.createElement("span");
- span.className = 'comment';
- var nick = document.createElement("span");
- nick.className = 'nick';
- nick.appendChild(document.createTextNode(twidenash.items[i].user));
- var time = document.createElement("span");
- time.className = 'time';
- time.appendChild(document.createTextNode(" ( "+ date_msg +" ) "));
-
- var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi;
- span.innerHTML = twidenash.items[i].text.replace(exp,"<a href='$1' target='_blank'>$1</a>");
- li.appendChild(img);
- li.appendChild(nick);
- li.appendChild(time);
- li.appendChild(span);
- ul.appendChild(li);
- twidenash.printed++;
- }
- twidenash.scriptelement.parentNode.insertBefore(ul, twidenash.scriptelement);
- }
- },
- cache_scriptname: function() {
- // called before page load so we can find our own name
- var scr = document.getElementsByTagName("script");
- var url = scr[scr.length-1].getAttribute("src");
- if (!url) {
- var twidenash_script = document.getElementById("twidenash_script");
- if (twidenash_script) url = twidenash_script.getAttribute("src");
- }
- if (url && url.lastIndexOf('?') != -1) {
- twidenash.hashtag = url.substr(url.lastIndexOf('?')+1);
- if (twidenash_script) {
- twidenash.scriptelement = twidenash_script;
- } else {
- twidenash.scriptelement = scr[scr.length-1];
- }
- }
- }
-};
-(function(i) {var u =navigator.userAgent;var e=/*@cc_on!@*/false; var st =
-setTimeout;if(/webkit/i.test(u)){st(function(){var dr=document.readyState;
-if(dr=="loaded"||dr=="complete"){i()}else{st(arguments.callee,10);}},10);}
-else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
-document.addEventListener("DOMContentLoaded",i,false); } else if(e){ (
-function(){var t=document.createElement('doc:rdy');try{t.doScroll('left');
-i();t=null;}catch(e){st(arguments.callee,0);}})();}else{window.onload=i;}})(twidenash.init);
-twidenash.cache_scriptname();
-
=== modified file 'loco_directory/meetings/models.py'
--- loco_directory/meetings/models.py 2011-03-18 13:37:13 +0000
+++ loco_directory/meetings/models.py 2011-03-20 15:23:28 +0000
@@ -38,7 +38,14 @@
class TeamMeetingManager(models.Manager):
""" manager for a team event """
-
+ def next_3_meetings(self):
+ """ a list with the next 3 team meetings """
+ return self.next_meetings()[:3]
+
+ def next_5_meetings(self):
+ """ a list with the next 5 team meetings """
+ return self.next_meetings()[:5]
+
def next_meetings(self):
""" a list with all upcoming team meetings """
return self.filter(date_end__gt=datetime.datetime.now()).order_by('date_end')
=== modified file 'loco_directory/settings.py'
--- loco_directory/settings.py 2010-12-07 21:42:01 +0000
+++ loco_directory/settings.py 2011-03-20 15:23:28 +0000
@@ -113,7 +113,7 @@
ubuntu_website.TEMPLATE_DIR,
)
-INSTALLED_APPS = (
+INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
@@ -126,7 +126,7 @@
'userprofiles',
'django_openid_auth',
'south',
-)
+]
AUTHENTICATION_BACKENDS = (
'django_openid_auth.auth.OpenIDBackend',
@@ -159,6 +159,24 @@
FLICKR_API_KEY = '8c969a1e8a49629bb89b411930ab1cc8'
+# Manage apps from bzr branches
+try:
+ import bzr_apps
+ INSTALLED_APPS.append('bzr_apps')
+except:
+ pass
+
+BZR_APPS = {
+ ## ubuntu-django-foundations app management
+ 'bzr_apps': ('bzr+ssh://bazaar.launchpad.net/%2Bbranch/ubuntu-django-foundations/bzr-apps/', '3'),
+
+ ## ubuntu-website supplied templates and styles
+ 'ubuntu_website': ('bzr+ssh://bazaar.launchpad.net/~ubuntu-community-webthemes/ubuntu-community-webthemes/light-django-theme', '32'),
+
+ ## twidenash supplied microblog embedding javascript
+ 'media/js/twidenash': ('bzr+ssh://bazaar.launchpad.net/~django-foundations-dev/twidenash/2.0/', '3'),
+}
+
import logging
try:
from local_settings import *
=== modified file 'loco_directory/teams/management/commands/init-ld.py'
--- loco_directory/teams/management/commands/init-ld.py 2011-03-15 13:08:01 +0000
+++ loco_directory/teams/management/commands/init-ld.py 2011-03-20 15:23:28 +0000
@@ -44,11 +44,14 @@
else:
print " * Creating jquery symlinks: not necessary."
- print " * Adding ubuntu_website media:",
- if os.path.isdir(os.path.join(path, "ubuntu_website")):
+ print " * Adding Bzr Apps:",
+ if os.path.isdir(os.path.join(path, "bzr_apps", ".bzr")):
print "not necessary."
else:
- subprocess.call(["bzr", "branch", "-q",
- "lp:ubuntu-community-webthemes/light-django-theme",
- "ubuntu_website"])
+ subprocess.call(["bzr", "branch", "-q", "--use-existing-dir",
+ "lp:ubuntu-django-foundations/bzr-apps",
+ "bzr_apps"])
print "added."
+
+ print " * Pulling Bzr Apps:",
+ subprocess.call(["./manage.py", "pullapps"])
=== modified file 'loco_directory/teams/models.py'
--- loco_directory/teams/models.py 2011-01-18 20:49:15 +0000
+++ loco_directory/teams/models.py 2011-03-20 15:23:28 +0000
@@ -128,6 +128,6 @@
if len(events_and_meetings) > 5:
events_and_meetings = events_and_meetings[:5]
return events_and_meetings
-
+
def teams_without_country():
return Team.objects.filter(countries__isnull=True)
=== modified file 'loco_directory/teams/urls.py'
--- loco_directory/teams/urls.py 2011-02-17 21:16:56 +0000
+++ loco_directory/teams/urls.py 2011-03-20 15:23:28 +0000
@@ -2,6 +2,7 @@
urlpatterns = patterns('',
url(r'^$', 'teams.views.team_list', name='team-list'),
+ url(r'^me$', 'teams.views.my_teams', name='my-teams'),
url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/edit$', 'teams.views.team_edit', name='team-edit'),
url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/merge/(?P<other_team_slug>[a-zA-Z0-9\-\.\+?]+)/$', 'teams.views.team_merge', name='team-merge'),
url(r'(?P<team_slug>[a-zA-Z0-9\-\.\+?]+)/merge', 'teams.views.select_other_team', name='select-other-team'),
=== modified file 'loco_directory/teams/views.py'
--- loco_directory/teams/views.py 2011-02-17 21:16:56 +0000
+++ loco_directory/teams/views.py 2011-03-20 15:23:28 +0000
@@ -78,6 +78,16 @@
return render_to_response('teams/team_list.html', context,
RequestContext(request))
+@login_required
+def my_teams(request):
+ teams = Team.objects.filter(lp_name__in=[group.name for group in request.user.groups.all()])
+ context = {
+ 'teams': teams,
+ }
+ return render_to_response('teams/my_teams.html', context,
+ RequestContext(request))
+
+
def team_ical(request, team_slug):
"""
Return a ical list with the events and meetings in ical format.
=== modified file 'loco_directory/templates/base.html'
--- loco_directory/templates/base.html 2011-03-15 13:08:01 +0000
+++ loco_directory/templates/base.html 2011-03-20 15:23:28 +0000
@@ -15,11 +15,8 @@
{% trans "Logged in as:" %}
<a class="top-login-item" href="http://launchpad.net/~{{ user.username }}">{{ user.username }}</a>
<span class="top-login-separator">|</span>
- {% comment %}
- <!-- Need to be activated when https://code.launchpad.net/~ronnie.vd.c/loco-directory/my-teams is merged -->
<a class="top-login-item" href="{% url my-teams %}">{% trans "My Teams" %}</a>
<span class="top-login-separator">|</span>
- {% endcomment %}
<a class="top-login-item" href="{% url logout %}" title="{% trans "Log Out" %}: {{ user.username }}">{% trans "Log Out" %}</a>
{% else %}
<a class="top-login-item" href="/openid/login?next={{login_next}}" title="{% trans "Log In" %}">{% trans "Log In" %}</a>
=== modified file 'loco_directory/templates/events/global_event_detail.html'
--- loco_directory/templates/events/global_event_detail.html 2011-02-17 20:05:03 +0000
+++ loco_directory/templates/events/global_event_detail.html 2011-03-20 15:23:28 +0000
@@ -6,9 +6,11 @@
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language={% trans 'en' %}®ion={% trans 'US' %}"></script>
<script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/1.0/src/markerclusterer_packed.js"></script>
<script type="text/javascript" src="{{MEDIA_URL}}js/jquery-ubuntu-maps.js"></script>
+ <script type="text/javascript" src="{{MEDIA_URL}}js/twidenash/jquery-twidenash.js"></script>
<script type="text/javascript">
//<![CDATA[
$(function(){
+ $('.twidenash').twidenash();
$('#venue-map').showLocations({markers_url:'{% url global-event-locations global_event_id=global_event_object.id %}',
marker_icon: '{{ MEDIA_URL }}/img/marker.png'});
});
=== modified file 'loco_directory/templates/events/global_event_detail.inc.html'
--- loco_directory/templates/events/global_event_detail.inc.html 2011-02-17 20:05:03 +0000
+++ loco_directory/templates/events/global_event_detail.inc.html 2011-03-20 15:23:28 +0000
@@ -100,7 +100,7 @@
{% if global_event_object.microbloghashtag %}
<article class="minor-content alone">
<h2>{% trans "Microblogging" %} #{{global_event_object.microbloghashtag}}</h2>
- <p><script src="{{MEDIA_URL}}js/twidenash.js?{{global_event_object.microbloghashtag}}"></script></p>
+ <div class="twidenash" id="{{ global_event_object.microbloghashtag }}"></div>
</article>
{% endif %}
=== modified file 'loco_directory/templates/index.html'
--- loco_directory/templates/index.html 2011-02-18 03:16:32 +0000
+++ loco_directory/templates/index.html 2011-03-20 15:23:28 +0000
@@ -9,6 +9,14 @@
{% block extrahead %}{{block.super}}
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" />
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/continents.css" />
+ <script type="text/javascript" src="{{MEDIA_URL}}js/twidenash/jquery-twidenash.js"></script>
+ <script type="text/javascript">
+ //<![CDATA[
+ $(function() {
+ $('.twidenash').twidenash();
+ });
+ //]]>
+ </script>
{% endblock %}
{% block content %}
@@ -79,7 +87,7 @@
<article class="minor-content alone">
<h2>{% trans "Microblogging" %} #locoteams</h2>
- <p><script src="{{MEDIA_URL}}js/twidenash.js?locoteams"></script></p>
+ <div class="twidenash" id="locoteams"></div>
</article>
{% endblock %}
=== added file 'loco_directory/templates/teams/my_teams.html'
--- loco_directory/templates/teams/my_teams.html 1970-01-01 00:00:00 +0000
+++ loco_directory/templates/teams/my_teams.html 2011-03-20 15:23:28 +0000
@@ -0,0 +1,103 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block title %}{% trans "My Teams" %} | {% trans "Ubuntu LoCo Team Directory" %} {% endblock %}
+
+{% block extrahead %}{{ block.super }}
+ <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" />
+ <script type="text/javascript" src="{{MEDIA_URL}}jquery/jquery.js"></script>
+ <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.lightbox-0.5.min.js"></script>
+ <link rel="stylesheet" href="{{MEDIA_URL}}css/jquery.lightbox-0.5.css" type="text/css" media="screen" />
+ <script type="text/javascript" src="{{MEDIA_URL}}js/jquery-flickr.js"></script>
+ <script src="{{ MEDIA_URL }}js/twidenash/jquery-twidenash.js" type="text/javascript"></script>
+ <script type="text/javascript">
+ //<![CDATA[
+ $(function () {
+ $('.twidenash').twidenash({ amount: 3 });
+ {% for team in teams %}
+ $('#flickr-{{ team.lp_name }}').flickr({ key: "{{ flickr_api_key }}", id: "{{ team.flickr_id }}", amount: 10 });
+ {% endfor %}
+ });
+ //]]>
+ </script>
+ {# <!-- TODO: this shpuld be rss of events AND meetings --> #}
+ {% for team in teams %}
+ <link type="application/rss+xml" rel="alternate" title="{% trans "Team Events (RSS)" %}" href="{% url team-events-rss team_slug=team.lp_name %}" />
+ {% endfor %}
+{% endblock %}
+
+
+{% block sub_nav_links %}
+ <a class="sub-nav-item" href="{% url my-teams %}" title="{% trans 'My Teams' %}">{% trans "My Teams" %}</a>
+ <a class="sub-nav-item" href="{% url team-list %}" title="{% trans 'All Teams' %}">{% trans "All Teams" %}</a>
+ {% comment %}
+ <!-- TODO: Need to create those pages -->
+ <a class="sub-nav-item" href="" title="{% trans 'Join a Team' %}">{% trans "Join a Team" %}</a>
+ <a class="sub-nav-item" href="" title="{% trans 'Create a Team' %}">{% trans "Create a Team" %}</a>
+ {% endcomment %}
+{% endblock %}
+
+{% block content %}
+ {% for team in teams %}
+ <article class="main-content">
+ <h2 class="dynamic-width">
+ <a href="{% url team-detail team_slug=team.lp_name %}" class="team-title" title="{{ team.name }}">{{ team.name }}</a>
+ {% comment %}
+ <a href="{% url team-calendar team_slug=team.lp_name %}" title="{% trans "Team Calendar (ICAL)" %}"><img class="bottom" src="{{ MEDIA_URL }}img/ical.png" /></a>
+ {# <!-- TODO: this shpuld be rss of events AND meetings --> #}
+ {# <!-- TODO: Change icon to RSS icon --> #}
+ <a href="{% url team-events-rss team_slug=team.lp_name %}" title="{% trans "Team Feed (RSS)" %}"><img class="bottom" src="{{ MEDIA_URL }}img/rss.png" /></a>
+ {% endcomment %}
+ </h2>
+ <aside class="resources">
+ <span>{% trans "Resources: " %}</span>
+ {% if team.web_url %}<a href="{{ team.web_url }}">{% trans "Website" %}</a>{% endif %}
+ {% if team.wiki_url %}<a href="{{ team.wiki_url }}">{% trans "Wiki" %}</a>{% endif %}
+ {% if team.forum_url %}<a href="{{ team.forum_url }}">{% trans "Forums" %}</a>{% endif %}
+ {% if team.ml_url %}<a href="{{ team.ml_url }}">{% trans "Mailing List" %}</a>{% endif %}
+ {# <!-- There should be a separate chat page which supports joining channel by url-tag --> #}
+ {% if team.irc_chan %}<a href="/chat">{% trans "IRC Channel" %}</a>{% endif %}
+ </aside>
+ <hr class="no-top" />
+ <section class="main-content-split left">
+ <section class="meeting-summary">
+ <a href="{% url team-meeting-list team_slug=team.lp_name %}" class="title">{% trans "Meetings" %}</a>
+ <a href="{% url team-meeting-new team_slug=team.lp_name %}" class="new">{% trans "+ new meeting" %}</a>
+ <hr class="no-top" />
+ <ul class="indent">
+ {% if team.teammeeting_set.next_3_meetings %}
+ {% for team_event in team.teammeeting_set.next_3_meetings %}
+ {% include 'meetings/team_meeting_li.inc.html' %}
+ {% endfor %}
+ {% else %}
+ <li>{% trans "There are no schedules meetings for this team" %}</li>
+ {% endif %}
+ </ul>
+ </section>
+ <section class="event-summary">
+ <a href="{% url team-event-list team_slug=team.lp_name %}" class="title">{% trans "Events" %}</a>
+ <a href="{% url team-event-new team_slug=team.lp_name %}" class="new">{% trans "+ new event" %}</a>
+ <hr class="no-top" />
+ <ul class="indent">
+ {% if team.teamevent_set.next_3_events %}
+ {% for team_event in team.teamevent_set.next_3_events %}
+ {% include 'events/team_event_li.inc.html' %}
+ {% endfor %}
+ {% else %}
+ <li>{% trans "There are no schedules events for this team" %}</li>
+ {% endif %}
+ </ul>
+ </section>
+ </section>
+ <section class="main-content-split right">
+ {% if team.microbloghashtag %}
+ <div class="twidenash" id="{{ team.microbloghashtag }}"></div>
+ {% else %}
+ {% if team.flickr_id %} {# or team.picasa_id or team.pixie_id %}#}
+ <div class="flickr" id="flickr-{{ team.lp_name }}"></div>
+ {% endif %}
+ {% endif %}
+ </section>
+ </article>
+ {% endfor %}
+{% endblock %}
=== modified file 'loco_directory/templates/teams/team_detail.html'
--- loco_directory/templates/teams/team_detail.html 2011-03-02 22:34:34 +0000
+++ loco_directory/templates/teams/team_detail.html 2011-03-20 15:23:28 +0000
@@ -14,18 +14,23 @@
{% block extrahead %}{{ block.super }}
-<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" />
{% if team.flickr_id or team.picasa_id or team.pixie_id %}
<script type="text/javascript" src="{{MEDIA_URL}}jquery/jquery.js"></script>
<script type="text/javascript" src="{{MEDIA_URL}}js/jquery.lightbox-0.5.min.js"></script>
<link rel="stylesheet" href="{{MEDIA_URL}}css/jquery.lightbox-0.5.css" type="text/css" media="screen" />
<script type="text/javascript" src="{{MEDIA_URL}}js/jquery-flickr.js"></script>
+{% endif %}
+
+<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" />
+<script type="text/javascript" src="{{MEDIA_URL}}js/twidenash/jquery-twidenash.js"></script>
<script type="text/javascript">
$(function() {
var perPage = '16';
-{% endif %}
+ $('.twidenash').twidenash();
+
+
{% if team.flickr_id %}
- $('#flickr').flickr({ key: "{{ flickr_api_key }}", id: "{{ team.flickr_id }}", amount: perPage });
+ $('#flickr').flickr({ key: "{{ flickr_api_key }}", id: "{{ team.flickr_id }}", amount: 6 });
{% endif %}
{% if team.picasa_id %}
var picasa_userId = '{{ team.picasa_id }}';
@@ -65,10 +70,10 @@
$("a.lightbox").lightBox();
});
{% endif %}
-{% if team.flickr_id or team.picasa_id or team.pixie_id %}
});
</script>
+{% if team.flickr_id or team.picasa_id or team.pixie_id %}
<style type="text/css">
div#flickr a.lightbox img {
border: 5px solid #b3aaa4;
@@ -208,7 +213,7 @@
{% if team.microbloghashtag %}
<article class="minor-content alone">
<h2>{% trans "Microblogging" %} #{{team.microbloghashtag}}</h2>
- <p><script src="{{MEDIA_URL}}js/twidenash.js?{{team.microbloghashtag}}"></script></p>
+ <div class="twidenash" id="{{ team.microbloghashtag }}"></div>
</article>
{% 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