Permalink
Browse files

Added styling to status and links in MA

Signed-off-by: Aram <aram@aabweb.co.uk>
  • Loading branch information...
1 parent d3157c4 commit 363f4dc9b5be7680f06db1672fb99f7b1105278e Aram committed Jan 24, 2012
@@ -127,13 +127,13 @@ public function getCMSFields()
if($this->ID)
{
$color = '#E88F31';
- $links = '<a target="_blank" href="' . $this->Link('?stage=Stage') . '">View Draft</a>';
+ $links = '<a target="_blank" href="' . $this->Link('?stage=Stage') . '">Draft</a>';
$status = $this->Status;
if($this->Status == 'Published')
{
$color = '#000';
- $links .= ' | <a target="_blank" href="' . $this->Link('?stage=Live') . '">View Published</a>';
+ $links .= ' | <a target="_blank" href="' . $this->Link('?stage=Live') . '">Published</a>';
if($this->hasChangesOnStage())
{
@@ -143,8 +143,13 @@ public function getCMSFields()
}
$fields->insertFirst(new LiteralField('',
- '<h3 style=" Padding: 5px; border: 1px solid #ccc;background:#fff;margin-bottom: 10px;">
- <strong style="font-size: 16px;color: '.$color.';">'. $status . '</strong> - ' . $links .'</h3>'
+ '<div class="doapToolbar">
+ <h3 class="doapTitle" style="background: '.$color.';">'. $status . '</h3>
+ <p class="doapViewLinks">
+ View:' . $links . '
+ </p>
+ </div>
+ '
));
}
@@ -10,6 +10,7 @@ public function init()
// Remove all the junk that will break ModelAdmin
Requirements::javascript(MOD_DOAP_DIR . '/javascript/jquery.dataobjectaspageadmin.js');
+ Requirements::CSS(MOD_DOAP_DIR . '/css/dataobjectaspageadmin.css');
}
}
@@ -0,0 +1,42 @@
+.doapToolbar{
+ border: 1px solid #ccc;
+ background: #fff;
+ margin-bottom: 15px;
+ height: 25px;
+ padding: 5px;
+}
+
+.doapToolbar h3.doapTitle{
+ padding: 5px;
+ border: 1px solid #ccc;
+ background:#fff;
+ margin-bottom: 10px;
+ font-size: 12px;
+ float: left;
+ padding: 5px 10px;
+ border: #ccc;
+ background: #aaa;
+ color: #fff;
+ border-radius: 4px;
+ font-weight: normal;
+ margin: 0;
+}
+ #right .doapToolbar p.doapViewLinks{
+ float: right;
+ padding: 0;
+ margin: 0;
+ }
+ .doapToolbar p.doapViewLinks a{
+ display: inline-block;
+ border-radius: 4px;
+ border: 1px solid #555;
+ background: #999;
+ color: #fff;
+ padding: 3px 10px;
+ margin: 0 5px;
+ text-decoration: none;
+ font-size: 14px;
+ }
+ .doapToolbar p.doapViewLinks a:hover{
+ background: #aaa;
+ }

0 comments on commit 363f4dc

Please sign in to comment.