-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move html from server/select to template
Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Factor out logic from server listing Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Create the base twig skeleton Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Insert template and variables to form part Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Insert list view template part Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Insert just options fork Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Factor out repeating code into server_options template Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Render the template Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Comment out test parts that don't work due to translate Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Fix the typos in the translatable elements Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Refactor the test into separate scenarios Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Remove indentation spaces Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Codesniffer cleanup Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Add test for fieldset existence Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Code style fixes Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Reorder lines in test Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Replace include function with tag Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com> Removing the escape calls Signed-off-by: Daniel Tiringer <tiringerdaniel@tutanota.com>
- Loading branch information
1 parent
d260e34
commit debb6af
Showing
4 changed files
with
134 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{% if not_only_options %} | ||
<form class="disableAjax" method="post" action="{{ form_action|raw }}"> | ||
{% if omit_fieldset == false %} | ||
<fieldset class="pma-fieldset"> | ||
{% endif %} | ||
{{ get_hidden_fields([]) }} | ||
<label for="select_server">{% trans 'Current server:' %}</label> | ||
<select id="select_server" class="autosubmit" name="server"> | ||
<option value="">({% trans 'Servers' %}) ...</option> | ||
{% include 'server/select/server_options.twig' with { | ||
'select': servers.select | ||
} only %} | ||
</select> | ||
{% if omit_fieldset == false %} | ||
</fieldset> | ||
{% endif %} | ||
</form> | ||
{% elseif servers.list %} | ||
{% trans 'Current server:' %}<br> | ||
<ul id="list_server"> | ||
<li> | ||
{% for server in servers.list %} | ||
{% if server.selected %} | ||
<strong>{{ server.label }}</strong> | ||
{% else %} | ||
<a class="disableAjax item" href="{{ server.href }}"> | ||
{{- server.label -}} | ||
</a> | ||
{% endif %} | ||
{% endfor %} | ||
</li> | ||
</ul> | ||
{% else %} | ||
{% include 'server/select/server_options.twig' with { | ||
'select': servers.select | ||
} only %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% for server in select %} | ||
<option | ||
value="{{ server.value }}" | ||
{% if server.selected %}selected="selected"{% endif %} | ||
> | ||
{{- server.label -}} | ||
</option> | ||
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters