Self hosted FLOSS fitness/workout, nutrition and weight tracker
Remove the title and options block in react templates
Roland Geiderd34efed60421
diff --git a/wger/core/templates/base_wide.html b/wger/core/templates/base_wide.htmlindex 2cdc4c27a..55d23f8da 100644--- a/wger/core/templates/base_wide.html+++ b/wger/core/templates/base_wide.html@@ -5,30 +5,33 @@{% if trainer_identity %}<div class="alert alert-info" style="margin-top: 1em;">{% blocktranslate with current_user=user|format_username %}You are- browsing the site as the user "{{ current_user }}", all actions are performed on their data.+ browsing the site as the user "{{ current_user }}", all actions are performed on+ their data.{% endblocktranslate %}<a href="{% url 'core:user:trainer-login' trainer_identity %}" class="alert-link">- {% blocktranslate with target=user.userprofile.gym.name %}Back to "{{ target }}"{% endblocktranslate %}+ {% blocktranslate with target=user.userprofile.gym.name %}Back to "{{ target }}+ "{% endblocktranslate %}</a></div>{% endif %}+ {% if not hide_title_and_options %}+ <div class="row">+ <div class="col-sm-8">+ <h2 id="page-title" class="page-header">+ {% block title %}{% endblock %}+ </h2>+ </div>+ <div class="col-sm-4">+ <div class="btn-group">- <div class="row">- <div class="col-sm-8">- <h2 id="page-title" class="page-header">- {% block title %}{% endblock %}- </h2>- </div>- <div class="col-sm-4">- <div class="btn-group">-- {% block options %}- {% endblock %}+ {% block options %}+ {% endblock %}+ </div></div></div>- </div>+ {% endif %}diff --git a/wger/core/templates/template.html b/wger/core/templates/template.htmlindex 800920728..acfb3565c 100644--- a/wger/core/templates/template.html+++ b/wger/core/templates/template.html@@ -104,7 +104,7 @@{# Main content #}{# #}<div id="main">- <div class="container pt-4">+ <div class="container pt-2"><div class="modal fade" id="wger-ajax-info" tabindex="-1" role="dialog"><div class="modal-dialog modal-lg"><div class="modal-content">diff --git a/wger/core/views/react.py b/wger/core/views/react.pyindex ccd04f3f8..bfc334ec9 100644--- a/wger/core/views/react.py+++ b/wger/core/views/react.py@@ -29,6 +29,7 @@ class ReactView(TemplateView):def get_context_data(self, **kwargs):context = super().get_context_data(**kwargs)context['div_id'] = self.div_id+ context['hide_title_and_options'] = Truereturn contextdef dispatch(self, request, *args, **kwargs):