edit-history styling overhaul
authorMarcel Werk <burntime@woltlab.com>
Mon, 22 Sep 2014 13:56:12 +0000 (15:56 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 22 Sep 2014 13:56:12 +0000 (15:56 +0200)
com.woltlab.wcf/templates/editHistory.tpl
wcfsetup/install/files/style/layout.less
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index f24b23eb37a41113bdb5b664ad4a568b07ae5c7e..157b7b9c25eeb2ac049b0a721dddafd0622741c8 100644 (file)
 {include file='header'}
 
 <header class="boxHeadline">
-       <h1>{$object->getTitle()}</h1>
+       <h1>{lang}wcf.edit.versions{/lang}: {$object->getTitle()}</h1>
 </header>
 
 {include file='userNotice'}
 
 {if $diff}
+<div class="container containerPadding marginTop editHistoryDiff">
+       <div class="sideBySide">
+               <div class="containerHeadline">
+                       <h3>{lang}wcf.edit.headline.old{/lang}</h3>
+               </div>
+               <div class="containerHeadline">
+                       <h3>{lang}wcf.edit.headline.new{/lang}</h3>
+               </div>
+       </div>
+
 <div><div>
 {assign var='prevType' value=''}
 {foreach from=$diff->getRawDiff() item='line'}
@@ -24,7 +34,7 @@
        </div>
        
        {* unmodified, after deletion needs a "fake" insertion *}
-       {if $line[0] === ' ' && $prevType === '-'}<div class="containerPadding"></div>{/if}
+       {if $line[0] === ' ' && $prevType === '-'}<div></div>{/if}
        
        {* unmodified and deleted start a new container *}
        {if $line[0] === ' ' || $line[0] === '-'}</div>{/if}
        {* adding, without deleting needs a "fake" deletion *}
        {if $line[0] === '+' && $prevType !== '-'}
                </div>
-               <div class="container marginTop sideBySide">
-                       <div class="containerPadding">
-                       </div>
+               <div class="sideBySide">
+                       <div></div>
        {/if}
        
        {if $line[0] === ' '}
-               <div class="container marginTop">
+               <div>
        {/if}
        {if $line[0] === '-'}
-               <div class="container marginTop sideBySide">
+               <div class="sideBySide">
        {/if}
-       <div class="containerPadding"{if $line[0] === '+'} style="color: green;"{elseif $line[0] === '-'} style="color: red;"{/if}>
+       <div{if $line[0] === '+'} style="color: green;"{elseif $line[0] === '-'} style="color: red;"{/if}>
 {/if}
 {if $line[0] === ' '}{$line[1]}<br />{/if}
 {if $line[0] === '-'}{$line[1]}<br />{/if}
@@ -51,6 +60,7 @@
 {assign var='prevType' value=$line[0]}
 {/foreach}
 </div></div>
+</div>
 {/if}
 
 <form action="{link controller='EditHistory'}{/link}" method="post">
@@ -65,8 +75,8 @@
                                <tr>
                                        <th class="columnID columnEditID" colspan="2">{lang}wcf.global.objectID{/lang}</th>
                                        <th class="columnText columnUser">{lang}wcf.user.username{/lang}</th>
-                                       <th class="columnText columnTime">{lang}wcf.edit.time{/lang}</th>
                                        <th class="columnText columnEditReason">{lang}wcf.edit.reason{/lang}</th>
+                                       <th class="columnDate columnTime">{lang}wcf.edit.time{/lang}</th>
                                        
                                        {event name='columnHeads'}
                                </tr>
@@ -81,8 +91,8 @@
                                        </td>
                                        <td class="columnID"><strong>{lang}wcf.edit.currentVersion{/lang}</strong></td>
                                        <td class="columnText columnUser"><a href="{link controller='User' id=$object->getUserID() title=$object->getUsername()}{/link}">{$object->getUsername()}</a></td>
-                                       <td class="columnText columnTime">{@$object->getTime()|time}</td>
                                        <td class="columnText columnEditReason">{$object->getEditReason()}</td>
+                                       <td class="columnDate columnTime">{@$object->getTime()|time}</td>
                                        
                                        {event name='columns'}
                                </tr>
                                                </td>
                                                <td class="columnID">{@$edit->entryID}</td>
                                                <td class="columnText columnUser"><a href="{link controller='User' id=$edit->userID title=$edit->username}{/link}">{$edit->username}</a></td>
-                                               <td class="columnText columnTime">{@$edit->time|time}</td>
                                                <td class="columnText columnEditReason">{$edit->editReason}</td>
+                                               <td class="columnDate columnTime">{@$edit->time|time}</td>
                                                
                                                {event name='columns'}
                                        </tr>
                {@SID_INPUT_TAG}
                <input type="hidden" name="objectID" value="{$objectID}" />
                <input type="hidden" name="objectType" value="{$objectType->objectType}" />
-               <button class="button" data-type="submit">{lang}wcf.edit.button.compare{/lang}</button>
+               <button class="button buttonPrimary" data-type="submit">{lang}wcf.edit.button.compare{/lang}</button>
        </div>
 </form>
 
index 95ff873a23132749b2c9208d65068ac573f261b4..de1cba3902fec6aa5305794f908d766c95159cde 100644 (file)
@@ -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,
index 20260f80440d8b1786b99d2fe9e751091e6900e6..8aece4c5447ff323463c8475b11dead89ec60489 100644 (file)
@@ -2075,6 +2075,8 @@ Fehler sind beispielsweise:
                <item name="wcf.edit.revert.sure"><![CDATA[Möchten Sie die Version von „{$edit->username}“ vom {$edit->time|plainTime} wirklich wiederherstellen?]]></item>
                <item name="wcf.edit.reverted"><![CDATA[Wiederhergestellt auf Version von „{$edit->username}“ vom {$edit->time|plainTime}]]></item>
                <item name="wcf.edit.button.compare"><![CDATA[Vergleichen]]></item>
+               <item name="wcf.edit.headline.old"><![CDATA[{if $oldID == 'current'}Aktuelle {/if}Version vom {@$old->time|plainTime} ({$old->username})]]></item>
+               <item name="wcf.edit.headline.new"><![CDATA[{if $newID == 'current'}Aktuelle {/if}Version vom {@$new->time|plainTime} ({$new->username})]]></item>
        </category>
        
        <category name="wcf.global">
index 88e1695ebb602cc1e3117dd96bbb3db9eedf7889..d448b6cdc1b6236c02bad97cfbf5cf2c28085940 100644 (file)
@@ -2073,6 +2073,8 @@ Errors are:
                <item name="wcf.edit.revert.sure"><![CDATA[Do you really want to revert to the version at {$edit->time|plainTime}, created by “{$edit->username}”?]]></item>
                <item name="wcf.edit.reverted"><![CDATA[Reverted to the version at {$edit->time|plainTime}, created by “{$edit->username}”]]></item>
                <item name="wcf.edit.button.compare"><![CDATA[Compare]]></item>
+               <item name="wcf.edit.headline.old"><![CDATA[TODO: {if $oldID == 'current'}Aktuelle {/if}Version vom {@$old->time|plainTime} ({$old->username})]]></item>
+               <item name="wcf.edit.headline.new"><![CDATA[TODO: {if $newID == 'current'}Aktuelle {/if}Version vom {@$new->time|plainTime} ({$new->username})]]></item>
        </category>
        
        <category name="wcf.global">