Commit 688b9ef6 authored by Jyhem's avatar Jyhem

[REF] Clean templates formatting so they are legible and maintainable again

parent 5ade0a85
......@@ -13101,8 +13101,8 @@ $lang = array(
"You will remove" => "Eliminaràs",
"and its subpages from the structure, now you have two options:" => "i amb les seves subpàgines de l'estructura, ara tens dues opcions:",
"and its subpages from the structure" => "i les seves subpàgines de l'estructura",
"\n\t\t\tRemove only from structure" => "\n\t\t\tElimina només de l'estructura",
"\n\t\t\t\tRemove from structure and remove page too" => "\n\t\t\t\tElimina de l'estructura i elimina també les pàgines",
"Remove only from structure" => "Elimina només de l'estructura",
"Remove from structure and remove page too" => "Elimina de l'estructura i elimina també les pàgines",
"The page already exists. The page that has been added to the structure is the existing one." => "La pàgina ja existeix. La pàgina que s'ha afegit a l'estructura és l'existent.",
"The following pages added have automatically been categorized with the same categories as the structure:" => "Les pàgines següents afegides han estat automàticament categoritzades amb les mateixes categories que l'estructura:",
"Structure Layout" => "Disseny de l'estructura",
......@@ -13106,8 +13106,8 @@ $lang = array(
"You will remove" => "Du entfernst",
"and its subpages from the structure, now you have two options:" => "und seine Unterseiten von der Struktur. Du hast jetzt zwei Optionen:",
"and its subpages from the structure" => "und seine Unterseiten von der Struktur",
"\n\t\t\tRemove only from structure" => "\n\t\t\tNur aus Struktur entfernen",
"\n\t\t\t\tRemove from structure and remove page too" => "\n\t\t\t\tAus Struktur und die Seite selbst entfernen",
"Remove only from structure" => "Nur aus Struktur entfernen",
"Remove from structure and remove page too" => "Aus Struktur und die Seite selbst entfernen",
"The page already exists. The page that has been added to the structure is the existing one." => "Die Seite existiert bereits. Die Seite, die zur Struktur hinzugefügt wurde ist die existierende.",
"The following pages added have automatically been categorized with the same categories as the structure" => "Die folgenden Seiten wurden automatisch mit der gleichen Kategorie wie die Struktur sie hat kategorisiert",
"Structure Layout" => "Struktur Layout",
......@@ -13074,7 +13074,7 @@ $lang = array(
"You will remove" => "Du vil fjerne",
"and its subpages from the structure, now you have two options:" => "og dennes underliggende sider fra strukturen. Du har nå to valgmuligheter:",
// "and its subpages from the structure" => "and its subpages from the structure",
"\n\t\t\tRemove only from structure" => "\n\t\t\tFjern kun fra strukturen",
"Remove only from structure" => "Fjern kun fra strukturen",
"\n\t\t\t\tRemove from structure and remove page too" => "\n\t\t\t\tFjern fra strukturen og fjern sida også",
// "The page already exists. The page that has been added to the structure is the existing one" => "The page already exists. The page that has been added to the structure is the existing one",
// "The following pages added have automatically been categorized with the same categories as the structure" => "The following pages added have automatically been categorized with the same categories as the structure",
......@@ -369,10 +369,11 @@
{/if}
{/tab}
{/tabset}
<div class="article-buttons text-center">
<input type="submit" class="wikiaction btn btn-default" name="preview" value="{tr}Preview{/tr}" onclick="needToConfirm=false;">
<input type="submit" class="wikiaction btn btn-primary" name="save" value="{tr}Save{/tr}" onclick="this.form.saving=true;needToConfirm=false;">
{if $articleId}<input type="submit" class="wikiaction tips btn btn-link" title="{tr}Cancel{/tr}|{tr}Cancel the edit, you will lose your changes.{/tr}" name="cancel_edit" value="{tr}Cancel Edit{/tr}" onclick="needToConfirm=false;">{/if}
{if $articleId}<input type="submit" class="wikiaction tips btn btn-link" title="{tr}Cancel{/tr}|{tr}Cancel the edit, you will lose your changes.{/tr}" name="cancel_edit" value="{tr}Cancel Edit{/tr}" onclick="needToConfirm=false;">{/if}
</div>
{if $smarty.session.wysiwyg neq 'y'}
{jq}
......
......@@ -9,7 +9,8 @@
<p>
{tr}Note that plugin arguments can be enclosed with double quotes (&quot;); this allows them to contain , or = or &gt;{/tr}.
<br>
{if $prefs.feature_help eq 'y'}{tr}More help here{/tr} <a href="{$prefs.helpurl}Plugins" target="tikihelp" class="tikihelp" title="{tr}Plugins:{/tr}{tr}Wiki plugins extend the function of wiki syntax with more specialized commands.{/tr}">{icon _id='help' style="vertical-align:middle"}</a>
{if $prefs.feature_help eq 'y'}{tr}More help here{/tr}
<a href="{$prefs.helpurl}Plugins" target="tikihelp" class="tikihelp" title="{tr}Plugins:{/tr}{tr}Wiki plugins extend the function of wiki syntax with more specialized commands.{/tr}">{icon _id='help' style="vertical-align:middle"}</a>
{/if}
</p>
......@@ -25,7 +26,7 @@
<table id="plugins_help_table" width="95%" class="formcolor">
<tr><th>{tr}Description{/tr}</th></tr>
{section name=i loop=$plugins} {* To modify the template of below: tiki-plugin_help.tpl *}
{section name=i loop=$plugins} {* To modify the template of below: tiki-plugin_help.tpl *}
<tr>
<td>
{if $plugins[i].help eq ''}
......
......@@ -77,36 +77,36 @@
{/if}
<div class="table-responsive">
<table class="table normal">
<tr>
<th>{self_link _sort_arg='sort_mode' _sort_field='pId'}{tr}Id{/tr}{/self_link}</th>
<th>{self_link _sort_arg='sort_mode' _sort_field='publishDate'}{tr}Publishing Date{/tr}{/self_link}</th>
<th>{self_link _sort_arg='sort_mode' _sort_field='data'}{tr}Data{/tr}{/self_link}</th>
<th>{tr}Action{/tr}</th>
</tr>
{section name=changes loop=$listpages}
{if $actual eq $listpages[changes].publishDate}
{assign var=class value=third}
{else}
{if $actual > $listpages[changes].publishDate}
{assign var=class value=odd}
<table class="table normal">
<tr>
<th>{self_link _sort_arg='sort_mode' _sort_field='pId'}{tr}Id{/tr}{/self_link}</th>
<th>{self_link _sort_arg='sort_mode' _sort_field='publishDate'}{tr}Publishing Date{/tr}{/self_link}</th>
<th>{self_link _sort_arg='sort_mode' _sort_field='data'}{tr}Data{/tr}{/self_link}</th>
<th>{tr}Action{/tr}</th>
</tr>
{section name=changes loop=$listpages}
{if $actual eq $listpages[changes].publishDate}
{assign var=class value=third}
{else}
{assign var=class value=even}
{if $actual > $listpages[changes].publishDate}
{assign var=class value=odd}
{else}
{assign var=class value=even}
{/if}
{/if}
{/if}
<tr class="{$class}">
<td class="id">&nbsp;{$listpages[changes].pId}&nbsp;</td>
<td class="date">&nbsp;{$listpages[changes].publishDate|tiki_short_datetime}&nbsp;</td>
<td class="text">&nbsp;{$listpages[changes].data|escape:'html'|nl2br}&nbsp;</td>
<td class="action">
<a class="link" href="tiki-edit_programmed_content.php?offset={$offset}&amp;sort_mode={$sort_mode}&amp;contentId={$contentId}&amp;edit={$listpages[changes].pId}" title="{tr}Edit{/tr}">{icon _id=page_edit}</a>
<a class="link" href="tiki-edit_programmed_content.php?offset={$offset}&amp;sort_mode={$sort_mode}&amp;contentId={$contentId}&amp;remove={$listpages[changes].pId}" title="{tr}Remove{/tr}">{icon _id=cross alt="{tr}Remove{/tr}"}</a>
</td>
</tr>
{sectionelse}
{norecords _colspan=4}
{/section}
</table>
<tr class="{$class}">
<td class="id">&nbsp;{$listpages[changes].pId}&nbsp;</td>
<td class="date">&nbsp;{$listpages[changes].publishDate|tiki_short_datetime}&nbsp;</td>
<td class="text">&nbsp;{$listpages[changes].data|escape:'html'|nl2br}&nbsp;</td>
<td class="action">
<a class="link" href="tiki-edit_programmed_content.php?offset={$offset}&amp;sort_mode={$sort_mode}&amp;contentId={$contentId}&amp;edit={$listpages[changes].pId}" title="{tr}Edit{/tr}">{icon _id=page_edit}</a>
<a class="link" href="tiki-edit_programmed_content.php?offset={$offset}&amp;sort_mode={$sort_mode}&amp;contentId={$contentId}&amp;remove={$listpages[changes].pId}" title="{tr}Remove{/tr}">{icon _id=cross alt="{tr}Remove{/tr}"}</a>
</td>
</tr>
{sectionelse}
{norecords _colspan=4}
{/section}
</table>
</div>
{pagination_links cant=$cant step=$prefs.maxRecords offset=$offset}{/pagination_links}
......@@ -8,15 +8,15 @@
{button href="tiki-edit_quiz.php" class="btn btn-default" _text="{tr}Admin Quizzes{/tr}"}
</div>
<h2>{tr}Create/edit options for question:{/tr} <a href="tiki-edit_quiz_questions.php?quizId={$question_info.quizId}&amp;questionId={$question_info.questionId}">{$question_info.question|escape}</a></h2>
<h2>{tr}Create/edit options for question:{/tr} <a href="tiki-edit_quiz_questions.php?quizId={$question_info.quizId}&amp;questionId={$question_info.questionId}">{$question_info.question|escape}</a></h2>
<form action="tiki-edit_question_options.php" method="post">
<input type="hidden" name="optionId" value="{$optionId|escape}">
<input type="hidden" name="questionId" value="{$questionId|escape}">
<table class="formcolor">
<tr><td>{tr}Option:{/tr}</td><td><textarea name="optionText" rows="5" cols="40">{$optionText|escape}</textarea></td></tr>
<tr><td>{tr}Points:{/tr}</td><td><input type="text" name="points" value="{$points|escape}"></td></tr>
<tr><td >&nbsp;</td><td><input type="submit" class="btn btn-primary btn-sm" name="save" value="{tr}Save{/tr}"></td></tr>
</table>
<input type="hidden" name="optionId" value="{$optionId|escape}">
<input type="hidden" name="questionId" value="{$questionId|escape}">
<table class="formcolor">
<tr><td>{tr}Option:{/tr}</td><td><textarea name="optionText" rows="5" cols="40">{$optionText|escape}</textarea></td></tr>
<tr><td>{tr}Points:{/tr}</td><td><input type="text" name="points" value="{$points|escape}"></td></tr>
<tr><td >&nbsp;</td><td><input type="submit" class="btn btn-primary btn-sm" name="save" value="{tr}Save{/tr}"></td></tr>
</table>
</form>
<h2>Options</h2>
......@@ -24,29 +24,29 @@
{include file='find.tpl'}
<div class="table-responsive">
<table class="table normal">
<tr>
<th><a href="tiki-edit_question_options.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'optionId_desc'}optionId_asc{else}optionId_desc{/if}">{tr}ID{/tr}</a></th>
<th><a href="tiki-edit_question_options.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'optionText_desc'}optionText_asc{else}optionText_desc{/if}">{tr}text{/tr}</a></th>
<th><a href="tiki-edit_question_options.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'points_desc'}points_asc{else}points_desc{/if}">{tr}points{/tr}</a></th>
<th>{tr}Action{/tr}</th>
</tr>
{section name=user loop=$channels}
<tr>
<td class="id">{$channels[user].optionId}</td>
<td class="text">{$channels[user].optionText|escape}</td>
<td class="integer">{$channels[user].points}</td>
<td class="action">
<a class="link" href="tiki-edit_question_options.php?questionId={$questionId}&amp;offset={$offset}&amp;sort_mode={$sort_mode}&amp;optionId={$channels[user].optionId}">{icon _id='page_edit' alt="{tr}Edit{/tr}"}</a>
<a class="link" href="tiki-edit_question_options.php?questionId={$questionId}&amp;offset={$offset}&amp;sort_mode={$sort_mode}&amp;remove={$channels[user].optionId}">{icon _id='cross' alt="{tr}Remove{/tr}"}</a>
</td>
</tr>
{sectionelse}
{norecords _colspan=4}
{/section}
</table>
<table class="table normal">
<tr>
<th><a href="tiki-edit_question_options.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'optionId_desc'}optionId_asc{else}optionId_desc{/if}">{tr}ID{/tr}</a></th>
<th><a href="tiki-edit_question_options.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'optionText_desc'}optionText_asc{else}optionText_desc{/if}">{tr}text{/tr}</a></th>
<th><a href="tiki-edit_question_options.php?offset={$offset}&amp;sort_mode={if $sort_mode eq 'points_desc'}points_asc{else}points_desc{/if}">{tr}points{/tr}</a></th>
<th>{tr}Action{/tr}</th>
</tr>
{section name=user loop=$channels}
<tr>
<td class="id">{$channels[user].optionId}</td>
<td class="text">{$channels[user].optionText|escape}</td>
<td class="integer">{$channels[user].points}</td>
<td class="action">
<a class="link" href="tiki-edit_question_options.php?questionId={$questionId}&amp;offset={$offset}&amp;sort_mode={$sort_mode}&amp;optionId={$channels[user].optionId}">{icon _id='page_edit' alt="{tr}Edit{/tr}"}</a>
<a class="link" href="tiki-edit_question_options.php?questionId={$questionId}&amp;offset={$offset}&amp;sort_mode={$sort_mode}&amp;remove={$channels[user].optionId}">{icon _id='cross' alt="{tr}Remove{/tr}"}</a>
</td>
</tr>
{sectionelse}
{norecords _colspan=4}
{/section}
</table>
</div>
{pagination_links cant=$cant_pages step=$prefs.maxRecords offset=$offset}{/pagination_links}
This diff is collapsed.
......@@ -82,40 +82,40 @@
{include file='find.tpl'}
<div class="table-responsive">
<table class="table normal">
<tr>
<th>
<a href="tiki-edit_quiz_questions.php?quizId={$quizId}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'questionId_desc'}questionId_asc{else}questionId_desc{/if}">{tr}ID{/tr}</a>
</th>
<th>
<a href="tiki-edit_quiz_questions.php?quizId={$quizId}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'position_desc'}position_asc{else}position_desc{/if}">{tr}Position{/tr}</a>
</th>
<th>
<a href="tiki-edit_quiz_questions.php?quizId={$quizId}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'question_desc'}question_asc{else}question_desc{/if}">{tr}Question{/tr}</a>
</th>
<th>{tr}Options{/tr}</th>
<th>{tr}maxScore{/tr}</th>
<th>{tr}Action{/tr}</th>
</tr>
{section name=user loop=$channels}
<table class="table normal">
<tr>
<td class="id">{$channels[user].questionId}</td>
<td class="id">{$channels[user].position}</td>
<td class="text">{$channels[user].question|escape}</td>
<td class="integer">{$channels[user].options}</td>
<td class="integer">{$channels[user].maxPoints}</td>
<td class="action">
<a class="link" href="tiki-edit_quiz_questions.php?quizId={$quizId}&amp;offset={$offset}&amp;sort_mode={$sort_mode}&amp;questionId={$channels[user].questionId}">{icon _id='page_edit' alt="{tr}Edit{/tr}"}</a>
<a class="link" href="tiki-edit_question_options.php?quizId={$quizId}&amp;questionId={$channels[user].questionId}">{icon _id='bricks' alt="{tr}Options{/tr}"}</a>
<a class="link" href="tiki-edit_quiz_questions.php?quizId={$quizId}&amp;offset={$offset}&amp;sort_mode={$sort_mode}&amp;remove={$channels[user].questionId}">{icon _id='cross' alt="{tr}Remove{/tr}"}</a>
</td>
<th>
<a href="tiki-edit_quiz_questions.php?quizId={$quizId}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'questionId_desc'}questionId_asc{else}questionId_desc{/if}">{tr}ID{/tr}</a>
</th>
<th>
<a href="tiki-edit_quiz_questions.php?quizId={$quizId}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'position_desc'}position_asc{else}position_desc{/if}">{tr}Position{/tr}</a>
</th>
<th>
<a href="tiki-edit_quiz_questions.php?quizId={$quizId}&amp;offset={$offset}&amp;sort_mode={if $sort_mode eq 'question_desc'}question_asc{else}question_desc{/if}">{tr}Question{/tr}</a>
</th>
<th>{tr}Options{/tr}</th>
<th>{tr}maxScore{/tr}</th>
<th>{tr}Action{/tr}</th>
</tr>
{sectionelse}
{norecords _colspan=6}
{/section}
</table>
{section name=user loop=$channels}
<tr>
<td class="id">{$channels[user].questionId}</td>
<td class="id">{$channels[user].position}</td>
<td class="text">{$channels[user].question|escape}</td>
<td class="integer">{$channels[user].options}</td>
<td class="integer">{$channels[user].maxPoints}</td>
<td class="action">
<a class="link" href="tiki-edit_quiz_questions.php?quizId={$quizId}&amp;offset={$offset}&amp;sort_mode={$sort_mode}&amp;questionId={$channels[user].questionId}">{icon _id='page_edit' alt="{tr}Edit{/tr}"}</a>
<a class="link" href="tiki-edit_question_options.php?quizId={$quizId}&amp;questionId={$channels[user].questionId}">{icon _id='bricks' alt="{tr}Options{/tr}"}</a>
<a class="link" href="tiki-edit_quiz_questions.php?quizId={$quizId}&amp;offset={$offset}&amp;sort_mode={$sort_mode}&amp;remove={$channels[user].questionId}">{icon _id='cross' alt="{tr}Remove{/tr}"}</a>
</td>
</tr>
{sectionelse}
{norecords _colspan=6}
{/section}
</table>
</div>
{pagination_links cant=$cant_pages step=$prefs.maxRecords offset=$offset}{/pagination_links}
......
......@@ -6,63 +6,58 @@
{if $remove eq 'y'}
{tr}You will remove{/tr} '{$removePageName}' {if $page_removable == 'y'}{tr}and its subpages from the structure, now you have two options:{/tr}{else}{tr}and its subpages from the structure{/tr}{/if}
<ul>
<li>
<a class="link"
href="tiki-edit_structure.php?page_ref_id={$structure_id}&amp;rremove={$removepage}&amp;page={$removePageName|escape:"url"}">{tr}
Remove only from structure{/tr}</a>
</li>
{if $page_removable == 'y'}
<ul>
<li>
<a class="link"
href="tiki-edit_structure.php?page_ref_id={$structure_id}&amp;sremove={$removepage}&amp;page={$removePageName|escape:"url"}">{tr}
Remove from structure and remove page too{/tr}</a>
<a class="link" href="tiki-edit_structure.php?page_ref_id={$structure_id}&amp;rremove={$removepage}&amp;page={$removePageName|escape:"url"}">{tr}Remove only from structure{/tr}</a>
</li>
{/if}
</ul>
<br/>
{if $page_removable == 'y'}
<li>
<a class="link" href="tiki-edit_structure.php?page_ref_id={$structure_id}&amp;sremove={$removepage}&amp;page={$removePageName|escape:"url"}">{tr}Remove from structure and remove page too{/tr}</a>
</li>
{/if}
</ul>
<br/>
{/if}
{if $alert_exists eq 'y'}
<strong>{tr}The page already exists. The page that has been added to the structure is the existing one.{/tr}</strong>
<br/>
<strong>{tr}The page already exists. The page that has been added to the structure is the existing one.{/tr}</strong>
<br/>
{/if}
{if count($alert_in_st) > 0}
{tr}Note that the following pages are also part of another structure. Make sure that access permissions (if any) do not conflict:{/tr}
{foreach from=$alert_in_st item=thest}
&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thest|escape:"url"}' target="_blank">{$thest}</a>
&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thest|escape:"url"}' target="_blank">{$thest}</a>
{/foreach}
<br/>
<br/>
<br/>
<br/>
{/if}
{if count($alert_categorized) > 0}
{tr}The following pages added have automatically been categorized with the same categories as the structure:{/tr}
{foreach from=$alert_categorized item=thecat}
&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thecat|escape:"url"}' target="_blank">{$thecat}</a>
&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thecat|escape:"url"}' target="_blank">{$thecat}</a>
{/foreach}
<br/>
<br/>
<br/>
<br/>
{/if}
{if count($alert_to_remove_cats) > 0}
{tr}The following pages have categories but the structure has none. You may wish to uncategorize them to be consistent:{/tr}
{foreach from=$alert_to_remove_cats item=thecat}
&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thecat|escape:"url"}' target="_blank">{$thecat}</a>
&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$thecat|escape:"url"}' target="_blank">{$thecat}</a>
{/foreach}
<br/>
<br/>
<br/>
<br/>
{/if}
{if count($alert_to_remove_extra_cats) > 0}
{tr}The following pages are in categories that the structure is not in. You may wish to recategorize them in order to be consistent:{/tr}
{foreach from=$alert_to_remove_extra_cats item=theextracat}
&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$theextracat|escape:"url"}'
target="_blank">{$theextracat}</a>
&nbsp;&nbsp;<a class='tablename' href='tiki-index.php?page={$theextracat|escape:"url"}' target="_blank">{$theextracat}</a>
{/foreach}
<br/>
<br/>
<br/>
<br/>
{/if}
<h2>{tr}Structure Layout{/tr}</h2>
......@@ -70,8 +65,7 @@
{self_link page_ref_id=$structure_id}
{if $structure_id eq $page_ref_id}<strong>{/if}
<big>{tr}Top{/tr}</big>
{if $structure_id eq $page_ref_id}</strong>
{/if}
{if $structure_id eq $page_ref_id}</strong>{/if}
{/self_link}
<form action="tiki-edit_structure.php" method="post" style="display: inline-block; margin-left: 1em;">
<input type="hidden" name="page_ref_id" value="{$structure_id}">
......@@ -123,11 +117,11 @@
<input type="hidden" name="page_ref_id" value="{$page_ref_id}">
<h3>{tr}Categorize all pages in structure together:{/tr}</h3>
<div class="table-responsive">
<table class="table normal">
{include file='categorize.tpl'}
</table>
</div>
<div class="table-responsive">
<table class="table normal">
{include file='categorize.tpl'}
</table>
</div>
<input type="submit" class="btn btn-default btn-sm" name="recategorize" value="{tr}Update{/tr}">
&nbsp;&nbsp;{tr}Remove existing categories from ALL pages before recategorizing:{/tr} <input type="checkbox"
name="cat_override">
......
......@@ -16,8 +16,8 @@
<strong>{tr}Name{/tr}</strong>
</td>
<td>
<input type="hidden" name="topicid" value="{$topic_info.topicId}">
<input type="text" class="form-control" name="name" value="{$topic_info.name|escape}">
<input type="hidden" name="topicid" value="{$topic_info.topicId}">
<input type="text" class="form-control" name="name" value="{$topic_info.name|escape}">
</td>
</tr>
<tr>
......@@ -25,8 +25,8 @@
<strong>{tr}Image{/tr}</strong>
</td>
<td>
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input name="userfile1" class="form-control" type="file">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
<input name="userfile1" class="form-control" type="file">
</td>
</tr>
<tr>
......
......@@ -56,7 +56,7 @@
<fieldset>
<p>{tr}Select language to translate to:{/tr}
<select name="lang" id="language_list" size="1">
<option value="unspecified">{tr}Unspecified{/tr}</option>
<option value="unspecified">{tr}Unspecified{/tr}</option>
{section name=ix loop=$languages}
<option value="{$languages[ix].value|escape}"{if $default_target_lang eq $languages[ix].value} selected="selected"{/if}>{$languages[ix].name|escape}</option>
{/section}
......@@ -78,40 +78,40 @@
</form>
{/if}
{if !isset($articles)}
{jq notonready=true}
{literal}
// Make the translation name have the focus.
window.onload = function()
{
document.getElementById("translation_name").focus();
}
function validate_translation_request() {
var success = true;
var language_of_translation = $("#language_list").val();
if (language_of_translation == "unspecified") {
{/literal}
var message = {tr}"You forgot to specify the language of the translation. Please choose a language in the picklist."{/tr};
{literal}
alert(message);
success = false;
} else {
var page_list = $("#existing-page-src");
var page_name = $('#translation_name').val();
var matching_options = $('#existing-page-src option[value="' + page_name + '"]').attr( 'selected', true );
if( matching_options.length > 0 ) {
var message = {tr}"The page already exists. It was selected in the list below."{/tr};
alert( message );
success = false;
}
}
return success;
}
{/literal}
{/jq}
{jq notonready=true}
{literal}
// Make the translation name have the focus.
window.onload = function()
{
document.getElementById("translation_name").focus();
}
function validate_translation_request() {
var success = true;
var language_of_translation = $("#language_list").val();
if (language_of_translation == "unspecified") {
{/literal}
var message = {tr}"You forgot to specify the language of the translation. Please choose a language in the picklist."{/tr};
{literal}
alert(message);
success = false;
} else {
var page_list = $("#existing-page-src");
var page_name = $('#translation_name').val();
var matching_options = $('#existing-page-src option[value="' + page_name + '"]').attr( 'selected', true );
if( matching_options.length > 0 ) {
var message = {tr}"The page already exists. It was selected in the list below."{/tr};
alert( message );
success = false;
}
}
return success;
}
{/literal}
{/jq}
{/if}
<hr>
......@@ -154,19 +154,20 @@ function validate_translation_request() {
</div>
</form>
{/if}
{jq}
$('a.attach_detach_translation').click(function() {
var object_type = $(this).data('object_type');
var object_to_translate = $(this).data('object_id');
$(this).serviceDialog({
title: '{tr}Manage translations{/tr}',
data: {
controller: 'translation',
action: 'manage',
type: object_type,
source: object_to_translate
}
});
return false;
});
$('a.attach_detach_translation').click(function() {
var object_type = $(this).data('object_type');
var object_to_translate = $(this).data('object_id');
$(this).serviceDialog({
title: '{tr}Manage translations{/tr}',
data: {
controller: 'translation',
action: 'manage',
type: object_type,
source: object_to_translate
}
});
return false;
});
{/jq}
This diff is collapsed.
......@@ -48,10 +48,10 @@
<history>
{foreach from=$history item=hist}
<version version="{$hist.version}" zip="{$hist.zip|escape}">
<user><![CDATA[{$hist.user|escape:'html'}]]></user>
{if $hist.description}<description><![CDATA[{$hist.description|escape:'html'}]]></description>{/if}
{if $hist.comment}<comment><![CDATA[{$hist.comment|escape:'html'}]]></comment>{/if}
<lastModif>{$hist.lastModif}</lastModif>
<user><![CDATA[{$hist.user|escape:'html'}]]></user>
{if $hist.description}<description><![CDATA[{$hist.description|escape:'html'}]]></description>{/if}
{if $hist.comment}<comment><![CDATA[{$hist.comment|escape:'html'}]]></comment>{/if}
<lastModif>{$hist.lastModif}</lastModif>
</version>
{/foreach}
</history>
......
......@@ -10,71 +10,71 @@
<h2>{if $questionId}{tr}Edit FAQ question{/tr}{else}{tr}Add FAQ question{/tr}{/if}</h2>
<form action="tiki-faq_questions.php" method="post" id="editpageform">
<input type="hidden" name="questionId" value="{$questionId|escape}">
<input type="hidden" name="faqId" value="{$faqId|escape}">
<input type="hidden" name="questionId" value="{$questionId|escape}">
<input type="hidden" name="faqId" value="{$faqId|escape}">
{* begin table *}
<table class="formcolor">
<tr>
<td>{tr}Question:{/tr}</td>
<td >
<textarea type="text" rows="2" cols="80" name="question">{$question|escape}</textarea>
</td>
</tr>
{* begin table *}
<table class="formcolor">
<tr>
<td>{tr}Question:{/tr}</td>
<td >
<textarea type="text" rows="2" cols="80" name="question">{$question|escape}</textarea>
</td>
</tr>
<tr>
<td>{tr}Answer:{/tr}
</td>
<td >
{toolbars area_id="faqans"}
<textarea id='faqans' type="text" rows="8" cols="80" name="answer">{$answer|escape}</textarea>
</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >
<input type="submit" class="btn btn-primary btn-sm" name="save" value="{tr}Save{/tr}">
{* set your changes and save 'em *}
</td>
</tr>
</table>
{* end table *}
<tr>
<td>{tr}Answer:{/tr}
</td>
<td >
{toolbars area_id="faqans"}
<textarea id='faqans' type="text" rows="8" cols="80" name="answer">{$answer|escape}</textarea>
</td>
</tr>
<tr>
<td >&nbsp;</td>
<td >
<input type="submit" class="btn btn-primary btn-sm" name="save" value="{tr}Save{/tr}">
{* set your changes and save 'em *}
</td>
</tr>
</table>
{* end table *}
</form>
{* This is the area for choosing questions from the db... it really should support choosing options from the answers, but only show if there are existing questions *}
{if $allq}
<br><h2> {tr}Use a question from another FAQ{/tr}</h2>
<h2> {tr}Use a question from another FAQ{/tr}</h2>
<form action="tiki-faq_questions.php" method="post">
<input type="hidden" name="questionId" value="{$questionId|escape}">
<input type="hidden" name="faqId" value="{$faqId|escape}">
<table class="formcolor">
<tr>
<td>{tr}Filter{/tr}</td>
<td>
<input type="text" name="filter" value="{$filter|escape}">
<input type="submit" class="btn btn-default btn-sm" name="filteruseq" value="{tr}Filter{/tr}">
</td>
</tr>
<tr>
<td>{tr}Question:{/tr}</td>
<td >
<select name="usequestionId">
{section name=ix loop=$allq}
{* Ok, here's where you change the truncation field for this field *}
<option value="{$allq[ix].questionId|escape|truncate:20:"":true}">{$allq[ix].question|escape|truncate:110:"":true}</option>
{/section}
</select>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type="submit" class="btn btn-default btn-sm" name="useq" value="{tr}Use{/tr}">
</td>
</tr>
</table>
</form>
<input type="hidden" name="questionId" value="{$questionId|escape}">
<input type="hidden" name="faqId" value="{$faqId|escape}">
<table class="formcolor">
<tr>
<td>{tr}Filter{/tr}</td>
<td>
<input type="text" name="filter" value="{$filter|escape}">
<input type="submit" class="btn btn-default btn-sm" name="filteruseq" value="{tr}Filter{/tr}">
</td>
</tr>
<tr>
<td>{tr}Question:{/tr}</td>
<td >
<select name="usequestionId">
{section name=ix loop=$allq}
{* Ok, here's where you change the truncation field for this field *}
<option value="{$allq[ix].questionId|escape|truncate:20:"":true}">{$allq[ix].question|escape|truncate:110:"":true}</option>
{/section}
</select>