mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
#2969 - Forum template BS4 fixes for 'caret' class (dropdown buttons)
And right floating of the options in the postoptions shortcode.
This commit is contained in:
@@ -844,19 +844,24 @@
|
|||||||
$text = '<div class="btn-group pull-right">
|
$text = '<div class="btn-group pull-right">
|
||||||
<button class="btn btn-default btn-secondary btn-sm btn-small dropdown-toggle" data-toggle="dropdown">
|
<button class="btn btn-default btn-secondary btn-sm btn-small dropdown-toggle" data-toggle="dropdown">
|
||||||
' . LAN_FORUM_8013 . '
|
' . LAN_FORUM_8013 . '
|
||||||
<span class="caret"></span>
|
';
|
||||||
|
if(BOOTSTRAP !== 4)
|
||||||
|
{
|
||||||
|
$text .= '<span class="caret"></span>';
|
||||||
|
}
|
||||||
|
$text .= '
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu pull-right text-right">';
|
<ul class="dropdown-menu pull-right text-right">';
|
||||||
|
|
||||||
|
|
||||||
$text .= "<li class='text-right'><a href='" . e_HTTP . "email.php?plugin:forum." . $this->postInfo['post_thread'] . "'>" . LAN_FORUM_2044 . " " . $tp->toGlyph('fa-envelope') . "</a></li>";
|
$text .= "<li class='text-right float-right float-right'><a href='" . e_HTTP . "email.php?plugin:forum." . $this->postInfo['post_thread'] . "'>" . LAN_FORUM_2044 . " " . $tp->toGlyph('fa-envelope') . "</a></li>";
|
||||||
$text .= "<li class='text-right'><a href='" . e_HTTP . "print.php?plugin:forum." . $this->postInfo['post_thread'] . "'>" . LAN_FORUM_2045 . " " . $tp->toGlyph('fa-print') . "</a></li>"; // FIXME
|
$text .= "<li class='text-right float-right'><a href='" . e_HTTP . "print.php?plugin:forum." . $this->postInfo['post_thread'] . "'>" . LAN_FORUM_2045 . " " . $tp->toGlyph('fa-print') . "</a></li>"; // FIXME
|
||||||
|
|
||||||
if(USER) // Report
|
if(USER) // Report
|
||||||
{
|
{
|
||||||
$urlReport = e107::url('forum', 'post') . "?f=report&id=" . $this->postInfo['post_thread'] . "&post=" . $this->postInfo['post_id'];
|
$urlReport = e107::url('forum', 'post') . "?f=report&id=" . $this->postInfo['post_thread'] . "&post=" . $this->postInfo['post_id'];
|
||||||
// $urlReport = $this->e107->url->create('forum/thread/report', "id={$this->postInfo['post_thread']}&post={$this->postInfo['post_id']}");
|
// $urlReport = $this->e107->url->create('forum/thread/report', "id={$this->postInfo['post_thread']}&post={$this->postInfo['post_id']}");
|
||||||
$text .= "<li class='text-right'><a href='" . $urlReport . "'>" . LAN_FORUM_2046 . " " . $tp->toGlyph('fa-flag') . "</a></li>";
|
$text .= "<li class='text-right float-right'><a href='" . $urlReport . "'>" . LAN_FORUM_2046 . " " . $tp->toGlyph('fa-flag') . "</a></li>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edit
|
// Edit
|
||||||
@@ -866,7 +871,7 @@
|
|||||||
|
|
||||||
$url = e107::url('forum', 'post') . "?f=edit&id=" . $this->postInfo['post_thread'] . "&post=" . $this->postInfo['post_id'];
|
$url = e107::url('forum', 'post') . "?f=edit&id=" . $this->postInfo['post_thread'] . "&post=" . $this->postInfo['post_id'];
|
||||||
//$url = e107::getUrl()->create('forum/thread/edit', array('id' => $this->postInfo['post_thread'], 'post'=>$this->postInfo['post_id']));
|
//$url = e107::getUrl()->create('forum/thread/edit', array('id' => $this->postInfo['post_thread'], 'post'=>$this->postInfo['post_id']));
|
||||||
$text .= "<li class='text-right'><a href='" . $url . "'>" . LAN_EDIT . " " . $tp->toGlyph('fa-edit') . "</a></li>";
|
$text .= "<li class='text-right float-right'><a href='" . $url . "'>" . LAN_EDIT . " " . $tp->toGlyph('fa-edit') . "</a></li>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -877,7 +882,7 @@
|
|||||||
* AND if this post is the last post in the thread */
|
* AND if this post is the last post in the thread */
|
||||||
if($this->thread->threadInfo['thread_active'] && empty($this->postInfo['thread_start']) )
|
if($this->thread->threadInfo['thread_active'] && empty($this->postInfo['thread_start']) )
|
||||||
{
|
{
|
||||||
$text .= "<li class='text-right'><a href='" . e_REQUEST_URI . "' data-forum-action='deletepost' data-forum-post='" . $this->postInfo['post_id'] . "'>" . LAN_DELETE . " " . $tp->toGlyph('fa-trash') . "</a></li>";
|
$text .= "<li class='text-right float-right'><a href='" . e_REQUEST_URI . "' data-forum-action='deletepost' data-forum-post='" . $this->postInfo['post_id'] . "'>" . LAN_DELETE . " " . $tp->toGlyph('fa-trash') . "</a></li>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -885,9 +890,9 @@
|
|||||||
{
|
{
|
||||||
$url = e107::url('forum', 'post') . "?f=quote&id=" . $this->postInfo['post_thread'] . "&post=" . $this->postInfo['post_id'];
|
$url = e107::url('forum', 'post') . "?f=quote&id=" . $this->postInfo['post_thread'] . "&post=" . $this->postInfo['post_id'];
|
||||||
//$url = e107::getUrl()->create('forum/thread/quote', array('id' => $this->postInfo['post_thread'], 'post'=>$this->postInfo['post_id']));
|
//$url = e107::getUrl()->create('forum/thread/quote', array('id' => $this->postInfo['post_thread'], 'post'=>$this->postInfo['post_id']));
|
||||||
$text .= "<li class='text-right'><a href='" . $url . "'>" . LAN_FORUM_2041 . " " . $tp->toGlyph('fa-share-alt') . "</a></li>";
|
$text .= "<li class='text-right float-right'><a href='" . $url . "'>" . LAN_FORUM_2041 . " " . $tp->toGlyph('fa-share-alt') . "</a></li>";
|
||||||
|
|
||||||
// $text .= "<li class='text-right'><a href='".e107::getUrl()->create('forum/thread/quote', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2041." ".$tp->toGlyph('share-alt')."</a></li>";
|
// $text .= "<li class='text-right float-right'><a href='".e107::getUrl()->create('forum/thread/quote', array('id' => $this->postInfo['post_id']))."'>".LAN_FORUM_2041." ".$tp->toGlyph('share-alt')."</a></li>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -904,24 +909,24 @@
|
|||||||
$url = e107::url('forum', 'post') . "?f=edit&id=" . $this->postInfo['post_thread'] . "&post=" . $this->postInfo['post_id'];
|
$url = e107::url('forum', 'post') . "?f=edit&id=" . $this->postInfo['post_thread'] . "&post=" . $this->postInfo['post_id'];
|
||||||
// $url = e107::getUrl()->create('forum/thread/edit', array('id' => $this->postInfo['post_thread'], 'post'=>$this->postInfo['post_id']));
|
// $url = e107::getUrl()->create('forum/thread/edit', array('id' => $this->postInfo['post_thread'], 'post'=>$this->postInfo['post_id']));
|
||||||
|
|
||||||
$text .= "<li class='text-right'><a href='" . $url . "'>" . LAN_EDIT . " " . $tp->toGlyph('fa-edit') . "</a></li>";
|
$text .= "<li class='text-right float-right'><a href='" . $url . "'>" . LAN_EDIT . " " . $tp->toGlyph('fa-edit') . "</a></li>";
|
||||||
}
|
}
|
||||||
|
|
||||||
// only show delete button when post is not the initial post of the topic
|
// only show delete button when post is not the initial post of the topic
|
||||||
// if(!$this->forum->threadDetermineInitialPost($this->postInfo['post_id']))
|
// if(!$this->forum->threadDetermineInitialPost($this->postInfo['post_id']))
|
||||||
if(empty($this->postInfo['thread_start']))
|
if(empty($this->postInfo['thread_start']))
|
||||||
{
|
{
|
||||||
$text .= "<li class='text-right'><a href='" . e_REQUEST_URI . "' data-forum-action='deletepost' data-forum-post='" . $this->postInfo['post_id'] . "'>" . LAN_DELETE . " " . $tp->toGlyph('fa-trash') . "</a></li>";
|
$text .= "<li class='text-right float-right'><a href='" . e_REQUEST_URI . "' data-forum-action='deletepost' data-forum-post='" . $this->postInfo['post_id'] . "'>" . LAN_DELETE . " " . $tp->toGlyph('fa-trash') . "</a></li>";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($type == 'thread')
|
if($type == 'thread')
|
||||||
{
|
{
|
||||||
$url = e107::url('forum', 'move', array('thread_id' => $this->postInfo['post_thread']));
|
$url = e107::url('forum', 'move', array('thread_id' => $this->postInfo['post_thread']));
|
||||||
$text .= "<li class='text-right'><a href='" . $url . "'>" . LAN_FORUM_2042 . " " . $tp->toGlyph('fa-arrows') . "</a></li>";
|
$text .= "<li class='text-right float-right'><a href='" . $url . "'>" . LAN_FORUM_2042 . " " . $tp->toGlyph('fa-arrows') . "</a></li>";
|
||||||
}
|
}
|
||||||
elseif(e_DEVELOPER === true) //TODO
|
elseif(e_DEVELOPER === true) //TODO
|
||||||
{
|
{
|
||||||
$text .= "<li class='text-right'><a href='" . e107::url('forum', 'split', array('thread_id' => $this->postInfo['post_thread'], 'post_id' => $this->postInfo['post_id'])) . "'>" . LAN_FORUM_2043 . " " . $tp->toGlyph('fa-cut') . "</a></li>";
|
$text .= "<li class='text-right float-right'><a href='" . e107::url('forum', 'split', array('thread_id' => $this->postInfo['post_thread'], 'post_id' => $this->postInfo['post_id'])) . "'>" . LAN_FORUM_2043 . " " . $tp->toGlyph('fa-cut') . "</a></li>";
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user