Commit 90cc96f841fbe21baf316526589be6b6d150ec6b
Merge branch 'edge' of git@github.com:ktgit/knowledgetree into edge
Showing
3 changed files
with
32 additions
and
11 deletions
setup/wizard/lib/services/windowsOpenOffice.php
| ... | ... | @@ -147,11 +147,9 @@ class windowsOpenOffice extends windowsService { |
| 147 | 147 | $this->setPort("8100"); |
| 148 | 148 | $this->setHost("127.0.0.1"); |
| 149 | 149 | $this->setLog("openoffice.log"); |
| 150 | -// $this->setBin("C:\Program Files (x86)\OpenOffice.org 3\program\soffice.bin"); | |
| 151 | -// $this->setBin("C:\Program Files (x86)\ktdms\openoffice\program\soffice.bin"); | |
| 152 | -// $this->setBin("C:\Program Files (x86)\ktdms\openoffice.2.4\program\soffice.bin"); | |
| 150 | + $this->setBin("C:\Program Files (x86)\OpenOffice.org 3\program\soffice.exe"); | |
| 153 | 151 | $this->setWinservice("winserv.exe"); |
| 154 | -// $this->setOption(); | |
| 152 | + $this->setOption(); | |
| 155 | 153 | } |
| 156 | 154 | #rem "%INSTALL_PATH%\bin\winserv.exe" install %OpenofficeServiceName% -displayname "%OpenofficeServiceName%" -start auto %SOFFICE_BIN% -headless -invisible -accept=pipe,name=pypipe;urp; |
| 157 | 155 | private function setPort($port = "8100") { |
| ... | ... | @@ -178,7 +176,7 @@ class windowsOpenOffice extends windowsService { |
| 178 | 176 | return $this->log; |
| 179 | 177 | } |
| 180 | 178 | |
| 181 | - private function setBin($bin = "soffice") { | |
| 179 | + private function setBin($bin = "soffice.exe") { | |
| 182 | 180 | $this->bin = $bin; |
| 183 | 181 | } |
| 184 | 182 | |
| ... | ... | @@ -195,8 +193,8 @@ class windowsOpenOffice extends windowsService { |
| 195 | 193 | } |
| 196 | 194 | |
| 197 | 195 | private function setOption() { |
| 198 | - $this->options = "-displayname {$this->name} -start auto \"{$this->bin}\" -headless -invisible " | |
| 199 | - . "-accept=socket,host={$this->host},port={$this->port};urp;"; | |
| 196 | + $this->options = "-displayname {$this->name} -start auto \"{$this->bin}\" -nologo -headless -invisible -nofirststartwizard " | |
| 197 | + . "-accept=\"socket,host={$this->host},port={$this->port};urp;StarOffice.ServiceManager\""; | |
| 200 | 198 | } |
| 201 | 199 | |
| 202 | 200 | public function getOption() { | ... | ... |
templates/ktcore/document/view.smarty
| ... | ... | @@ -35,9 +35,20 @@ these tasks, use the Request Assistance action.{/i18n} |
| 35 | 35 | </div> |
| 36 | 36 | {/if} |
| 37 | 37 | |
| 38 | -{foreach item=oFieldset from=$fieldsets} | |
| 39 | -{$oFieldset->render($document_data)} | |
| 40 | -{/foreach} | |
| 38 | +{if $thumbnail eq ''} | |
| 39 | + <div> | |
| 40 | + {foreach item=oFieldset from=$fieldsets} | |
| 41 | + {$oFieldset->render($document_data)} | |
| 42 | + {/foreach} | |
| 43 | + </div> | |
| 44 | +{else} | |
| 45 | + <div style="float:left;width:85%;"> | |
| 46 | + {foreach item=oFieldset from=$fieldsets} | |
| 47 | + {$oFieldset->render($document_data)} | |
| 48 | + {/foreach} | |
| 49 | + </div> | |
| 50 | + <div style="padding-top:45px;">{$thumbnail}</div> | |
| 51 | +{/if} | |
| 41 | 52 | |
| 42 | 53 | {if !empty($viewlet_data)} |
| 43 | 54 | ... | ... |
view.php
| ... | ... | @@ -210,7 +210,6 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { |
| 210 | 210 | array_push($fieldsets, new $displayClass($oFieldset)); |
| 211 | 211 | } |
| 212 | 212 | |
| 213 | - | |
| 214 | 213 | $checkout_user = 'Unknown user'; |
| 215 | 214 | if ($oDocument->getIsCheckedOut() == 1) { |
| 216 | 215 | $oCOU = User::get($oDocument->getCheckedOutUserId()); |
| ... | ... | @@ -249,6 +248,18 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { |
| 249 | 248 | $content_class = 'view withviewlets'; |
| 250 | 249 | } |
| 251 | 250 | $this->oPage->setContentClass($content_class); |
| 251 | + | |
| 252 | + // check for a thumbnail | |
| 253 | + $thumbnail = ''; | |
| 254 | + if (KTPluginUtil::pluginIsActive('thumbnails.generator.processor.plugin')) { | |
| 255 | + // hook into thumbnail plugin to get display for thumbnail | |
| 256 | + include_once(KT_DIR . '/plugins/thumbnails/thumbnails.php'); | |
| 257 | + $thumbnailer = new ThumbnailViewlet(); | |
| 258 | + $thumbnailDisplay = $thumbnailer->display_viewlet($document_id); | |
| 259 | + if ($thumbnailDisplay != '') { | |
| 260 | + $thumbnail = $thumbnailDisplay; | |
| 261 | + } | |
| 262 | + } | |
| 252 | 263 | |
| 253 | 264 | $oTemplating =& KTTemplating::getSingleton(); |
| 254 | 265 | $oTemplate = $oTemplating->loadTemplate('ktcore/document/view'); |
| ... | ... | @@ -263,6 +274,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { |
| 263 | 274 | 'document_data' => $document_data, |
| 264 | 275 | 'fieldsets' => $fieldsets, |
| 265 | 276 | 'viewlet_data' => $viewlet_data, |
| 277 | + 'thumbnail' => $thumbnail, | |
| 266 | 278 | ); |
| 267 | 279 | //return '<pre>' . print_r($aTemplateData, true) . '</pre>'; |
| 268 | 280 | return $oTemplate->render($aTemplateData); | ... | ... |