Skip to content

Commit

Permalink
feature 3139: add details about search on id: in the help
Browse files Browse the repository at this point in the history
Move CSS outside the help file

bug fixed: fallback on en_UK in case of missing help file


git-svn-id: http://piwigo.org/svn/trunk@29485 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Sep 11, 2014
1 parent 0ffdff9 commit 8b4fa61
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 29 deletions.
13 changes: 9 additions & 4 deletions admin/popuphelp.php
Expand Up @@ -47,16 +47,21 @@
and preg_match('/^[a-z_]*$/', $_GET['page'])
)
{
$help_content =
load_language('help/'.$_GET['page'].'.html', '', array('return'=>true) );
$help_content = load_language(
'help/'.$_GET['page'].'.html',
'',
array(
'force_fallback' => 'en_UK',
'return' => true,
)
);

if ($help_content == false)
{
$help_content = '';
}

$help_content = trigger_change(
'get_popup_help_content', $help_content, $_GET['page']);
$help_content = trigger_change('get_popup_help_content', $help_content, $_GET['page']);
}
else
{
Expand Down
26 changes: 25 additions & 1 deletion admin/themes/default/theme.css
Expand Up @@ -1242,4 +1242,28 @@ a.group_perm {
}
.preview-box.icon-search:hover img {
opacity:0.5;
}
}

/* table in help/quick_search.html */
table.qsearch_help_table {
border-collapse:collapse;
text-align:left;
margin:1em;
}
table.qsearch_help_table q {
font-family: Courier, Fixed;
font-weight: bold;
}
table.qsearch_help_table q:before {
content: '\'';
color: green;
}
table.qsearch_help_table q:after {
content: '\'';
color: green;
}
table.qsearch_help_table td {
border: 1px solid #ccc;
padding:5px;
vertical-align:top;
}
4 changes: 4 additions & 0 deletions admin/themes/roma/theme.css
Expand Up @@ -353,3 +353,7 @@ table.dataTable thead th {

.userPropertiesContainer {border-color:#333;}
.userPrefs {border-color:#333;}

table.qsearch_help_table td {
border-color: #444;
}
36 changes: 12 additions & 24 deletions language/en_UK/help/quick_search.html
@@ -1,26 +1,8 @@
<h2>Search</h2>
<style>
q {
font-family: Courier, Fixed;
font-weight: bold;
}
q:before {
content: '\'';
color: green;
}
q:after {
content: '\'';
color: green;
}
TD {
border: 1px solid
}
</style>


<p>By default all searched terms must match. Searches are case-insesitive.</p>

<table style="border-collapse:collapse;text-align:left">

<p>By default all searched terms must match. Searches are case-insensitive.</p>

<table class="qsearch_help_table">
<tr>
<td>quoted phrase<br>
<q>"search"</q>
Expand Down Expand Up @@ -60,7 +42,7 @@ <h2>Search</h2>

<br>

<table style="border-collapse:collapse;text-align:left">
<table class="qsearch_help_table">

<tr>
<td><q>tag:</q><br>
Expand Down Expand Up @@ -142,5 +124,11 @@ <h2>Search</h2>
<td>Searches photos by file size<br>
<q>filesize:1m..10m</q> finds files between 1MB and 10MB.</td>
</tr>
<tr>
<td><q>id:</q>
</td>
<td>Searches photos by its numeric identifier in Piwigo<br>
<q>id:123..126</q> finds photo 123 to 126 (it may find between 0 and 4 photos, because photos can be deleted).</td>
</tr>

</table>
</table>

0 comments on commit 8b4fa61

Please sign in to comment.