Commit 0f78f482e7baa6be0dbcec501db13a31cd38d31e
1 parent
a20092d5
KTS-1329: Show the owner value in document details
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@6079 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
3 changed files
with
31 additions
and
7 deletions
lib/widgets/fieldsetDisplay.inc.php
| ... | ... | @@ -192,6 +192,12 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay { |
| 192 | 192 | } else { |
| 193 | 193 | $creator_name = $creator->getName(); |
| 194 | 194 | } |
| 195 | + $owner =& User::get($document->getOwnerId()); | |
| 196 | + if (PEAR::isError($owner)) { | |
| 197 | + $owner_name = "<span class='ktError'>" . _kt("Unable to find the document's owner") . "</span>"; | |
| 198 | + } else { | |
| 199 | + $owner_name = $owner->getName(); | |
| 200 | + } | |
| 195 | 201 | $modified_user =& User::get($document->getModifiedUserId()); |
| 196 | 202 | if (PEAR::isError($modified_user)) { |
| 197 | 203 | $modified_user_name = "<span class='ktError'>" . _kt("Unable to find the document's creator") . "</span>"; |
| ... | ... | @@ -220,6 +226,7 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay { |
| 220 | 226 | "filename" => $document->getFileName(), |
| 221 | 227 | |
| 222 | 228 | "creator" => $creator_name, |
| 229 | + "owner" => $owner_name, | |
| 223 | 230 | "creation_date" => $creation_date, |
| 224 | 231 | |
| 225 | 232 | "last_modified_by" => $modified_user_name, |
| ... | ... | @@ -262,6 +269,13 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay { |
| 262 | 269 | } else { |
| 263 | 270 | $modified_user = $modified_user->getName(); |
| 264 | 271 | } |
| 272 | + | |
| 273 | + $owner_user =& User::get($document->getOwnerId()); | |
| 274 | + if (PEAR::isError($owner_user)) { | |
| 275 | + $owner_user = "<span class='ktError'>" . _kt("Unable to find the document's owner") . "</span>"; | |
| 276 | + } else { | |
| 277 | + $owner_user = $owner_user->getName(); | |
| 278 | + } | |
| 265 | 279 | |
| 266 | 280 | |
| 267 | 281 | |
| ... | ... | @@ -293,6 +307,7 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay { |
| 293 | 307 | |
| 294 | 308 | "creator" => $creator, |
| 295 | 309 | "creation_date" => $creation_date, |
| 310 | + "owner" => $owner_user, | |
| 296 | 311 | |
| 297 | 312 | "last_modified_by" => $modified_user, |
| 298 | 313 | "last_modified_date" => $last_modified_date, | ... | ... |
templates/kt3/fieldsets/generic.smarty
| ... | ... | @@ -27,16 +27,21 @@ |
| 27 | 27 | </tr> |
| 28 | 28 | |
| 29 | 29 | <tr class="even"> |
| 30 | + <th>{i18n}Owned by{/i18n}</th> | |
| 31 | + <td>{$owner}</td> | |
| 32 | + </tr> | |
| 33 | + | |
| 34 | + <tr class="odd"> | |
| 30 | 35 | <th>{i18n}Last update by{/i18n}</th> |
| 31 | 36 | <td>{$last_modified_by} ({$last_modified_date})</td> |
| 32 | 37 | </tr> |
| 33 | 38 | |
| 34 | - <tr class="odd"> | |
| 39 | + <tr class="even"> | |
| 35 | 40 | <th>{i18n}Document Type{/i18n}</th> |
| 36 | 41 | <td>{$document_type}</td> |
| 37 | 42 | </tr> |
| 38 | 43 | |
| 39 | - <tr class="even"> | |
| 44 | + <tr class="odd"> | |
| 40 | 45 | <th>{i18n}Workflow status{/i18n}</th> |
| 41 | 46 | <td> |
| 42 | 47 | {if $workflow_state} |
| ... | ... | @@ -46,7 +51,7 @@ |
| 46 | 51 | {/if}</td> |
| 47 | 52 | </tr> |
| 48 | 53 | |
| 49 | - <tr class="odd"> | |
| 54 | + <tr class="even"> | |
| 50 | 55 | <th>{i18n}Document ID{/i18n}</th> |
| 51 | 56 | <td>{$document->getId()}</td> |
| 52 | 57 | </tr> | ... | ... |
templates/kt3/fieldsets/generic_versioned.smarty
| ... | ... | @@ -44,10 +44,14 @@ |
| 44 | 44 | <td colspan="2">{$creator} ({$creation_date}) <span class="descriptiveText">({i18n}this cannot not change between versions{/i18n})</td> |
| 45 | 45 | </tr> |
| 46 | 46 | |
| 47 | + <tr class="even"> | |
| 48 | + <th>{i18n}Owned by{/i18n}</th> | |
| 49 | + <td colspan="2">{$owner} <span class="descriptiveText">({i18n}this cannot not change between versions{/i18n})</td> | |
| 50 | + </tr> | |
| 47 | 51 | |
| 48 | 52 | {capture assign="oldval"}{$comparison_last_modified_by} ({$comparison_last_modified_date}){/capture} |
| 49 | 53 | {capture assign="newval"}{$last_modified_by} ({$last_modified_date}){/capture} |
| 50 | - <tr class="even"> | |
| 54 | + <tr class="odd"> | |
| 51 | 55 | <th>{i18n}Last update by{/i18n}</th> |
| 52 | 56 | <td class="current {if ($oldval != $newval)}different{/if}">{$newval}</td> |
| 53 | 57 | <td class="previous {if ($oldval != $newval)}different{/if}">{$oldval}</td> |
| ... | ... | @@ -55,7 +59,7 @@ |
| 55 | 59 | |
| 56 | 60 | {capture assign="oldval"}{$comparison_document_type}{/capture} |
| 57 | 61 | {capture assign="newval"}{$document_type}{/capture} |
| 58 | - <tr class="odd"> | |
| 62 | + <tr class="even"> | |
| 59 | 63 | <th>{i18n}Document Type{/i18n}</th> |
| 60 | 64 | <td class="current {if ($oldval != $newval)}different{/if}">{$newval}</td> |
| 61 | 65 | <td class="previous {if ($oldval != $newval)}different{/if}">{$oldval}</td> |
| ... | ... | @@ -71,13 +75,13 @@ |
| 71 | 75 | {else} |
| 72 | 76 | {i18n}No workflow{/i18n} |
| 73 | 77 | {/if}{/capture} |
| 74 | - <tr class="even"> | |
| 78 | + <tr class="odd"> | |
| 75 | 79 | <th>{i18n}Workflow status{/i18n}</th> |
| 76 | 80 | <td class="current {if ($oldval != $newval)}different{/if}">{$newval}</td> |
| 77 | 81 | <td class="previous {if ($oldval != $newval)}different{/if}">{$oldval}</td> |
| 78 | 82 | </tr> |
| 79 | 83 | |
| 80 | - <tr class="odd"> | |
| 84 | + <tr class="even"> | |
| 81 | 85 | <th>{i18n}Document ID{/i18n}</th> |
| 82 | 86 | <td colspan="2">{$document->getId()} <span class="descriptiveText">({i18n}this cannot not change between versions{/i18n})</span></td> |
| 83 | 87 | </tr> | ... | ... |