Updated markup and CSS for attachment_view
This commit is contained in:
parent
3a0c6d6c6d
commit
730c173238
@ -210,7 +210,7 @@ class AttachmentListItem extends Widget
|
|||||||
function showRepresentation() {
|
function showRepresentation() {
|
||||||
$thumbnail = File_thumbnail::staticGet('file_id', $this->attachment->id);
|
$thumbnail = File_thumbnail::staticGet('file_id', $this->attachment->id);
|
||||||
if (!empty($thumbnail)) {
|
if (!empty($thumbnail)) {
|
||||||
$this->out->element('img', array('alt' => 'nothing to say', 'src' => $thumbnail->url, 'width' => $thumbnail->width, 'height' => $thumbnail->height));
|
$this->out->element('img', array('alt' => '', 'src' => $thumbnail->url, 'width' => $thumbnail->width, 'height' => $thumbnail->height));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,39 +244,47 @@ class AttachmentListItem extends Widget
|
|||||||
class Attachment extends AttachmentListItem
|
class Attachment extends AttachmentListItem
|
||||||
{
|
{
|
||||||
function showLink() {
|
function showLink() {
|
||||||
|
$this->out->elementStart('div', array('id' => 'attachment_view',
|
||||||
|
'class' => 'hentry'));
|
||||||
|
$this->out->elementStart('div', 'entry-title');
|
||||||
$this->out->elementStart('a', $this->linkAttr());
|
$this->out->elementStart('a', $this->linkAttr());
|
||||||
$this->out->element('span', null, $this->linkTitle());
|
$this->out->element('span', null, $this->linkTitle());
|
||||||
$this->showRepresentation();
|
$this->showRepresentation();
|
||||||
$this->out->elementEnd('a');
|
$this->out->elementEnd('a');
|
||||||
|
$this->out->elementEnd('div');
|
||||||
|
|
||||||
if (empty($this->oembed->author_name) && empty($this->oembed->provider)) {
|
if ($this->oembed->author_name || $this->oembed->provider) {
|
||||||
return;
|
$this->out->elementStart('div', array('id' => 'oembed_info',
|
||||||
}
|
'class' => 'entry-content'));
|
||||||
|
if (!empty($this->oembed->author_name)) {
|
||||||
$this->out->elementStart('dl', 'oembed_info');
|
$this->out->elementStart('dl', 'vcard author');
|
||||||
|
$this->out->element('dt', null, _('Author'));
|
||||||
if (!empty($this->oembed->author_name)) {
|
$this->out->elementStart('dd', 'fn');
|
||||||
$this->out->element('dt', null, _('Author:'));
|
if (empty($this->oembed->author_url)) {
|
||||||
|
$this->out->text($this->oembed->author_name);
|
||||||
$this->out->elementStart('dd');
|
} else {
|
||||||
if (empty($this->oembed->author_url)) {
|
$this->out->element('a', array('href' => $this->oembed->author_url,
|
||||||
$this->out->text($this->oembed->author_name);
|
'class' => 'url'), $this->oembed->author_name);
|
||||||
} else {
|
}
|
||||||
$this->out->element('a', array('href' => $this->oembed->author_url), $this->oembed->author_name);
|
$this->out->elementEnd('dd');
|
||||||
|
$this->out->elementEnd('dl');
|
||||||
}
|
}
|
||||||
$this->out->elementEnd('dd');
|
if (!empty($this->oembed->provider)) {
|
||||||
}
|
$this->out->elementStart('dl', 'vcard');
|
||||||
if (!empty($this->oembed->provider)) {
|
$this->out->element('dt', null, _('Provider'));
|
||||||
$this->out->element('dt', null, _('Provider:'));
|
$this->out->elementStart('dd', 'fn');
|
||||||
$this->out->elementStart('dd');
|
if (empty($this->oembed->provider_url)) {
|
||||||
if (empty($this->oembed->provider_url)) {
|
$this->out->text($this->oembed->provider);
|
||||||
$this->out->text($this->oembed->provider);
|
} else {
|
||||||
} else {
|
$this->out->element('a', array('href' => $this->oembed->provider_url,
|
||||||
$this->out->element('a', array('href' => $this->oembed->provider_url), $this->oembed->provider);
|
'class' => 'url'), $this->oembed->provider);
|
||||||
|
}
|
||||||
|
$this->out->elementEnd('dd');
|
||||||
|
$this->out->elementEnd('dl');
|
||||||
}
|
}
|
||||||
$this->out->elementEnd('dd');
|
$this->out->elementEnd('div');
|
||||||
}
|
}
|
||||||
$this->out->elementEnd('dl');
|
$this->out->elementEnd('div');
|
||||||
}
|
}
|
||||||
|
|
||||||
function show() {
|
function show() {
|
||||||
|
@ -1018,6 +1018,22 @@ border-radius:7px;
|
|||||||
-webkit-border-radius:7px;
|
-webkit-border-radius:7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#attachment_view #oembed_info {
|
||||||
|
margin-top:11px;
|
||||||
|
}
|
||||||
|
#attachment_view #oembed_info dt,
|
||||||
|
#attachment_view #oembed_info dd {
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
#attachment_view #oembed_info dt {
|
||||||
|
clear:left;
|
||||||
|
margin-right:11px;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
#attachment_view #oembed_info dt:after {
|
||||||
|
content: ":";
|
||||||
|
}
|
||||||
|
|
||||||
#usergroups #new_group {
|
#usergroups #new_group {
|
||||||
float: left;
|
float: left;
|
||||||
margin-right: 2em;
|
margin-right: 2em;
|
||||||
@ -1284,9 +1300,3 @@ display:none;
|
|||||||
.guide {
|
.guide {
|
||||||
clear:both;
|
clear:both;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.oembed_info dt,
|
|
||||||
dl.oembed_info dd {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user