Commit f91ea37c197c9a73413de980f0cd6fbc654db065

Authored by nbm
1 parent 0074e6cd

Generate path-info-lacking friendly URLs.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4770 c91229c3-7414-0410-bfa2-8a42b809f60b
templates/ktcore/authentication/manage.smarty
... ... @@ -32,7 +32,7 @@ ensure that the Plugin is enabled.{/i18n}<p></div>
32 32  
33 33 <ul>
34 34 {foreach from=$sources item=oSource}
35   - <li><a href="?action=viewsource&source_id={$oSource->getId()}">{$oSource->getName()}</a></li>
  35 + <li><a href="{addQS}action=viewsource&source_id={$oSource->getId()}">{$oSource->getName()}{/addQS}</a></li>
36 36 {/foreach}
37 37 </ul>
38 38 {else}
... ...
templates/ktcore/authentication/viewsource.smarty
... ... @@ -8,13 +8,13 @@
8 8 <dt>{i18n}Provider{/i18n}</dt>
9 9 <dd>{$provider->getName()}</dd>
10 10 </dl>
11   -<a href="?action=editsource&source_id={$source->getId()}">{i18n}Edit standard configuration{/i18n}</a>
  11 +<a href="{addQS}action=editsource&source_id={$source->getId()}{/addQS}">{i18n}Edit standard configuration{/i18n}</a>
12 12 </fieldset>
13 13  
14 14 {assign var=provider_stuff value=$provider->showSource($source)}
15 15 {if $provider_stuff}
16 16 <fieldset><legend>{i18n}Provider configuration{/i18n}</legend>
17 17 {$provider_stuff}
18   -<a href="?action=editsourceprovider&source_id={$source->getId()}">{i18n}Edit provider configuration{/i18n}</a>
  18 +<a href="{addQS}action=editsourceprovider&source_id={$source->getId()}{/addQS}">{i18n}Edit provider configuration{/i18n}</a>
19 19 </fieldset>
20 20 {/if}
... ...
templates/ktcore/document/admin/checkoutlisting.smarty
... ... @@ -27,7 +27,7 @@ value=$oDocument-&gt;getCheckedOutUserId()}{php}$oUser =
27 27 User::get($this->_tpl_vars['iUserId']); if ($oUser) { print
28 28 $oUser->getName(); }{/php}</td>
29 29 <td class="descriptiveText">{$oDocument->getDisplayPath()}</td>
30   - <td><a href="?action=confirm&fDocumentId={$oDocument->getId()}">{i18n}force checkin{/i18n}</a></td>
  30 + <td><a href="{addQS}action=confirm&fDocumentId={$oDocument->getId()}{/addQS}">{i18n}force checkin{/i18n}</a></td>
31 31 </tr>
32 32 {/foreach}
33 33 </tbody>
... ...
templates/ktcore/document/admin/force_checkin_confirm.smarty
... ... @@ -30,6 +30,6 @@
30 30 <div class="form_actions">
31 31 <input type="submit" value="{i18n}Force Checkin{/i18n}" />
32 32 <!-- FIXME separate this even further. -->
33   - <p><a href="?action=main" class="ktCancelLink">{i18n}Cancel{/i18n}</a></p>
  33 + <p><a href="{$smarty.server.PHP_SELF}" class="ktCancelLink">{i18n}Cancel{/i18n}</a></p>
34 34 </div>
35 35 </form>
... ...
templates/ktcore/documenttypes/list.smarty
... ... @@ -46,14 +46,14 @@ system.{/i18n}&lt;/p&gt;
46 46 </td>
47 47  
48 48 <td>
49   - <a href="?action=edit&fDocumentTypeId={$oDocumentType->getId()}">Edit</a>
  49 + <a href="{addQS}action=edit&fDocumentTypeId={$oDocumentType->getId()}{/addQS}">Edit</a>
