Skip to content
Snippets Groups Projects
Commit 206ec217 authored by HeJ's avatar HeJ
Browse files

Merge branch 'develop' into 'production'

prod: backoffice fixes

See merge request hub/hub!639
parents 40eef761 9a2a2e68
Branches
Tags
No related merge requests found
...@@ -44,9 +44,6 @@ msgstr "Dieser Kurzname wird bereits von einem anderen Village benutzt." ...@@ -44,9 +44,6 @@ msgstr "Dieser Kurzname wird bereits von einem anderen Village benutzt."
msgid "Assembly__tags__splitwithcomma" msgid "Assembly__tags__splitwithcomma"
msgstr "Mehrere Tags bitte mit einem Komma trennen." msgstr "Mehrere Tags bitte mit einem Komma trennen."
msgid "Assembly__states_must_not_be_none"
msgstr "Village- oder Channel-Status (oder beide) muss gesetzt sein!"
msgid "AssemblyMember__needamanager" msgid "AssemblyMember__needamanager"
msgstr "Mindestens ein Mitglied muss das Village verwalten können!" msgstr "Mindestens ein Mitglied muss das Village verwalten können!"
...@@ -613,15 +610,24 @@ msgstr "Linter-Ergebnis von" ...@@ -613,15 +610,24 @@ msgstr "Linter-Ergebnis von"
msgid "assemblyedit_teamtoolbar_description" msgid "assemblyedit_teamtoolbar_description"
msgstr "Funktionen für die Village-Orga" msgstr "Funktionen für die Village-Orga"
msgid "assemblyedit_statebtn_accept"
msgstr "akzeptieren"
msgid "assemblyedit_statebtn_reject" msgid "assemblyedit_statebtn_reject"
msgstr "ablehnen" msgstr "ablehnen"
msgid "assemblyedit_statebtn_accept"
msgstr "akzeptieren"
msgid "assemblyedit_statebtn_rejected2registered" msgid "assemblyedit_statebtn_rejected2registered"
msgstr "doch in Erwägung ziehen" msgstr "doch in Erwägung ziehen"
msgid "assemblyedit_statebtn_placed"
msgstr "platziert"
msgid "assemblyedit_statebtn_arrived"
msgstr "angekommen (eigene Aussage)"
msgid "assemblyedit_statebtn_confirmed"
msgstr "angekommen (bestätigt)"
msgid "assemblyedit_statebtn_public2registered" msgid "assemblyedit_statebtn_public2registered"
msgstr "Veröffentlichung zurücknehmen" msgstr "Veröffentlichung zurücknehmen"
...@@ -1031,8 +1037,8 @@ msgstr "Das Village '{child_name}' ist bereits einem anderen Habitat zusortiert ...@@ -1031,8 +1037,8 @@ msgstr "Das Village '{child_name}' ist bereits einem anderen Habitat zusortiert
msgid "assemblyedit_changedstate" msgid "assemblyedit_changedstate"
msgstr "Status des Village wurde geändert." msgstr "Status des Village wurde geändert."
#, python-brace-format
# ignore # ignore
#, python-brace-format
msgid "Assembly__state-{new_value}" msgid "Assembly__state-{new_value}"
msgstr "" msgstr ""
......
...@@ -44,9 +44,6 @@ msgstr "This slug is already used by another village." ...@@ -44,9 +44,6 @@ msgstr "This slug is already used by another village."
msgid "Assembly__tags__splitwithcomma" msgid "Assembly__tags__splitwithcomma"
msgstr "Split multiple tags by comma." msgstr "Split multiple tags by comma."
msgid "Assembly__states_must_not_be_none"
msgstr "At least one of village state or channel state must be set!"
msgid "AssemblyMember__needamanager" msgid "AssemblyMember__needamanager"
msgstr "At least one member must be able to manage the village!" msgstr "At least one member must be able to manage the village!"
...@@ -612,15 +609,24 @@ msgstr "linter result" ...@@ -612,15 +609,24 @@ msgstr "linter result"
msgid "assemblyedit_teamtoolbar_description" msgid "assemblyedit_teamtoolbar_description"
msgstr "village team functionality" msgstr "village team functionality"
msgid "assemblyedit_statebtn_accept"
msgstr "accept"
msgid "assemblyedit_statebtn_reject" msgid "assemblyedit_statebtn_reject"
msgstr "reject" msgstr "reject"
msgid "assemblyedit_statebtn_accept"
msgstr "accept"
msgid "assemblyedit_statebtn_rejected2registered" msgid "assemblyedit_statebtn_rejected2registered"
msgstr "consider it" msgstr "consider it"
msgid "assemblyedit_statebtn_placed"
msgstr "placed"
msgid "assemblyedit_statebtn_arrived"
msgstr "arrived (self)"
msgid "assemblyedit_statebtn_confirmed"
msgstr "arrived (confirmed)"
msgid "assemblyedit_statebtn_public2registered" msgid "assemblyedit_statebtn_public2registered"
msgstr "depublish" msgstr "depublish"
...@@ -1030,8 +1036,8 @@ msgstr "The village '{child_name}' had been assigned to a different habitat alre ...@@ -1030,8 +1036,8 @@ msgstr "The village '{child_name}' had been assigned to a different habitat alre
msgid "assemblyedit_changedstate" msgid "assemblyedit_changedstate"
msgstr "Village's state has been updated." msgstr "Village's state has been updated."
#, python-brace-format
# ignore # ignore
#, python-brace-format
msgid "Assembly__state-{new_value}" msgid "Assembly__state-{new_value}"
msgstr "" msgstr ""
......
...@@ -35,6 +35,20 @@ ...@@ -35,6 +35,20 @@
</a> </a>
{% else %} {% else %}
{% if assembly.is_public %}
&nbsp;
<a class="btn btn-sm {% if assembly.state_assembly != 'placed' %}btn-secondary{% else %}disabled btn-outline-secondary{% endif %}" role="button" href="{% url 'backoffice:assembly-editstate' pk=assembly.id %}?state=placed">
{% trans "assemblyedit_statebtn_placed" %}
</a>
<a class="btn btn-sm {% if assembly.state_assembly != 'arrived' %}btn-info{% else %}disabled btn-outline-secondary{% endif %}" role="button" href="{% url 'backoffice:assembly-editstate' pk=assembly.id %}?state=arrived">
{% trans "assemblyedit_statebtn_arrived" %}
</a>
<a class="btn btn-sm {% if assembly.state_assembly != 'confirmed' %}btn-success{% else %}disabled btn-outline-secondary{% endif %}" role="button" href="{% url 'backoffice:assembly-editstate' pk=assembly.id %}?state=confirmed">
{% trans "assemblyedit_statebtn_confirmed" %}
</a>
{% endif %}
&nbsp;
<a class="btn btn-sm btn-secondary" role="button" href="{% url 'backoffice:assembly-editstate' pk=assembly.id %}?state=registered"> <a class="btn btn-sm btn-secondary" role="button" href="{% url 'backoffice:assembly-editstate' pk=assembly.id %}?state=registered">
{% trans "assemblyedit_statebtn_public2registered" %} {% trans "assemblyedit_statebtn_public2registered" %}
</a> </a>
...@@ -42,6 +56,7 @@ ...@@ -42,6 +56,7 @@
{% endif %} {% endif %}
{% if conference.support_assembly_physical %} {% if conference.support_assembly_physical %}
&nbsp;
<a role="button" class="btn btn-sm btn-{% if assembly.is_public %}primary{% else %}secondary{% endif %}" href="{% url 'backoffice:assembly-editposition' pk=assembly.id %}">Position</a> <a role="button" class="btn btn-sm btn-{% if assembly.is_public %}primary{% else %}secondary{% endif %}" href="{% url 'backoffice:assembly-editposition' pk=assembly.id %}">Position</a>
{% endif %} {% endif %}
</div> </div>
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for import in object.imports.all %} {% for import in imports %}
<tr class="{{ import.text_color_class }}"> <tr class="{{ import.text_color_class }}">
<td>{{ import.get_state_display }}</td> <td>{{ import.get_state_display }}</td>
<td title="{{ import.start }}">{{ import.start|naturaltime }}</td> <td title="{{ import.start }}">{{ import.start|naturaltime }}</td>
...@@ -56,6 +56,15 @@ ...@@ -56,6 +56,15 @@
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
{% if has_more_imports %}
<tfoot>
<tr>
<td colspan="5">
<div class="alert alert-warning">List limited to 10 entries.</div>
</td>
</tr>
</tfoot>
{% endif %}
</table> </table>
</div> </div>
</div> </div>
......
...@@ -434,7 +434,8 @@ class AssemblyEditStateView(AssemblyMixin, View): ...@@ -434,7 +434,8 @@ class AssemblyEditStateView(AssemblyMixin, View):
context = self.get_context_data() context = self.get_context_data()
context['new_value'] = new_value context['new_value'] = new_value
context['new_value_translated'] = _(f'Assembly__state-{new_value}') new_state_label = [l for k, l in Assembly.State.choices if k == new_value][0]
context['new_value_translated'] = new_state_label
return render(self.request, 'backoffice/assembly_editstate.html', context) return render(self.request, 'backoffice/assembly_editstate.html', context)
......
...@@ -44,6 +44,13 @@ class ScheduleSourcesDetailView(ScheduleAdminMixin, DetailView): ...@@ -44,6 +44,13 @@ class ScheduleSourcesDetailView(ScheduleAdminMixin, DetailView):
template_name = 'backoffice/schedule_source-detail.html' template_name = 'backoffice/schedule_source-detail.html'
model = ScheduleSource model = ScheduleSource
def get_context_data(self, *args, **kwargs):
ctx = super().get_context_data(*args, **kwargs)
ctx['imports'] = ctx['object'].imports.all()[:11]
ctx['has_more_imports'] = len(ctx['imports']) > 10
ctx['imports'] = ctx['imports'][:10]
return ctx
class ScheduleSourcesDoImportView(ScheduleAdminMixin, SingleObjectMixin, View): class ScheduleSourcesDoImportView(ScheduleAdminMixin, SingleObjectMixin, View):
model = ScheduleSource model = ScheduleSource
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment