Initial markup of recommended badges in playlist

This commit is contained in:
Paul Smith 2013-06-04 22:17:51 -04:00
Родитель 6601e024b0
Коммит 8720ca969a
2 изменённых файлов: 19 добавлений и 1 удалений

Просмотреть файл

@ -151,11 +151,12 @@ module.exports = function (app) {
app.get('/myplaylist', [
loggedIn,
openbadger.middleware('getAllBadges'),
openbadger.middleware('getUserRecommendations'),
playlistMiddleware
], function (req, res, next) {
res.render('user/myplaylist.html', {
user: res.locals.user,
recommended: [], // XXX: grouped by STEAM?
recommended: req.remote.recommendations, // XXX: grouped by STEAM?
playlist: req.playlist
});
});

Просмотреть файл

@ -20,4 +20,21 @@
{% endif %}
{% endblock %}
</div><!-- .playlist -->
<div class="recommendations">
<h3>Recommendations</h3>
<p class="lead">Check out these other badges you can earn in the STEAM
categories and add them to your playlist</p>
{% if recommended.length %}
<ul class="thumbnails">
{% for item in recommended %}
<li span="3">
{% include "includes/badge-thumbnail.html" %}
</li>
{% endfor %}
</ul>
{% else %}
<p>Nothing recommended yet …</p>
{% endif %}
</div>
{% endblock %}