Commit 2e96e9f57b422088c97216cfc8d6bde9edcd35f2
Exists in
master
and in
1 other branch
Merge branch 'add_tab_link' into 'master'
Add tab link See merge request !261
Showing
1 changed file
with
7 additions
and
3 deletions
Show diff stats
src/colab-spb-theme-plugin/colab_spb_theme/templates/accounts/user_update_form.html
... | ... | @@ -23,7 +23,9 @@ |
23 | 23 | |
24 | 24 | {% block head_js %} |
25 | 25 | {% for widget in widgets_profile %} |
26 | + {% if widget.identifier in request.get_full_path %} | |
26 | 27 | {{widget.get_header}} |
28 | + {% endif %} | |
27 | 29 | {% endfor %} |
28 | 30 | <script> |
29 | 31 | jQuery(function() { |
... | ... | @@ -166,9 +168,9 @@ jQuery(function() { |
166 | 168 | |
167 | 169 | {% if widgets_profile %} |
168 | 170 | <ul id='navbar' class="nav nav-tabs"> |
169 | - <li id='colab_profile' class='active' role="presentation"><a href="#colab_profile" onclick="active('#colab_profile')">{% trans 'Colab Profile' %}</a></li> | |
171 | + <li id='colab_profile' class='active' role="presentation"><a href="{% url 'user_profile_update' user %}#colab_profile" >{% trans 'Colab Profile' %}</a></li> | |
170 | 172 | {% for widget in widgets_profile %} |
171 | - <li id='{{widget.identifier}}' role="presentation"><a href="#{{widget.identifier}}" onclick="active('#{{widget.identifier}}')">{{widget.name}}</a></li> | |
173 | + <li id='{{widget.identifier}}' role="presentation"><a href="{% url 'user_profile_update' user %}?target={{widget.identifier}}#{{widget.identifier}}" >{{widget.name}}</a></li> | |
172 | 174 | {% endfor %} |
173 | 175 | </ul> |
174 | 176 | {% endif %} |
... | ... | @@ -262,7 +264,9 @@ jQuery(function() { |
262 | 264 | |
263 | 265 | {% for widget in widgets_profile %} |
264 | 266 | <div id='{{widget.identifier}}-content' class='profile_item hidden'> |
265 | - {{widget.get_body}} | |
267 | + {% if widget.identifier in request.get_full_path %} | |
268 | + {{widget.get_body}} | |
269 | + {% endif %} | |
266 | 270 | </div> |
267 | 271 | {% endfor %} |
268 | 272 | </div> | ... | ... |