aboutsummaryrefslogtreecommitdiff
path: root/app/views/helpers/index/normal/entry_bottom.phtml
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <aledeg@users.noreply.github.com> 2017-11-04 21:19:51 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-11-04 21:19:51 +0100
commitafffbfce0758391a52c8c0c5b9766643a49065e8 (patch)
tree0e9e37ab03d954672f45783d22c58c78876b0531 /app/views/helpers/index/normal/entry_bottom.phtml
parent05b1901fcdbb051077d12f776980484d3b782970 (diff)
Add a Mastodon share (#1674)
See #1521
Diffstat (limited to 'app/views/helpers/index/normal/entry_bottom.phtml')
-rw-r--r--app/views/helpers/index/normal/entry_bottom.phtml9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml
index a9d5a80ca..bc23938b0 100644
--- a/app/views/helpers/index/normal/entry_bottom.phtml
+++ b/app/views/helpers/index/normal/entry_bottom.phtml
@@ -52,7 +52,14 @@
$share_options['title'] = $title;
$share->update($share_options);
?><li class="item share">
- <a target="_blank" rel="noreferrer" href="<?php echo $share->url(); ?>"><?php echo $share->name(); ?></a>
+ <?php if ('GET' === $share->method()) {?>
+ <a target="_blank" rel="noreferrer" href="<?php echo $share->url(); ?>"><?php echo $share->name(); ?></a>
+ <?php } else {?>
+ <a href="POST"><?php echo $share->name(); ?></a>
+ <form method="POST" data-url="<?php echo $share->url(); ?>">
+ <input type="hidden" value="<?php echo $link; ?>" name="<?php echo $share->field(); ?>"/>
+ </form>
+ <?php } ?>
</li><?php
}
?></ul>