Compare View
Commits (2)
-
Signed-off-by: Carlos Coêlho <carlospecter@gmail.com>
-
Signed-off-by: Carlos Coêlho <carlospecter@gmail.com>
Showing
2 changed files
Show diff stats
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-theme-plugin/colab_spb_theme/templates/header-slim.html
... | ... | @@ -15,9 +15,9 @@ |
15 | 15 | <div id="header" role="banner"> |
16 | 16 | <div id="logo"> |
17 | 17 | <div id="back-to-software" class="pull-left"> |
18 | - <span onclick="window.location = '/'" id="back-arrow">←</span> | |
18 | + <span onclick="window.location = '/social/{% get_software_community {{request.path}} %}'" id="back-arrow">←</span> | |
19 | 19 | </div> |
20 | - <div id="logo-holder" class="pull-left"> | |
20 | + <div id="logo-holder" class="pull-left"> | |
21 | 21 | <a id="portal-logo" title="" href="/"> |
22 | 22 | <span id="portal-title-1">Portal do</span> |
23 | 23 | <h1 id="portal-title" class="corto">Software Público Brasileiro</h1> | ... | ... |