50 50 </td>
51 51  
52 52 <td>
53 53 {if $oDocumentType->getDisabled()}
54   - <a href="?action=enable&fDocumentTypeId={$oDocumentType->getId()}">{i18n}Enable{/i18n}</a>
  54 + <a href="{addQS}action=enable&fDocumentTypeId={$oDocumentType->getId()}{/addQS}">{i18n}Enable{/i18n}</a>
55 55 {else}
56   - <a href="?action=disable&fDocumentTypeId={$oDocumentType->getId()}">{i18n}Disable{/i18n}</a>
  56 + <a href="{addQS}action=disable&fDocumentTypeId={$oDocumentType->getId()}{/addQS}">{i18n}Disable{/i18n}</a>
57 57 {/if}
58 58 </td>
59 59  
... ...
templates/ktcore/fields/list.smarty
... ... @@ -15,11 +15,11 @@
15 15 {foreach from=$fieldsets item=oFieldset}
16 16 <tr>
17 17 <td>
18   - <a href="?action=edit&fFieldsetId={$oFieldset->getId()}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a>
  18 + <a href="{addQS}action=edit&fFieldsetId={$oFieldset->getId()}{/addQS}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a>
19 19 </td>
20 20 <td>
21 21  
22   - <a href="?action=edit&fFieldsetId={$oFieldset->getId()}">
  22 + <a href="{addQS}action=edit&fFieldsetId={$oFieldset->getId()}{/addQS}">
23 23 { $oFieldset->getName() }
24 24 </a>
25 25 </td>
... ...
templates/ktcore/metadata/editField.smarty
... ... @@ -51,9 +51,7 @@
51 51  
52 52 {if $oField->getHasLookup() and $oField->getHasLookupTree()}
53 53 {assign var=iFieldId value=$oField->getId()}
54   -<a
55   -href="?action=editTree&field_id={$iFieldId}">{i18n}Manage
56   -lookup tree{/i18n}</a>
  54 +<a href="{addQS}action=editTree&field_id={$iFieldId}{/addQS}">{i18n}Manage lookup tree{/i18n}</a>
57 55 {/if}
58 56  
59 57 {if $aEnabledMetadata}
... ...
templates/ktcore/metadata/listFieldsets.smarty
... ... @@ -42,10 +42,10 @@
42 42 {/if}
43 43 </td>
44 44 <td>
45   - <a href="?action=edit&fFieldsetId={$oFieldset->getId()}" class="ktAction ktEdit">{i18n}Edit{/i18n}</a>
  45 + <a href="{addQS}action=edit&fFieldsetId={$oFieldset->getId()}{/addQS}" class="ktAction ktEdit">{i18n}Edit{/i18n}</a>
46 46 </td>
47 47 <td>
48   - <a href="?action=delete&fFieldsetId={$oFieldset->getId()}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a>
  48 + <a href="{addQS}action=delete&fFieldsetId={$oFieldset->getId()}{/addQS}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a>
49 49 </td>
50 50  
51 51 </tr>
... ...
templates/ktcore/workflow/editState.smarty
... ... @@ -82,7 +82,7 @@ with a specific &lt;strong&gt;role&lt;/strong&gt; (e.g. Manager) or part of a specific group
82 82 <ul>
83 83 {foreach from=$aTransitionsTo item=oTransition}
84 84 <li><a
85   -href="?action=editTransition&fWorkflowId={$oWorkflow->getId()}&fTransitionId={$oTransition->getId()}"
  85 +href="{addQS}action=editTransition&fWorkflowId={$oWorkflow->getId()}&fTransitionId={$oTransition->getId()}{/addQS}"
86 86 title="Transition
87 87 {$oTransition->getId()}">{$oTransition->getName()|escape}</a></li>
88 88 {/foreach}
... ...
templates/ktcore/workflow/listWorkflows.smarty
... ... @@ -46,9 +46,9 @@ lifecycle of the document.{/i18n}&lt;/p&gt;
46 46 <tr>
47 47 <td>{$oWorkflow->getName()}</td>
48 48 <td>{if $startId===NULL}Disabled{else}Enabled{/if}</td>
49   - <td><a class="ktAction ktEdit" href="?action=editWorkflow&fWorkflowId={$oWorkflow->getId()}" title="Workflow: {$oWorkflow->getId()}">Edit</a></td>
  49 + <td><a class="ktAction ktEdit" href="{addQS}action=editWorkflow&fWorkflowId={$oWorkflow->getId()}{/addQS}" title="Workflow: {$oWorkflow->getId()}">Edit</a></td>
