Skip to content

Commit

Permalink
Object info has a new section "Published version" containing all deta…
Browse files Browse the repository at this point in the history
…ils if it exists (#56)

* Object info has a new section "Published version" containing all details if it exists

* "Modified" renamed to "Published", other minor re-organization
  • Loading branch information
pkamps authored May 17, 2017
1 parent 53fbbc8 commit 3adc41a
Showing 1 changed file with 53 additions and 61 deletions.
114 changes: 53 additions & 61 deletions design/admin/templates/content/parts/object_information.tpl
Original file line number Diff line number Diff line change
@@ -1,63 +1,55 @@
<div class="objectinfo">

{* DESIGN: Header START *}<div class="box-header">

<h4>{'Object information'|i18n( 'design/admin/content/history' )}</h4>

{* DESIGN: Header END *}</div>

{* DESIGN: Content START *}<div class="box-content">

{* Object ID *}
<p>
<label>{'ID'|i18n( 'design/admin/content/history' )}:</label>
{$object.id}
</p>

{* Created *}
<p>
<label>{'Created'|i18n( 'design/admin/content/history' )}:</label>
{if $object.published}
{$object.published|l10n( shortdatetime )}<br />
{$object.owner.name|wash}
{else}
{'Not yet published'|i18n( 'design/admin/content/history' )}
{/if}
</p>

{* Modified *}
<p>
<label>{'Modified'|i18n( 'design/admin/content/history' )}:</label>
{if $object.modified}
{def $latest_version=$object.versions|extract_right(1)[0]}
{$object.modified|l10n( shortdatetime )}<br />
{$latest_version.creator.name|wash}
{else}
{'Not yet published'|i18n( 'design/admin/content/history' )}
{/if}
</p>

{* Published version*}
<p>
<label>{'Published version'|i18n( 'design/admin/content/history' )}:</label>
{if $object.published}
{$object.published_version}
{else}
{'Not yet published'|i18n( 'design/admin/content/history' )}
{/if}
</p>

{if and( is_set($manage_version_button), $manage_version_button )}
{* Manage versions *}
<div class="block">
{if $object.versions|count|gt( 1 )}
<input class="button" type="submit" name="VersionsButton" value="{'Manage versions'|i18n( 'design/admin/content/view/versionview' )}" title="{'View and manage (copy, delete, etc.) the versions of this object.'|i18n( 'design/admin/content/view/versionview' )}" />
{else}
<input class="button-disabled" type="submit" name="VersionsButton" value="{'Manage versions'|i18n( 'design/admin/content/view/versionview' )}" disabled="disabled" title="{'You cannot manage the versions of this object because there is only one version available (the one that is being displayed).'|i18n( 'design/admin/content/view/versionview' )}" />
{/if}
</div>
{/if}

{* DESIGN: Content END *}</div>

<div class="box-header">
<h4>{'Object information'|i18n( 'design/admin/content/history' )}</h4>
</div>

<div class="box-content">
{* Created *}
<p>
<label>{'Created'|i18n( 'design/admin/content/history' )}:</label>
{if $object.published}
{$object.published|l10n( shortdatetime )}<br />
{$object.owner.name|wash}
{else}
{'Not yet published'|i18n( 'design/admin/content/history' )}
{/if}
</p>
{* Object ID *}
<p>
<label>{'ID'|i18n( 'design/admin/content/history' )}:</label>
{$object.id}
</p>
</div>

{* Published version*}
<div class="box-header">
<h4>{'Published version'|i18n( 'design/admin/content/history' )}</h4>
</div>

<div class="box-content">
{if $object.published}
<p>
<label>{'Published'|i18n( 'design/admin/content/history' )}:</label>
{$object.current.modified|l10n( shortdatetime )}<br />
{$object.current.creator.name|wash}
</p>
<p>
<label>{'Version'|i18n( 'design/admin/content/history' )}:</label>
{$object.published_version}
</p>
{else}
<p>{'Not yet published'|i18n( 'design/admin/content/history' )}</p>
{/if}

{if and( is_set($manage_version_button), $manage_version_button )}
{* Manage versions *}
<div class="block">
{if $object.versions|count|gt( 1 )}
<input class="button" type="submit" name="VersionsButton" value="{'Manage versions'|i18n( 'design/admin/content/view/versionview' )}" title="{'View and manage (copy, delete, etc.) the versions of this object.'|i18n( 'design/admin/content/view/versionview' )}" />
{else}
<input class="button-disabled" type="submit" name="VersionsButton" value="{'Manage versions'|i18n( 'design/admin/content/view/versionview' )}" disabled="disabled" title="{'You cannot manage the versions of this object because there is only one version available (the one that is being displayed).'|i18n( 'design/admin/content/view/versionview' )}" />
{/if}
</div>
{/if}
</div>
</div>

0 comments on commit 3adc41a

Please sign in to comment.