~wxl/loco-team-portal/more-details

« back to all changes in this revision

Viewing changes to loco_directory/templates/articles/article_detail.html

  • Committer: Adnane Belmadiaf
  • Date: 2012-12-13 22:48:12 UTC
  • mto: This revision was merged to the branch mainline in revision 580.
  • Revision ID: daker@ubuntu.com-20121213224812-mcr3skb0iawy3p9p
Added team flag for each blog post
Added the full post

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{% extends "base.html" %}
 
2
{% load i18n %}
 
3
 
 
4
{% block page_name %}{{ article.title }}{% endblock %}
 
5
 
 
6
{% block extrahead %}{{ block.super }}
 
7
<meta property="fb:app_id" content="127188230723188"/>
 
8
<meta property="og:title" content="{{ article.title }}" />
 
9
<meta property="og:description" content="{{ article.description|linebreaks|striptags }}" />
 
10
<meta property="og:url" content="http://loco.ubuntu.com{{ article.get_absolute_url }}"/>
 
11
<meta property="og:image" content="http://loco.ubuntu.com/media/images/cof_orange_hex1.png"/>
 
12
<meta property="og:site_name" content="Loco Team Portal"/>
 
13
<meta property="og:type" content="article"/>
 
14
{% endblock %}
 
15
 
 
16
 
 
17
{% block content %}
 
18
<div class="row">
 
19
    <section class="span-9">
 
20
                <article class="blog-entry">
 
21
                    {% if article.source.team %}
 
22
                        <img class="blog-entry-image" src="{{ article.source.team.mugshot_url }}" />
 
23
                    {% else %}
 
24
                        {% if article.source.user %}
 
25
                         <img class="blog-entry-image" src="{{ article.source.user.mugshot }}" />
 
26
                        {% endif %}
 
27
                    {% endif %}
 
28
                    <h4 class="blog-entry-title"><a href="{{ article.link }}" target="_blank">{{ article.title }}</a></h4>
 
29
                    <div class="blog-entry-author">
 
30
                        {% if article.source.team %}
 
31
                            <a class="team" href="{% url team-detail article.source.team %}" target="_blank">{{ article.source.team.name }}</a>
 
32
                        {% endif %}
 
33
                        {% if article.source.user %}
 
34
                            {% if article.source.team %}, {% endif %}
 
35
                            <a class="user" href="{% url profile-detail article.source.user.user.username %}" target="_blank">{{ article.source.user }}</a>
 
36
                        {% endif %}
 
37
                    </div>
 
38
                    <div class="share">
 
39
                        <div id="fb-root"></div>
 
40
                        <script>(function(d, s, id) {
 
41
                              var js, fjs = d.getElementsByTagName(s)[0];
 
42
                              if (d.getElementById(id)) {return;}
 
43
                              js = d.createElement(s); js.id = id;
 
44
                              js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=127188230723188";
 
45
                              fjs.parentNode.insertBefore(js, fjs);
 
46
                            }(document, 'script', 'facebook-jssdk'));</script>
 
47
                        <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
 
48
                        <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
 
49
                        <g:plusone size="medium"></g:plusone>
 
50
                        <a href="http://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a>
 
51
                        <div class="fb-like" data-href="http://loco.ubuntu.com{{ article.get_absolute_url }}" data-send="false" data-layout="button_count" data-width="40" data-show-faces="false" data-font="arial"></div>
 
52
                        </div>
 
53
                    <div class="blog-entry-text">
 
54
                        <p>
 
55
                            {% autoescape off %}
 
56
                                {{ article.content|safe }}
 
57
                            {% endautoescape %}
 
58
                        </p>
 
59
                        <p class="more">
 
60
                            <a href="{{ article.link }}" target="_blank">{% trans 'Read the original post' %} ›</a>
 
61
                        </p>
 
62
                    </div>
 
63
                </article>
 
64
    </section>
 
65
</div>
 
66
{% endblock %}