Adnane Belmadiaf has proposed merging lp:~adnane002/loco-directory/fix.628224
into lp:loco-directory.
Requested reviews:
loco-directory-dev (loco-directory-dev)
Related bugs:
#628224 Add photo feed to global events
https://bugs.launchpad.net/bugs/628224
--
https://code.launchpad.net/~adnane002/loco-directory/fix.628224/+merge/34358
Your team loco-directory-dev is requested to review the proposed merge of
lp:~adnane002/loco-directory/fix.628224 into lp:loco-directory.
=== modified file 'loco_directory/media/css/newstyle.css'
--- loco_directory/media/css/newstyle.css 2010-08-28 17:52:36 +0000
+++ loco_directory/media/css/newstyle.css 2010-09-01 22:10:57 +0000
@@ -178,3 +178,11 @@
-webkit-box-shadow: 0px 0px 1px #FFE4B6;
}
+/* Flickr Feed for Global Event*/
+
+.thumbs { margin: 0; padding: 0; overflow: hidden; }
+.thumbs li { list-style: none; float: left; margin: 5px; padding: 3px; background: #eee; -moz-box-shadow: 0 0 4px #444; -webkit-box-shadow: 0 0 2px #000; }
+.thumbs li a { }
+.thumbs li img { display: block; }
+.thumbs li a img { border: none;}
+
=== modified file 'loco_directory/templates/events/global_event_detail.inc.html'
--- loco_directory/templates/events/global_event_detail.inc.html 2010-08-23 13:17:10 +0000
+++ loco_directory/templates/events/global_event_detail.inc.html 2010-09-01 22:10:57 +0000
@@ -1,4 +1,46 @@
{% load i18n %}
+{% block extrahead %}
+{% if global_event_object.pictag %}
+<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.lightbox-0.5.min.js"></script>
+<script type="text/javascript">
+$(function() {
+ var apiKey = '{{ flickr_api_key }}';
+ var tag = '{{ global_event_object.pictag }}';
+ var perPage = '27';
+
+$.getJSON('http://api.flickr.com/services/rest/?format=json&method='+
+ 'flickr.photos.search&api_key=' + apiKey + '&tags=' + tag + '&per_page=' + perPage + '&jsoncallback=?',
+ function(data){
+ $.each(data.photos.photo, function(i, rPhoto){
+ var basePhotoURL = 'http://farm' + rPhoto.farm + '.static.flickr.com/'
+ + rPhoto.server + '/' + rPhoto.id + '_' + rPhoto.secret;
+
+ var thumbPhotoURL = basePhotoURL + '_s.jpg';
+ var mediumPhotoURL = basePhotoURL + '.jpg';
+
+ var photoStringStart = '<a class="lightbox" ';
+ var photoStringEnd = 'title="' + rPhoto.title + '" href="'+
+ mediumPhotoURL +'"><img src="' + thumbPhotoURL + '" alt="' +
+ rPhoto.title + '"/></a>;';
+ var photoString = photoStringStart + photoStringEnd
+
+ $(photoString).appendTo("#flickr");
+ });
+ $("a.lightbox").lightBox();
+ });
+});
+</script>
+<style type="text/css">
+div#flickr a.lightbox img {
+ border: 5px solid #b3aaa4;
+ margin-left: 5px;
+ margin-right: 5px;
+}
+</style>
+{% endif %}
+{% endblock %}
+
<article class="main-content">
<h2>{{global_event_object.name}}</h2>
{% if global_event_object.description %}
@@ -31,3 +73,10 @@
<p><script src="{{MEDIA_URL}}js/twidenash.js?{{global_event_object.microbloghashtag}}"></script></p>
</article>
{% endif %}
+
+{% if global_event_object.pictag %}
+<article class="minor-content alone" style="width:95%;">
+ <h2>Flickr Feed</a></h2>
+ <div id="flickr"></div>
+</article>
+{% endif %}
=== modified file 'loco_directory/templates/teams/team_detail.html'
--- loco_directory/templates/teams/team_detail.html 2010-09-01 15:50:09 +0000
+++ loco_directory/templates/teams/team_detail.html 2010-09-01 22:10:57 +0000
@@ -22,7 +22,7 @@
var apiKey = '{{ flickr_api_key }}';
var userId = '{{ team.flickr_id }}';
var tag = '';
- var perPage = '25';
+ var perPage = '27';
$.getJSON('http://api.flickr.com/services/rest/?format=json&method='+
'flickr.photos.search&api_key=' + apiKey + '&user_id=' + userId +
@@ -46,7 +46,7 @@
$("a.lightbox").lightBox();
});
});
-</script>
+</script>
<style type="text/css">
div#flickr a.lightbox img {
border: 5px solid #b3aaa4;
_______________________________________________
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