mirror of
https://github.com/e107inc/e107.git
synced 2025-08-19 04:41:53 +02:00
Reduce NPath complexity in plugin_forum_viewforum_shortcodes
Method plugin_forum_viewforum_shortcodes::sc_newthreadbuttonx()
This commit is contained in:
@@ -96,12 +96,24 @@
|
||||
<ul class="dropdown-menu pull-right">
|
||||
';
|
||||
*/
|
||||
$href = "#";
|
||||
$disabled = " disabled";
|
||||
$restricted_to_members_only = " data-toggle='tooltip' title='".LAN_FORUM_0006."'
|
||||
style='cursor: not-allowed; pointer-events: all !important;'";
|
||||
$extra_space = "<span> </span>";
|
||||
if ($this->var['ntUrl'])
|
||||
{
|
||||
$href = $this->var['ntUrl'];
|
||||
$disabled = "";
|
||||
$restricted_to_members_only = "";
|
||||
$extra_space = "";
|
||||
}
|
||||
|
||||
$text .=
|
||||
'<a href="'.($this->var['ntUrl'] ?:"#").
|
||||
'" class="btn btn-primary'.($this->var['ntUrl'] ?"":" disabled").'"'
|
||||
.($this->var['ntUrl'] ?"":" data-toggle='tooltip' title='".LAN_FORUM_0006."'
|
||||
style='cursor: not-allowed; pointer-events: all !important;'").'>'.LAN_FORUM_1018.'</a>
|
||||
'.($this->var['ntUrl'] ?"":"<span> </span>").'
|
||||
'<a href="'.$href.
|
||||
'" class="btn btn-primary'.$disabled.'"'
|
||||
.$restricted_to_members_only.'>'.LAN_FORUM_1018.'</a>
|
||||
'.$extra_space.'
|
||||
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
|
||||
';
|
||||
if($bootstrap !== 4)
|
||||
|
Reference in New Issue
Block a user