Commit f4022fdd42f082ebb012131cad2c0b654888913f

Authored by Carlos Coêlho
1 parent d261998c

Added div colab-content to user detail

Signed-off-by: Carlos Oliveira <carlospecter@gmail.com>
src/colab-spb-theme-plugin/colab_spb_theme/templates/accounts/user_detail.html
@@ -13,152 +13,152 @@ @@ -13,152 +13,152 @@
13 {% endblock %} 13 {% endblock %}
14 14
15 {% block main-content %} 15 {% block main-content %}
  16 + <div class="colab-content container">
  17 + <div id="user-profile" class="row">
  18 + <div class="colab-vcard col-lg-4 col-md-4 col-sm-5">
  19 + <div class="thumbnail">
  20 + {% gravatar user_.email 200 %}
  21 + </div>
16 22
17 - <div id="user-profile" class="row">  
18 - <div class="colab-vcard col-lg-4 col-md-4 col-sm-5">  
19 - <div class="thumbnail">  
20 - {% gravatar user_.email 200 %}  
21 - </div> 23 + <h1>
  24 + <span>{{ user_.get_full_name }}</span>
  25 + <em>{{ user_.username }}</em>
  26 + </h1>
22 27
23 - <h1>  
24 - <span>{{ user_.get_full_name }}</span>  
25 - <em>{{ user_.username }}</em>  
26 - </h1> 28 + {% if request.user == user_ or request.user.is_superuser %}
  29 + <a class="btn btn-info" href="{% url 'user_profile_update' user_ %}"><span class="glyphicon glyphicon-pencil"></span>&nbsp;&nbsp;{% trans "edit profile"|title %}</a>
  30 + <a class="btn btn-info" href="{% url 'user_list_subscriptions' user_ %}"><span class="glyphicon glyphicon-pencil"></span>&nbsp;&nbsp;Inscreva-se nas listas de discussão</a>
  31 + {% endif %}
27 32
28 - {% if request.user == user_ or request.user.is_superuser %}  
29 - <a class="btn btn-info" href="{% url 'user_profile_update' user_ %}"><span class="glyphicon glyphicon-pencil"></span>&nbsp;&nbsp;{% trans "edit profile"|title %}</a>  
30 - <a class="btn btn-info" href="{% url 'user_list_subscriptions' user_ %}"><span class="glyphicon glyphicon-pencil"></span>&nbsp;&nbsp;Inscreva-se nas listas de discussão</a>  
31 - {% endif %} 33 + {% if request.user.is_active %}
  34 + {% if user_.bio %}
  35 + <div class="divider"></div>
  36 + <ul class="unstyled-list">
  37 + <li>
  38 + <strong>{% trans 'Bio' %}</strong>
  39 + </li>
  40 + <li class="text-muted"> {{ user_.bio }}</li>
  41 + </ul>
  42 + {% endif %}
  43 + {% endif %}
32 44
33 - {% if request.user.is_active %}  
34 - {% if user_.bio %}  
35 - <div class="divider"></div> 45 + <div class="divider"></div>
  46 + {% if request.user.is_active %}
36 <ul class="unstyled-list"> 47 <ul class="unstyled-list">
37 - <li>  
38 - <strong>{% trans 'Bio' %}</strong>  
39 - </li>  
40 - <li class="text-muted"> {{ user_.bio }}</li> 48 + <li><span class="icon-envelope icon-fixed-width"></span> <a href="mailto:{{ user_.email }}">{{ user_.email }}</a></li>
41 </ul> 49 </ul>
  50 + <div class="divider"></div>
42 {% endif %} 51 {% endif %}
43 - {% endif %}  
44 52
45 - <div class="divider"></div>  
46 - {% if request.user.is_active %}  
47 <ul class="unstyled-list"> 53 <ul class="unstyled-list">
48 - <li><span class="icon-envelope icon-fixed-width"></span> <a href="mailto:{{ user_.email }}">{{ user_.email }}</a></li>  
49 - </ul>  
50 - <div class="divider"></div>  
51 - {% endif %}  
52 -  
53 - <ul class="unstyled-list">  
54 - {% if user_.institution or user_.role %}  
55 - <li>  
56 - <span class="icon-briefcase icon-fixed-width"></span>  
57 - {{ user_.role }}  
58 - {% if user_.institution and user_.role %}-{% endif %}  
59 - {{ user_.institution }}  
60 - </li>  
61 - {% endif %}  
62 - {% if request.user.is_active %}  
63 - {% if SOCIAL_NETWORK_ENABLED %} 54 + {% if user_.institution or user_.role %}
64 <li> 55 <li>
65 - {% if user_.twitter %}  
66 - <span class="icon-twitter icon-fixed-width" title="{% trans 'Twitter account' %}"></span> <a target="_blank" href="{{ user_.twitter_link }}" title="{% trans 'Twitter account' %}">{{ user_.twitter }}</a>  
67 - {% endif %}  
68 - {% if user_.facebook %}  
69 - <span class="icon-facebook icon-fixed-width" title="{% trans 'Facebook account' %}"></span> <a target="_blank" href="{{ user_.facebook_link }}" title="{% trans 'Facebook account' %}">{{ user_.facebook }}</a>  
70 - {% endif %} 56 + <span class="icon-briefcase icon-fixed-width"></span>
  57 + {{ user_.role }}
  58 + {% if user_.institution and user_.role %}-{% endif %}
  59 + {{ user_.institution }}
71 </li> 60 </li>
  61 + {% endif %}
  62 + {% if request.user.is_active %}
  63 + {% if SOCIAL_NETWORK_ENABLED %}
  64 + <li>
  65 + {% if user_.twitter %}
  66 + <span class="icon-twitter icon-fixed-width" title="{% trans 'Twitter account' %}"></span> <a target="_blank" href="{{ user_.twitter_link }}" title="{% trans 'Twitter account' %}">{{ user_.twitter }}</a>
  67 + {% endif %}
  68 + {% if user_.facebook %}
  69 + <span class="icon-facebook icon-fixed-width" title="{% trans 'Facebook account' %}"></span> <a target="_blank" href="{{ user_.facebook_link }}" title="{% trans 'Facebook account' %}">{{ user_.facebook }}</a>
  70 + {% endif %}
  71 + </li>
  72 +
  73 + {% if user_.google_talk %}
  74 + <li><span class="icon-google-plus icon-fixed-width" title="{% trans 'Google talk account' %}"></span> {{ user_.google_talk }}</li>
  75 + {% endif %}
72 76
73 - {% if user_.google_talk %}  
74 - <li><span class="icon-google-plus icon-fixed-width" title="{% trans 'Google talk account' %}"></span> {{ user_.google_talk }}</li>  
75 - {% endif %}  
76 -  
77 - {% if user_.github %}  
78 - <li><span class="icon-github icon-fixed-width" title="{% trans 'Github account' %}"></span> <a target="_blank" href="https://github.com/{{ user_.github }}">{{ user_.github }}</a></li>  
79 - {% endif %} 77 + {% if user_.github %}
  78 + <li><span class="icon-github icon-fixed-width" title="{% trans 'Github account' %}"></span> <a target="_blank" href="https://github.com/{{ user_.github }}">{{ user_.github }}</a></li>
  79 + {% endif %}
80 80
81 - {% if user_.webpage %}  
82 - <li><span class="icon-link icon-fixed-width" title="{% trans 'Personal webpage' %}"></span> <a target="_blank" href="{{ user_.webpage }}" title="{% trans 'Personal webpage' %}">{{ user_.webpage }}</a></li> 81 + {% if user_.webpage %}
  82 + <li><span class="icon-link icon-fixed-width" title="{% trans 'Personal webpage' %}"></span> <a target="_blank" href="{{ user_.webpage }}" title="{% trans 'Personal webpage' %}">{{ user_.webpage }}</a></li>
  83 + {% endif %}
83 {% endif %} 84 {% endif %}
84 {% endif %} 85 {% endif %}
  86 + </ul>
  87 + {% if user_.mailinglists %}
  88 + <b>Listas de discussão</b>
  89 + {% for list in user_.mailinglists %}
  90 + <a href="{% url 'haystack_search' %}?order=latest&amp;type=thread&amp;list={{ list }}"><span class="label label-primary">{{ list }}</span></a>
  91 + {% endfor %}
85 {% endif %} 92 {% endif %}
86 - </ul>  
87 - {% if user_.mailinglists %}  
88 - <b>Listas de discussão</b>  
89 - {% for list in user_.mailinglists %}  
90 - <a href="{% url 'haystack_search' %}?order=latest&amp;type=thread&amp;list={{ list }}"><span class="label label-primary">{{ list }}</span></a>  
91 - {% endfor %}  
92 - {% endif %}  
93 93
94 - <div class="divider"></div> 94 + <div class="divider"></div>
95 95
96 - </div> 96 + </div>
97 97
98 - <div class="col-lg-4 col-md-4 col-sm-7">  
99 - <div class="panel panel-default">  
100 - <div class="panel-heading">  
101 - <h3 class="panel-title">{% trans "Collaborations by Type" %}</h3>  
102 - </div>  
103 - <div class="panel-body">  
104 - <div id="collabs"></div>  
105 - <div class="chart collabs">  
106 - <canvas width="200" height="200"></canvas>  
107 - <p></p> 98 + <div class="col-lg-4 col-md-4 col-sm-7">
  99 + <div class="panel panel-default">
  100 + <div class="panel-heading">
  101 + <h3 class="panel-title">{% trans "Collaborations by Type" %}</h3>
  102 + </div>
  103 + <div class="panel-body">
  104 + <div id="collabs"></div>
  105 + <div class="chart collabs">
  106 + <canvas width="200" height="200"></canvas>
  107 + <p></p>
  108 + </div>
108 </div> 109 </div>
109 </div> 110 </div>
110 </div> 111 </div>
111 - </div>  
112 112
113 113
114 - <div class="col-lg-4 col-md-4 col-sm-7">  
115 - <div class="panel panel-default">  
116 - <div class="panel-heading">  
117 - <h3 class="panel-title">Participação por lista de discussão</h3>  
118 - </div>  
119 - <div class="panel-body">  
120 - <div class="chart collabs2">  
121 - <canvas width="200" height="200"></canvas>  
122 - <p></p> 114 + <div class="col-lg-4 col-md-4 col-sm-7">
  115 + <div class="panel panel-default">
  116 + <div class="panel-heading">
  117 + <h3 class="panel-title">Participação por lista de discussão</h3>
  118 + </div>
  119 + <div class="panel-body">
  120 + <div class="chart collabs2">
  121 + <canvas width="200" height="200"></canvas>
  122 + <p></p>
  123 + </div>
123 </div> 124 </div>
124 </div> 125 </div>
125 </div> 126 </div>
126 - </div>  
127 127
128 - </div> <!-- End of user-profile row -->  
129 -  
130 - <div class="row">  
131 -  
132 - <div class="col-lg-6 col-md-6 col-sm-12">  
133 - <h3>{% trans "Latest posted" %} </h3>  
134 - <ul class="message-list">  
135 - {% for doc in emails %}  
136 - {% include "message-preview.html" with result=doc %}  
137 - {% empty %}  
138 - <li>{% trans "There are no posts by this user so far." %}</li>  
139 - {% endfor %}  
140 - </ul>  
141 - <a href="{% url 'haystack_search' %}?type=thread&amp;author={{ user_.username }}">  
142 - {% trans "View more posts..." %}  
143 - </a>  
144 - <div>&nbsp;</div>  
145 - </div> 128 + </div> <!-- End of user-profile row -->
146 129
147 - <div class="col-lg-6 col-md-6 col-sm-12">  
148 - <h3>{% trans "Latest contributions" %}</h3>  
149 - <ul class="message-list">  
150 - {% for result in results %}  
151 - {% include "message-preview.html" %}  
152 - {% empty %}  
153 - <li>{% trans "No contributions of this user so far." %}</li>  
154 - {% endfor %}  
155 - </ul>  
156 - <a href="{% url 'haystack_search' %}?order=latest&amp;collaborators={{ user_.username }}">  
157 - {% trans "View more contributions..." %}  
158 - </a>  
159 - <div>&nbsp;</div>  
160 - </div> 130 + <div class="row">
161 131
162 - </div> 132 + <div class="col-lg-6 col-md-6 col-sm-12">
  133 + <h3>{% trans "Latest posted" %} </h3>
  134 + <ul class="message-list">
  135 + {% for doc in emails %}
  136 + {% include "message-preview.html" with result=doc %}
  137 + {% empty %}
  138 + <li>{% trans "There are no posts by this user so far." %}</li>
  139 + {% endfor %}
  140 + </ul>
  141 + <a href="{% url 'haystack_search' %}?type=thread&amp;author={{ user_.username }}">
  142 + {% trans "View more posts..." %}
  143 + </a>
  144 + <div>&nbsp;</div>
  145 + </div>
163 146
  147 + <div class="col-lg-6 col-md-6 col-sm-12">
  148 + <h3>{% trans "Latest contributions" %}</h3>
  149 + <ul class="message-list">
  150 + {% for result in results %}
  151 + {% include "message-preview.html" %}
  152 + {% empty %}
  153 + <li>{% trans "No contributions of this user so far." %}</li>
  154 + {% endfor %}
  155 + </ul>
  156 + <a href="{% url 'haystack_search' %}?order=latest&amp;collaborators={{ user_.username }}">
  157 + {% trans "View more contributions..." %}
  158 + </a>
  159 + <div>&nbsp;</div>
  160 + </div>
  161 +
  162 + </div>
  163 + </div>
164 {% endblock %} 164 {% endblock %}