From d9b086a6fa630f03cac2a06dffbc7023579e2672 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 22 Sep 2014 15:56:12 +0200 Subject: [PATCH] edit-history styling overhaul --- com.woltlab.wcf/templates/editHistory.tpl | 34 +++++++++++++++-------- wcfsetup/install/files/style/layout.less | 17 ++++++++++++ wcfsetup/install/lang/de.xml | 2 ++ wcfsetup/install/lang/en.xml | 2 ++ 4 files changed, 43 insertions(+), 12 deletions(-) diff --git a/com.woltlab.wcf/templates/editHistory.tpl b/com.woltlab.wcf/templates/editHistory.tpl index f24b23eb37..157b7b9c25 100644 --- a/com.woltlab.wcf/templates/editHistory.tpl +++ b/com.woltlab.wcf/templates/editHistory.tpl @@ -11,12 +11,22 @@ {include file='header'}
-

{$object->getTitle()}

+

{lang}wcf.edit.versions{/lang}: {$object->getTitle()}

{include file='userNotice'} {if $diff} +
+
+
+

{lang}wcf.edit.headline.old{/lang}

+
+
+

{lang}wcf.edit.headline.new{/lang}

+
+
+
{assign var='prevType' value=''} {foreach from=$diff->getRawDiff() item='line'} @@ -24,7 +34,7 @@
{* unmodified, after deletion needs a "fake" insertion *} - {if $line[0] === ' ' && $prevType === '-'}
{/if} + {if $line[0] === ' ' && $prevType === '-'}
{/if} {* unmodified and deleted start a new container *} {if $line[0] === ' ' || $line[0] === '-'}
{/if} @@ -32,18 +42,17 @@ {* adding, without deleting needs a "fake" deletion *} {if $line[0] === '+' && $prevType !== '-'}
-
-
-
+
+
{/if} {if $line[0] === ' '} -
+
{/if} {if $line[0] === '-'} -
+
{/if} -
+ {/if} {if $line[0] === ' '}{$line[1]}
{/if} {if $line[0] === '-'}{$line[1]}
{/if} @@ -51,6 +60,7 @@ {assign var='prevType' value=$line[0]} {/foreach}
+
{/if}
@@ -65,8 +75,8 @@ {lang}wcf.global.objectID{/lang} {lang}wcf.user.username{/lang} - {lang}wcf.edit.time{/lang} {lang}wcf.edit.reason{/lang} + {lang}wcf.edit.time{/lang} {event name='columnHeads'} @@ -81,8 +91,8 @@ {lang}wcf.edit.currentVersion{/lang} {$object->getUsername()} - {@$object->getTime()|time} {$object->getEditReason()} + {@$object->getTime()|time} {event name='columns'} @@ -95,8 +105,8 @@ {@$edit->entryID} {$edit->username} - {@$edit->time|time} {$edit->editReason} + {@$edit->time|time} {event name='columns'} @@ -116,7 +126,7 @@ {@SID_INPUT_TAG} - +
diff --git a/wcfsetup/install/files/style/layout.less b/wcfsetup/install/files/style/layout.less index 95ff873a23..de1cba3902 100644 --- a/wcfsetup/install/files/style/layout.less +++ b/wcfsetup/install/files/style/layout.less @@ -2296,6 +2296,23 @@ ul.inlineDataList { } } +.editHistoryDiff { + > .sideBySide:first-child { + margin-bottom: @wcfGapLarge; + text-align: center; + } + + .sideBySide { + > div:first-child { + padding-right: @wcfGapMedium; + } + + > div:last-child { + padding-left: @wcfGapMedium; + } + } +} + /* ad locations */ .wcfAdLocationHeaderContent, .wcfAdLocationFooterContent, diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 20260f8044..8aece4c544 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2075,6 +2075,8 @@ Fehler sind beispielsweise: username}“ vom {$edit->time|plainTime} wirklich wiederherstellen?]]> username}“ vom {$edit->time|plainTime}]]> + time|plainTime} ({$old->username})]]> + time|plainTime} ({$new->username})]]> diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 88e1695ebb..d448b6cdc1 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2073,6 +2073,8 @@ Errors are: time|plainTime}, created by “{$edit->username}”?]]> time|plainTime}, created by “{$edit->username}”]]> + time|plainTime} ({$old->username})]]> + time|plainTime} ({$new->username})]]> -- 2.20.1