50 50 <td>
51   - {if $startId!==NULL}<a href="?action=disableWorkflow&fWorkflowId={$oWorkflow->getId()}" title="Workflow: {$oWorkflow->getId()}">Disable</a>
  51 + {if $startId!==NULL}<a href="{addQS}action=disableWorkflow&fWorkflowId={$oWorkflow->getId()}{/addQS}" title="Workflow: {$oWorkflow->getId()}">Disable</a>
52 52 {else}&nbsp;{/if}
53 53 </td>
54 54 </tr>
... ...
templates/ktstandard/action/discussion_thread_list_item.smarty
1 1 <tr>
2   - <td><a href="?action=viewThread&fDocumentId={$context->oDocument->getId()}&fThreadId={$thread->getId()}">{$first_comment->getSubject()}</a></td>
  2 + <td><a href="{addQS}action=viewThread&fDocumentId={$context->oDocument->getId()}&fThreadId={$thread->getId()}{/addQS}">{$first_comment->getSubject()}</a></td>
3 3 <td>{$creator->getName()}</td>
4 4 <td>{$thread->getNumberOfViews()}</td>
5 5 <td>{$thread->getNumberOfReplies()}</td>
... ...
templates/ktstandard/action/document_links.smarty
... ... @@ -28,7 +28,7 @@
28 28 {assign var="target" value=$link->getChildDocument()}
29 29  
30 30 <tr>
31   - <td><a href="?action=delete&fDocumentId={$context->oDocument->getId()}&fDocumentLinkId={$link->getId()}" class="ktAction ktDelete">Delete</a></td>
  31 + <td><a href="{addQS}action=delete&fDocumentId={$context->oDocument->getId()}&fDocumentLinkId={$link->getId()}{/addQS}" class="ktAction ktDelete">Delete</a></td>
32 32 <td><a href="{"viewDocument"|generateControllerUrl}&qs[fDocumentId]={$target->getId()}&qs[action]=main">{$target->getName()}</a></td>
33 33 <td>{$type->getName()}</td>
34 34 <td>Linked <b>from</b> this document</td>
... ... @@ -68,7 +68,7 @@
68 68  
69 69  
70 70 {if $write_permission}
71   -<a class="ktAction ktAdd ktInline" href="?action=new&fDocumentId={$context->oDocument->getId()}">Add a new link</a>
72   -<a href="?action=new&fDocumentId={$context->oDocument->getId()}&fFolderId={$context->oDocument->getFolderId()}">Add a new link</a>.
  71 +<a class="ktAction ktAdd ktInline" href="{addQS}action=new&fDocumentId={$context->oDocument->getId()}{/addQS}">Add a new link</a>
  72 +<a href="{addQS}action=new&fDocumentId={$context->oDocument->getId()}&fFolderId={$context->oDocument->getFolderId()}{addQS}">Add a new link</a>.
73 73 {/if}
74 74  
... ...
templates/ktstandard/authentication/ldapadduser.smarty
... ... @@ -10,7 +10,7 @@
10 10 <input type="hidden" name="dn" value="{$dn}" />
11 11 <div class="form_actions">
12 12 <input type="submit" name="submit[create]" value="{i18n}create user{/i18n}" />
13   - <a href="?action=main" class="ktCancelLink">{i18n}Cancel{/i18n}</a>
  13 + <a href="{$smarty.server.PHP_SELF}" class="ktCancelLink">{i18n}Cancel{/i18n}</a>
14 14 </div>
15 15 </fieldset>
16 16 </form>
... ...