Skip to content
Permalink
Browse files

Merge template files

replaced include statements for the file content where the file
was used only for that statement

Signed-off-by: Leonardo Strozzi <laps15@inf.ufpr.br>
  • Loading branch information...
laps15 committed Jul 23, 2018
1 parent 685ccaf commit d3dfdbc6d19f19114b7f114c49ca82732677832e

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -8,11 +8,15 @@
{% for priv in table %}
{% set checked = row[priv[0] ~ '_priv'] is defined and row[priv[0] ~ '_priv'] == 'Y' ? ' checked="checked"' %}
{% set formatted_priv = ServerPrivileges_formatPrivilege(priv, true) %}
{% include 'server/privileges/global_priv_tbl_item.twig' with {
'checked': checked,
'formatted_priv': formatted_priv,
'priv': priv
} only %}
<div class="item">
<input type="checkbox" class="checkall" name="{{ priv[0] }}_priv" id="checkbox_{{ priv[0] }}_priv"
value="Y" title="{{ priv[2] }}" {{ checked }} />
<label for="checkbox_{{ priv[0] }}_priv">
<code>
{{ formatted_priv|raw }}
</code>
</label>
</div>
{% endfor %}
</fieldset>
{% endfor %}

This file was deleted.

Oops, something went wrong.
@@ -31,28 +31,70 @@
</tr>
{% else %}
{% for privilege in privileges %}
{% include 'server/privileges/privileges_summary_row.twig' with
privilege|merge({'type': type})
only %}
<tr>
<td>{{ privilege['name'] }}</td>
<td><code>{{ privilege['privileges']|raw }}</code></td>
<td>{{ privilege['grant'] ? 'Yes'|trans : 'No'|trans }}</td>

{% if type == 'database' %}
<td>{{ privilege['table_privs'] ? 'Yes'|trans : 'No'|trans }}</td>
{% elseif type == 'table' %}
<td>{{ privilege['column_privs'] ? 'Yes'|trans : 'No'|trans }}</td>
{% endif %}

<td>{{ privilege['edit_link']|raw }}</td>
<td>{{ privilege['revoke_link']|raw }}</td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>

{% if type == 'database' %}
{% include 'server/privileges/add_privileges_database.twig' with {
'databases': databases
} only %}
<label for="text_dbname">{% trans 'Add privileges on the following database(s):' %}</label>

{%- if databases is not empty %}
<select name="pred_dbname[]" multiple="multiple">
{% for database in databases %}
<option value="{{ Util_escapeMysqlWildcards(database) }}">
{{ database }}
</option>
{% endfor %}
</select>
{% endif -%}

<input type="text" id="text_dbname" name="dbname" />
{{ Util_showHint("Wildcards % and _ should be escaped with a \\ to use them literally."|trans) }}
{% elseif type == 'table' %}
{% include 'server/privileges/add_privileges_table.twig' with {
'database': database,
'tables': tables
} only %}
<input type="hidden" name="dbname" value="{{ database }}"/>

<label for="text_tablename">{% trans 'Add privileges on the following table:' %}</label>

{%- if tables is not empty %}
<select name="pred_tablename" class="autosubmit">
<option value="" selected="selected">{% trans 'Use text field' %}:</option>
{% for table in tables %}
<option value="{{ table }}">{{ table }}</option>
{% endfor %}
</select>
{% endif -%}

<input type="text" id="text_tablename" name="tablename" />
{% else %}
{% include 'server/privileges/add_privileges_routine.twig' with {
'database': database,
'routines': routines
} only %}
<input type="hidden" name="dbname" value="{{ database }}"/>

<label for="text_routinename">{% trans 'Add privileges on the following routine:' %}</label>

{%- if routines is not empty %}
<select name="pred_routinename" class="autosubmit">
<option value="" selected="selected">{% trans 'Use text field' %}:</option>
{% for routine in routines %}
<option value="{{ routine }}">{{ routine }}</option>
{% endfor %}
</select>
{% endif -%}

<input type="text" id="text_routinename" name="routinename" />
{% endif %}
</fieldset>

This file was deleted.

Oops, something went wrong.
@@ -5,9 +5,29 @@
{% if require_option['name'] is same as('ssl_cipher') %}
<div id="specified_div" style="padding-left:20px;">
{% endif %}
{% include 'server/privileges/require_options_item.twig' with {
'require_option': require_option
} only %}
<div class="item">
{% if require_option['radio'] %}
<input type="radio" name="ssl_type"
id="{{ require_option['name'] }}_{{ require_option['value'] }}"
title="{{ require_option['description'] }}"
value="{{ require_option['value'] }}" {{ require_option['checked']|raw -}}
/>
<label for="{{ require_option['name'] }}_{{ require_option['value'] }}">
<code>{{ require_option['label'] }}</code>
</label>
{% else %}
<label for="text_{{ require_option['name'] }}">
<code>{{ require_option['label'] }}</code>
</label>
<input type="text" name="{{ require_option['name'] }}"
id="text_{{ require_option['name'] }}" value="{{ require_option['value'] }}"
size="80" title="{{ require_option['description'] }}"
{%- if require_option['disabled'] %}
disabled
{%- endif -%}
/>
{% endif %}
</div>
{% endfor %}
</div>{# END specified_div #}
</div>{# END require_ssl_div #}

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -6,8 +6,16 @@
</small>
</p>
{% for limit in limits %}
{% include 'server/privileges/resource_limit_item.twig' with {
'limit': limit
} only %}
<div class="item">
<label for="text_{{ limit['input_name'] }}">
<code>
<dfn title="{{ limit['description'] }}">
{{ limit['name_main'] }}
</dfn>
</code>
</label>
<input type="number" name="{{ limit['input_name'] }}" id="text_{{ limit['input_name'] }}"
value="{{ limit['value'] }}" title="{{ limit['description'] }}" />
</div>
{% endfor %}
</fieldset>

0 comments on commit d3dfdbc

Please sign in to comment.
You can’t perform that action at this time.