Commit c3fc67c7e1ed1ef7e1513ff5df2aae91e0d08ce4
Exists in
master
and in
2 other branches
Showing
6 changed files
with
117 additions
and
0 deletions
Show diff stats
cookbooks/colab/templates/gitlab.py.erb
cookbooks/colab/templates/mezuro.py.erb
src/colab-spb-plugin/src/colab_spb/templatetags/spb_extra.py
... | ... | @@ -16,3 +16,17 @@ def get_community(mailinglist): |
16 | 16 | community = "software" |
17 | 17 | |
18 | 18 | return community |
19 | + | |
20 | +@register.simple_tag | |
21 | +def get_software_community(gitlab_group): | |
22 | + group = gitlab_group | |
23 | + community = "" | |
24 | + | |
25 | + try: | |
26 | + community_association = CommunityAssociations.objects.get(group=group) | |
27 | + community = community_association.community.identifier | |
28 | + except CommunityAssociations.DoesNotExist: | |
29 | + community = "" | |
30 | + | |
31 | + return community | |
32 | + | ... | ... |
src/colab-spb-plugin/tests/plugins.d/gitlab.py
src/colab-spb-theme-plugin/colab_spb_theme/static/css/header-slim.css
0 → 100644
... | ... | @@ -0,0 +1,38 @@ |
1 | +header div#header { | |
2 | + height: 70px; | |
3 | +} | |
4 | + | |
5 | +header ul#login-menu { | |
6 | + margin: 10px 0; | |
7 | +} | |
8 | + | |
9 | +header div#back-to-software { | |
10 | + clear: both; | |
11 | + width: 56px; | |
12 | + height: 40px; | |
13 | + border-right: 2px solid #CACACA; | |
14 | + padding-right: 20px; | |
15 | + padding-left: 10px; | |
16 | + padding-top: 8px; | |
17 | +} | |
18 | +header div#back-to-software span#back-arrow { | |
19 | + font-size: 35px; | |
20 | + color: #2C65CD; | |
21 | + cursor: pointer; | |
22 | +} | |
23 | + | |
24 | +header #logo { | |
25 | + height: 0px; | |
26 | +} | |
27 | + | |
28 | +header div#logo-holder { | |
29 | + margin-left: 10px; | |
30 | +} | |
31 | + | |
32 | +header span#portal-title-1 { | |
33 | + font-size: 13px; | |
34 | +} | |
35 | + | |
36 | +header h1#portal-title { | |
37 | + font-size: 24px; | |
38 | +} | ... | ... |
src/colab-spb-theme-plugin/colab_spb_theme/templates/header-slim.html
0 → 100644
... | ... | @@ -0,0 +1,59 @@ |
1 | +{% load i18n gravatar plugins spb_extra %} | |
2 | +{% load static from staticfiles %} | |
3 | + | |
4 | +{% block head_css %} | |
5 | + <link rel="stylesheet" href="{% static 'css/header-slim.css' %}"> | |
6 | +{% endblock %} | |
7 | + | |
8 | +<header> | |
9 | + <div class="colab-style"> | |
10 | + <div id="barra-brasil"> | |
11 | + <a href="http://brasil.gov.br" style="background:#7F7F7F; height: 20px; padding:4px 0 4px 10px; display: block; font-family:sans,sans-serif; text-decoration:none; color:white; ">Software Público Brasileiro</a> | |
12 | + </div> | |
13 | + <script src="//barra.brasil.gov.br/barra.js" type="text/javascript" defer async></script> | |
14 | + <div id="header" role="banner"> | |
15 | + <div id="logo"> | |
16 | + <div id="back-to-software" class="pull-left"> | |
17 | + <span id="back-arrow"><a href="{{request.META.HTTP_REFERER}}">←</a></span> | |
18 | + </div> | |
19 | + <div id="logo-holder" class="pull-left"> | |
20 | + <a id="portal-logo" title="" href="/"> | |
21 | + <span id="portal-title-1">Portal do</span> | |
22 | + <h1 id="portal-title" class="corto">Software Público Brasileiro</h1> | |
23 | + </a> | |
24 | + </div> | |
25 | + </div> | |
26 | + <div id="spb-header-content"> | |
27 | + <ul id="login-menu"> | |
28 | + {% if not user.is_authenticated %} | |
29 | + <li class="login-item"><a href="{% url 'signup' %}">Cadastre-se</a></li> | |
30 | + <li class="login-item last-item"><a href="{% url 'login' %}">Entrar</a></li> | |
31 | + {% else %} | |
32 | + <li id="user-menu" class="dropdown softwarepublico-item"> | |
33 | + <a href="#" class="dropdown-toggle user" data-toggle="dropdown">{% gravatar user.email %} <b class="caret"></b> </a> | |
34 | + <ul id="login-menu-box" class="dropdown-menu" role="menu"> | |
35 | + <li class="last-item"> | |
36 | + <div class="wrapper"> | |
37 | + <div class="thumbnail">{% gravatar user.email %}</div> | |
38 | + <div class="user-info"> | |
39 | + <span><b>{{ user.get_full_name }}</b></span> | |
40 | + <span class="quiet">{{ user.email }}</span> | |
41 | + </div> | |
42 | + <div> | |
43 | + <a class="btn btn-default btn-spb-profile pull-left" href="{% url 'user_profile' user.username %}">Meu perfil</a> | |
44 | + <a class="btn btn-default pull-right" href="{% url 'logout' %}">Sair</a> | |
45 | + </div> | |
46 | + </div> | |
47 | + </li> | |
48 | + </ul> | |
49 | + </li> | |
50 | + {% endif %} | |
51 | + </ul> | |
52 | + </div> | |
53 | + </div> | |
54 | + </div> | |
55 | +</header> | |
56 | + | |
57 | +{% block main_content %} | |
58 | +<a name="acontent" id="acontent"></a> | |
59 | +{% endblock %} | ... | ... |