Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13819 from mauriciofauth/display-results
Use templates for some of Display/Results methods
- Loading branch information
Showing
11 changed files
with
346 additions
and
319 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,14 @@ | ||
<input type="hidden" name="sql_query" value="{{ sql_query|raw }}" /> | ||
<input type="hidden" name="goto" value="{{ goto }}" /> | ||
{# Do not change the position when changing the number of rows #} | ||
<input type="hidden" name="pos" size="3" value="{{ pos }}" /> | ||
<input type="hidden" name="is_browse_distinct" value="{{ is_browse_distinct }}" /> | ||
{% trans 'Number of rows:' %} | ||
{{ Util_getDropdown( | ||
'session_max_rows', | ||
number_of_rows_choices, | ||
max_rows, | ||
'', | ||
'autosubmit', | ||
number_of_rows_placeholder | ||
) }} |
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,10 @@ | ||
{% if comments_map[fields_meta.table] is defined | ||
and comments_map[fields_meta.table][fields_meta.name] is defined %} | ||
<span class="tblcomment" title="{{ comments_map[fields_meta.table][fields_meta.name] }}"> | ||
{% if comments_map[fields_meta.table][fields_meta.name]|length > limit_chars %} | ||
{{ comments_map[fields_meta.table][fields_meta.name]|slice(0, limit_chars) }}… | ||
{% else %} | ||
{{ comments_map[fields_meta.table][fields_meta.name] }} | ||
{% endif %} | ||
</span> | ||
{% 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 @@ | ||
<td {{ align }} class="{{ classes }}"></td> |
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,12 @@ | ||
{% if delete_link == delete_row or delete_link == kill_process %} | ||
<form method="post" | ||
action="tbl_row_action.php" | ||
name="resultsForm" | ||
id="resultsForm_{{ unique_id }}" | ||
class="ajax"> | ||
{{ Url_getHiddenInputs(db, table, 1) }} | ||
<input type="hidden" name="goto" value="sql.php" /> | ||
{% endif %} | ||
|
||
<div class="responsivetable"> | ||
<table class="table_results data ajax" data-uniqueId="{{ unique_id }}"> |
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,7 @@ | ||
<td {{ align }} | ||
data-decimals="{{ meta.decimals is defined ? meta.decimals : '-1' }}" | ||
data-type="{{ meta.type }}" | ||
{# The null class is needed for grid editing #} | ||
class="{{ classes }} null"> | ||
<em>NULL</em> | ||
</td> |
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,99 @@ | ||
<form method="post" action="sql.php" name="displayOptionsForm" class="ajax print_ignore"> | ||
{{ Url_getHiddenInputs({ | ||
'db': db, | ||
'table': table, | ||
'sql_query': sql_query, | ||
'goto': goto, | ||
'display_options_form': 1 | ||
}) }} | ||
|
||
{{ Util_getDivForSliderEffect('', 'Options'|trans) }} | ||
<fieldset> | ||
<div class="formelement"> | ||
{# pftext means "partial or full texts" (done to reduce line lengths #} | ||
{{ Util_getRadioFields( | ||
'pftext', | ||
{ | ||
'P': 'Partial texts'|trans, | ||
'F': 'Full texts'|trans | ||
}, | ||
pftext, | ||
true, | ||
true, | ||
'', | ||
'pftext_' ~ unique_id | ||
) }} | ||
</div> | ||
|
||
{% if relwork and displaywork %} | ||
<div class="formelement"> | ||
{{ Util_getRadioFields( | ||
'relational_display', | ||
{ | ||
'K': 'Relational key'|trans, | ||
'D': 'Display column for relationships'|trans | ||
}, | ||
relational_display, | ||
true, | ||
true, | ||
'', | ||
'relational_display_' ~ unique_id | ||
) }} | ||
</div> | ||
{% endif %} | ||
|
||
<div class="formelement"> | ||
{% include 'checkbox.twig' with { | ||
'html_field_name': 'display_binary', | ||
'label': 'Show binary contents'|trans, | ||
'checked': display_binary is not empty, | ||
'onclick': false, | ||
'html_field_id': 'display_binary_' ~ unique_id | ||
} only %} | ||
{% include 'checkbox.twig' with { | ||
'html_field_name': 'display_blob', | ||
'label': 'Show BLOB contents'|trans, | ||
'checked': display_blob is not empty, | ||
'onclick': false, | ||
'html_field_id': 'display_blob_' ~ unique_id | ||
} only %} | ||
</div> | ||
|
||
{# I would have preferred to name this "display_transformation". | ||
This is the only way I found to be able to keep this setting sticky | ||
per SQL query, and at the same time have a default that displays | ||
the transformations. #} | ||
<div class="formelement"> | ||
{% include 'checkbox.twig' with { | ||
'html_field_name': 'hide_transformation', | ||
'label': 'Hide browser transformation'|trans, | ||
'checked': hide_transformation is not empty, | ||
'onclick': false, | ||
'html_field_id': 'hide_transformation_' ~ unique_id | ||
} only %} | ||
</div> | ||
|
||
<div class="formelement"> | ||
{{ Util_getRadioFields( | ||
'geoOption', | ||
{ | ||
'GEOM': 'Geometry'|trans, | ||
'WKT': 'Well Known Text'|trans, | ||
'WKB': 'Well Known Binary'|trans | ||
}, | ||
geo_option, | ||
true, | ||
true, | ||
'', | ||
'geoOption_' ~ unique_id | ||
) }} | ||
</div> | ||
|
||
<div class="clearfloat"></div> | ||
</fieldset> | ||
|
||
<fieldset class="tblFooters"> | ||
<input type="submit" value="{% trans 'Go' %}" /> | ||
</fieldset> | ||
</div>{# slider effect div #} | ||
</form> |
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,13 @@ | ||
<td> | ||
<form action="sql.php" method="post"> | ||
{{ Url_getHiddenInputs(db, table) }} | ||
<input type="hidden" name="sql_query" value="{{ html_sql_query|raw }}" /> | ||
<input type="hidden" name="pos" value="0" /> | ||
<input type="hidden" name="is_browse_distinct" value="{{ is_browse_distinct }}" /> | ||
<input type="hidden" name="session_max_rows" value="{{ not showing_all ? 'all' : max_rows }}" /> | ||
<input type="hidden" name="goto" value="{{ goto }}" /> | ||
<input type="checkbox" name="navig" id="showAll_{{ unique_id }}" class="showAllRows" | ||
{{- showing_all ? ' checked="checked"' }} value="all" /> | ||
<label for="showAll_{{ unique_id }}">{% trans 'Show all' %}</label> | ||
</form> | ||
</td> |
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,12 @@ | ||
<td> | ||
<form action="sql.php" method="post"{{ onsubmit|raw }}> | ||
{{ Url_getHiddenInputs(db, table) }} | ||
<input type="hidden" name="sql_query" value="{{ sql_query|raw }}" /> | ||
<input type="hidden" name="pos" value="{{ pos }}" /> | ||
<input type="hidden" name="is_browse_distinct" value="{{ is_browse_distinct }}" /> | ||
<input type="hidden" name="goto" value="{{ goto }}" /> | ||
{{ input_for_real_end|raw }} | ||
<input type="submit" name="navig" class="ajax" value="{{ caption_output|raw }}" title="{{ title }}" | ||
{{- onclick|raw }} /> | ||
</form> | ||
</td> |
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,3 @@ | ||
<td class="left {{ class }}{{ condition_field ? ' condition' }}"> | ||
{{ value|raw }} | ||
</td> |
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