Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
This commit is contained in:
commit
f28fa0ab5a
@ -22,32 +22,40 @@ class Mail extends \Zotlabs\Web\Controller {
|
||||
$recipient = ((x($_REQUEST,'messageto')) ? notags(trim($_REQUEST['messageto'])) : '');
|
||||
$rstr = ((x($_REQUEST,'messagerecip')) ? notags(trim($_REQUEST['messagerecip'])) : '');
|
||||
$preview = ((x($_REQUEST,'preview')) ? intval($_REQUEST['preview']) : 0);
|
||||
$expires = ((x($_REQUEST,'expires')) ? datetime_convert(date_default_timezone_get(),'UTC', $_REQUEST['expires']) : NULL_DATE);
|
||||
$expires = ((x($_REQUEST,'expires')) ? datetime_convert(date_default_timezone_get(),'UTC', $_REQUEST['expires']) : NULL_DATE);
|
||||
$raw = ((x($_REQUEST,'raw')) ? intval($_REQUEST['raw']) : 0);
|
||||
$mimetype = ((x($_REQUEST,'mimetype')) ? notags(trim($_REQUEST['mimetype'])) : 'text/bbcode');
|
||||
|
||||
if($preview) {
|
||||
|
||||
$body = cleanup_bbcode($body);
|
||||
$results = linkify_tags($a, $body, local_channel());
|
||||
if($raw) {
|
||||
$body = mail_prepare_binary(['id' => 'M0']);
|
||||
echo json_encode(['preview' => $body]);
|
||||
}
|
||||
else {
|
||||
$body = cleanup_bbcode($body);
|
||||
$results = linkify_tags($a, $body, local_channel());
|
||||
|
||||
if(preg_match_all('/(\[attachment\](.*?)\[\/attachment\])/',$body,$match)) {
|
||||
$attachments = array();
|
||||
foreach($match[2] as $mtch) {
|
||||
$hash = substr($mtch,0,strpos($mtch,','));
|
||||
$rev = intval(substr($mtch,strpos($mtch,',')));
|
||||
$r = attach_by_hash_nodata($hash,get_observer_hash(),$rev);
|
||||
if($r['success']) {
|
||||
$attachments[] = array(
|
||||
'href' => z_root() . '/attach/' . $r['data']['hash'],
|
||||
'length' => $r['data']['filesize'],
|
||||
'type' => $r['data']['filetype'],
|
||||
'title' => urlencode($r['data']['filename']),
|
||||
'revision' => $r['data']['revision']
|
||||
);
|
||||
if(preg_match_all('/(\[attachment\](.*?)\[\/attachment\])/',$body,$match)) {
|
||||
$attachments = array();
|
||||
foreach($match[2] as $mtch) {
|
||||
$hash = substr($mtch,0,strpos($mtch,','));
|
||||
$rev = intval(substr($mtch,strpos($mtch,',')));
|
||||
$r = attach_by_hash_nodata($hash,get_observer_hash(),$rev);
|
||||
if($r['success']) {
|
||||
$attachments[] = array(
|
||||
'href' => z_root() . '/attach/' . $r['data']['hash'],
|
||||
'length' => $r['data']['filesize'],
|
||||
'type' => $r['data']['filetype'],
|
||||
'title' => urlencode($r['data']['filename']),
|
||||
'revision' => $r['data']['revision']
|
||||
);
|
||||
}
|
||||
$body = trim(str_replace($match[1],'',$body));
|
||||
}
|
||||
$body = trim(str_replace($match[1],'',$body));
|
||||
echo json_encode(['preview' => zidify_links(smilies(bbcode($body)))]);
|
||||
}
|
||||
}
|
||||
echo json_encode(['preview' => zidify_links(smilies(bbcode($body)))]);
|
||||
killme();
|
||||
}
|
||||
|
||||
@ -102,36 +110,10 @@ class Mail extends \Zotlabs\Web\Controller {
|
||||
}
|
||||
}
|
||||
|
||||
// if(feature_enabled(local_channel(),'richtext')) {
|
||||
// $body = fix_mce_lf($body);
|
||||
// }
|
||||
|
||||
require_once('include/text.php');
|
||||
linkify_tags($a, $body, local_channel());
|
||||
|
||||
// I don't think this is used any more.
|
||||
|
||||
if($preview) {
|
||||
$mail = [
|
||||
'mailbox' => 'outbox',
|
||||
'id' => 0,
|
||||
'mid' => 'M0',
|
||||
'from_name' => $channel['xchan_name'],
|
||||
'from_url' => $channel['xchan_url'],
|
||||
'from_photo' => $channel['xchan_photo_s'],
|
||||
'subject' => zidify_links(smilies(bbcode($subject))),
|
||||
'body' => zidify_links(smilies(bbcode($body))),
|
||||
'attachments' => '',
|
||||
'can_recall' => false,
|
||||
'is_recalled' => '',
|
||||
'date' => datetime_convert('UTC',date_default_timezone_get(),$message['created'], 'c')
|
||||
];
|
||||
|
||||
echo replace_macros(get_markup_template('mail_conv.tpl'), [ '$mail' => $mail ] );
|
||||
killme();
|
||||
|
||||
}
|
||||
|
||||
if(! $recipient) {
|
||||
notice('No recipient found.');
|
||||
\App::$argc = 2;
|
||||
@ -141,7 +123,7 @@ class Mail extends \Zotlabs\Web\Controller {
|
||||
|
||||
// We have a local_channel, let send_message use the session channel and save a lookup
|
||||
|
||||
$ret = send_message(0, $recipient, $body, $subject, $replyto, $expires);
|
||||
$ret = send_message(0, $recipient, $body, $subject, $replyto, $expires, $mimetype, $raw);
|
||||
|
||||
if($ret['success']) {
|
||||
xchan_mail_query($ret['mail']);
|
||||
|
@ -353,14 +353,6 @@ function localize_item(&$item){
|
||||
}
|
||||
*/
|
||||
|
||||
// if item body was obscured and we changed it, re-obscure it
|
||||
// FIXME - we need a better filter than just the string 'data'; try and
|
||||
// match the fact that it's json encoded
|
||||
|
||||
if(intval($item['item_obscured'])
|
||||
&& strlen($item['body']) && (! strpos($item['body'],'data'))) {
|
||||
$item['body'] = z_obscure($item['body']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1359,6 +1359,8 @@ function encode_mail($item,$extended = false) {
|
||||
$x['body'] = $item['body'];
|
||||
$x['from'] = encode_item_xchan($item['from']);
|
||||
$x['to'] = encode_item_xchan($item['to']);
|
||||
$x['raw'] = $item['mail_raw'];
|
||||
$x['mimetype'] = $item['mail_mimetype'];
|
||||
|
||||
if($item['attach'])
|
||||
$x['attach'] = json_decode($item['attach'],true);
|
||||
@ -1392,9 +1394,16 @@ function get_mail_elements($x) {
|
||||
|
||||
$arr = array();
|
||||
|
||||
$arr['body'] = (($x['body']) ? htmlspecialchars($x['body'], ENT_COMPAT,'UTF-8',false) : '');
|
||||
$arr['title'] = (($x['title'])? htmlspecialchars($x['title'],ENT_COMPAT,'UTF-8',false) : '');
|
||||
if(intval($x['raw'])) {
|
||||
$arr['mail_raw'] = intval($x['raw']);
|
||||
$arr['body'] = $x['body'];
|
||||
}
|
||||
else {
|
||||
$arr['body'] = (($x['body']) ? htmlspecialchars($x['body'], ENT_COMPAT,'UTF-8',false) : '');
|
||||
}
|
||||
|
||||
$arr['title'] = (($x['title'])? htmlspecialchars($x['title'],ENT_COMPAT,'UTF-8',false) : '');
|
||||
$arr['mail_mimetype'] = (($x['mimetype']) ? htmlspecialchars($x['mimetype'],ENT_COMPAT,'UTF-8',false) : 'text/bbcode');
|
||||
$arr['conv_guid'] = (($x['conv_guid'])? htmlspecialchars($x['conv_guid'],ENT_COMPAT,'UTF-8',false) : '');
|
||||
|
||||
$arr['created'] = datetime_convert('UTC','UTC',$x['created']);
|
||||
@ -3032,8 +3041,10 @@ function mail_store($arr) {
|
||||
$arr['body'] = ((x($arr,'body')) ? trim($arr['body']) : '');
|
||||
$arr['sig'] = ((x($arr,'sig')) ? trim($arr['sig']) : '');
|
||||
$arr['conv_guid'] = ((x($arr,'conv_guid')) ? trim($arr['conv_guid']) : '');
|
||||
$arr['mail_mimetype'] = ((x($arr,'mail_mimetype')) ? trim($arr['mail_mimetype']) : 'text/bbcode');
|
||||
|
||||
$arr['mail_flags'] = ((x($arr,'mail_flags')) ? intval($arr['mail_flags']) : 0 );
|
||||
$arr['mail_raw'] = ((x($arr,'mail_raw')) ? intval($arr['mail_raw']) : 0 );
|
||||
|
||||
if(! $arr['parent_mid']) {
|
||||
logger('mail_store: missing parent');
|
||||
@ -4350,10 +4361,7 @@ function sync_an_item($channel_id,$item_id) {
|
||||
if($r) {
|
||||
xchan_query($r);
|
||||
$sync_item = fetch_post_tags($r);
|
||||
$rid = q("select * from item_id where iid = %d",
|
||||
intval($item_id)
|
||||
);
|
||||
build_sync_packet($channel_d,array('item' => array(encode_item($sync_item[0],true)),'item_id' => $rid));
|
||||
build_sync_packet($channel_d,array('item' => array(encode_item($sync_item[0],true))));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,20 @@
|
||||
require_once('include/crypto.php');
|
||||
require_once('include/attach.php');
|
||||
|
||||
|
||||
function mail_prepare_binary($item) {
|
||||
|
||||
return replace_macros(get_markup_template('item_binary.tpl'), [
|
||||
'$download' => t('Download binary/encrypted content'),
|
||||
'$url' => z_root() . '/mail/' . $item['id'] . '/download'
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
// send a private message
|
||||
|
||||
|
||||
function send_message($uid = 0, $recipient = '', $body = '', $subject = '', $replyto = '', $expires = NULL_DATE) {
|
||||
function send_message($uid = 0, $recipient = '', $body = '', $subject = '', $replyto = '', $expires = NULL_DATE, $mimetype = 'text/bbcode', $raw = false) {
|
||||
|
||||
$ret = array('success' => false);
|
||||
$is_reply = false;
|
||||
@ -192,8 +202,8 @@ function send_message($uid = 0, $recipient = '', $body = '', $subject = '', $rep
|
||||
$sig = ''; // placeholder
|
||||
$mimetype = ''; //placeholder
|
||||
|
||||
$r = q("INSERT INTO mail ( account_id, conv_guid, mail_obscured, channel_id, from_xchan, to_xchan, mail_mimetype, title, body, sig, attach, mid, parent_mid, created, expires, mail_isreply )
|
||||
VALUES ( %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d )",
|
||||
$r = q("INSERT INTO mail ( account_id, conv_guid, mail_obscured, channel_id, from_xchan, to_xchan, mail_mimetype, title, body, sig, attach, mid, parent_mid, created, expires, mail_isreply, mail_raw )
|
||||
VALUES ( %d, '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d )",
|
||||
intval($channel['channel_account_id']),
|
||||
dbesc($conv_guid),
|
||||
intval(1),
|
||||
@ -209,7 +219,8 @@ function send_message($uid = 0, $recipient = '', $body = '', $subject = '', $rep
|
||||
dbesc($replyto),
|
||||
dbesc(datetime_convert()),
|
||||
dbescdate($expires),
|
||||
intval($is_reply)
|
||||
intval($is_reply),
|
||||
intval($raw)
|
||||
);
|
||||
|
||||
// verify the save
|
||||
|
@ -1562,7 +1562,12 @@ function prepare_body(&$item,$attach = false) {
|
||||
}
|
||||
}
|
||||
|
||||
$s .= prepare_text($item['body'],$item['mimetype'], false);
|
||||
if($item['item_obscured']) {
|
||||
$s .= prepare_binary($item);
|
||||
}
|
||||
else {
|
||||
$s .= prepare_text($item['body'],$item['mimetype'], false);
|
||||
}
|
||||
|
||||
$event = (($item['obj_type'] === ACTIVITY_OBJ_EVENT) ? format_event_obj($item['obj']) : false);
|
||||
|
||||
@ -1625,6 +1630,17 @@ function prepare_body(&$item,$attach = false) {
|
||||
return $prep_arr;
|
||||
}
|
||||
|
||||
|
||||
function prepare_binary($item) {
|
||||
return replace_macros(get_markup_template('item_binary.tpl'), [
|
||||
'$download' => t('Download binary/encrypted content'),
|
||||
'$url' => z_root() . '/viewsrc/' . $item['id'] . '/download'
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Given a text string, convert from bbcode to html and add smilie icons.
|
||||
*
|
||||
@ -2897,7 +2913,7 @@ function pdl_selector($uid, $current='') {
|
||||
|
||||
$sql_extra = item_permissions_sql($uid);
|
||||
|
||||
$r = q("select iconfig.*, mid from item_id left join item on iconfig.iid = item.id
|
||||
$r = q("select iconfig.*, mid from iconfig left join item on iconfig.iid = item.id
|
||||
where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'PDL' $sql_extra order by v asc",
|
||||
intval($uid)
|
||||
);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -84,9 +84,9 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="p-2 clearfix wall-item-tools">
|
||||
<div class="wall-item-tools-right pull-right">
|
||||
<div class="float-right wall-item-tools-right">
|
||||
{{if $item.toplevel && $item.emojis && $item.reactions}}
|
||||
<div class="btn-group dropdown">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-react-{{$item.id}}">
|
||||
<i class="fa fa-smile-o"></i>
|
||||
</button>
|
||||
@ -97,7 +97,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="btn-group dropdown">
|
||||
<div class="btn-group">
|
||||
{{if $item.like}}
|
||||
<button type="button" title="{{$item.like.0}}" class="btn btn-outline-secondary btn-sm" onclick="dolike({{$item.id}},'like'); return false;">
|
||||
<i class="fa fa-thumbs-o-up{{if $item.my_responses.like}} ivoted{{/if}}" ></i>
|
||||
@ -109,11 +109,11 @@
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if $item.isevent}}
|
||||
<div class="btn-group dropdown">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-attend-menu-{{$item.id}}" title="{{$item.attend_title}}">
|
||||
<i class="fa fa-calendar-check-o"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item" href="#" title="{{$item.attend.0}}" onclick="itemAddToCal({{$item.id}}); dolike({{$item.id}},'attendyes'); return false;">
|
||||
<i class="item-act-list fa fa-check{{if $item.my_responses.attend}} ivoted{{/if}}" ></i> {{$item.attend.0}}
|
||||
</a>
|
||||
@ -127,11 +127,11 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if $item.canvote}}
|
||||
<div class="btn-group dropdown">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-consensus-menu-{{$item.id}}" title="{{$item.vote_title}}">
|
||||
<i class="fa fa-check-square-o"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu" role="menu" aria-labelledby="wall-item-consensus-menu-{{$item.id}}">
|
||||
<div class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="wall-item-consensus-menu-{{$item.id}}">
|
||||
<a class="dropdown-item" href="#" title="{{$item.conlabels.0}}" onclick="dolike({{$item.id}},'agree'); return false;">
|
||||
<i class="item-act-list fa fa-check{{if $item.my_responses.agree}} ivoted{{/if}}" ></i> {{$item.conlabels.0}}
|
||||
</a>
|
||||
@ -144,51 +144,53 @@
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
|
||||
<i class="fa fa-cog"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="wall-item-menu-{{$item.id}}">
|
||||
{{if $item.share}}
|
||||
<a class="dropdown-item" href="#" onclick="jotShare({{$item.id}}); return false"><i class="generic-icons-nav fa fa-fw fa-retweet" title="{{$item.share.0}}"></i>{{$item.share.0}}</a>
|
||||
{{/if}}
|
||||
{{if $item.plink}}
|
||||
<a class="dropdown-item" href="{{$item.plink.href}}" title="{{$item.plink.title}}" class="u-url"><i class="generic-icons-nav fa fa-fw fa-external-link"></i>{{$item.plink.title}}</a>
|
||||
{{/if}}
|
||||
{{if $item.edpost}}
|
||||
<a class="dropdown-item" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}"><i class="generic-icons-nav fa fa-fw fa-pencil"></i>{{$item.edpost.1}}</a>
|
||||
{{/if}}
|
||||
{{if $item.tagger}}
|
||||
<a class="dropdown-item" href="#" onclick="itemTag({{$item.id}}); return false;"><i id="tagger-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-tag" title="{{$item.tagger.tagit}}"></i>{{$item.tagger.tagit}}</a>
|
||||
{{/if}}
|
||||
{{if $item.filer}}
|
||||
<a class="dropdown-item" href="#" onclick="itemFiler({{$item.id}}); return false;"><i id="filer-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-folder-open" title="{{$item.filer}}"></i>{{$item.filer}}</a>
|
||||
{{/if}}
|
||||
{{if $item.bookmark}}
|
||||
<a class="dropdown-item" href="#" onclick="itemBookmark({{$item.id}}); return false;"><i id="bookmarker-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-bookmark" title="{{$item.bookmark}}"></i>{{$item.bookmark}}</a>
|
||||
{{/if}}
|
||||
{{if $item.addtocal}}
|
||||
<a class="dropdown-item" href="#" onclick="itemAddToCal({{$item.id}}); return false;"><i id="addtocal-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-calendar" title="{{$item.addtocal}}"></i>{{$item.addtocal}}</a>
|
||||
{{/if}}
|
||||
{{if $item.star}}
|
||||
<a class="dropdown-item" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-star {{$item.star.isstarred}}" title="{{$item.star.toggle}}"></i>{{$item.star.toggle}}</a>
|
||||
{{/if}}
|
||||
{{if $item.thread_action_menu}}
|
||||
{{foreach $item.thread_action_menu as $mitem}}
|
||||
<a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} ><i class="generic-icons-nav fa fa-fw fa-{{$mitem.icon}}"></i>{{$mitem.title}}</a>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if $item.drop.dropping}}
|
||||
<a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
|
||||
{{/if}}
|
||||
{{if $item.thread_author_menu}}
|
||||
<div class="dropdown-divider"></div>
|
||||
{{foreach $item.thread_author_menu as $mitem}}
|
||||
<a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} >{{$mitem.title}}</a>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if $item.edpost && $item.dreport}}
|
||||
<a class="dropdown-item" href="dreport/{{$item.mid}}">{{$item.dreport}}</a>
|
||||
{{/if}}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
|
||||
<i class="fa fa-cog"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="wall-item-menu-{{$item.id}}">
|
||||
{{if $item.share}}
|
||||
<a class="dropdown-item" href="#" onclick="jotShare({{$item.id}}); return false"><i class="generic-icons-nav fa fa-fw fa-retweet" title="{{$item.share.0}}"></i>{{$item.share.0}}</a>
|
||||
{{/if}}
|
||||
{{if $item.plink}}
|
||||
<a class="dropdown-item" href="{{$item.plink.href}}" title="{{$item.plink.title}}" class="u-url"><i class="generic-icons-nav fa fa-fw fa-external-link"></i>{{$item.plink.title}}</a>
|
||||
{{/if}}
|
||||
{{if $item.edpost}}
|
||||
<a class="dropdown-item" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}"><i class="generic-icons-nav fa fa-fw fa-pencil"></i>{{$item.edpost.1}}</a>
|
||||
{{/if}}
|
||||
{{if $item.tagger}}
|
||||
<a class="dropdown-item" href="#" onclick="itemTag({{$item.id}}); return false;"><i id="tagger-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-tag" title="{{$item.tagger.tagit}}"></i>{{$item.tagger.tagit}}</a>
|
||||
{{/if}}
|
||||
{{if $item.filer}}
|
||||
<a class="dropdown-item" href="#" onclick="itemFiler({{$item.id}}); return false;"><i id="filer-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-folder-open" title="{{$item.filer}}"></i>{{$item.filer}}</a>
|
||||
{{/if}}
|
||||
{{if $item.bookmark}}
|
||||
<a class="dropdown-item" href="#" onclick="itemBookmark({{$item.id}}); return false;"><i id="bookmarker-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-bookmark" title="{{$item.bookmark}}"></i>{{$item.bookmark}}</a>
|
||||
{{/if}}
|
||||
{{if $item.addtocal}}
|
||||
<a class="dropdown-item" href="#" onclick="itemAddToCal({{$item.id}}); return false;"><i id="addtocal-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-calendar" title="{{$item.addtocal}}"></i>{{$item.addtocal}}</a>
|
||||
{{/if}}
|
||||
{{if $item.star}}
|
||||
<a class="dropdown-item" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-star {{$item.star.isstarred}}" title="{{$item.star.toggle}}"></i>{{$item.star.toggle}}</a>
|
||||
{{/if}}
|
||||
{{if $item.thread_action_menu}}
|
||||
{{foreach $item.thread_action_menu as $mitem}}
|
||||
<a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} ><i class="generic-icons-nav fa fa-fw fa-{{$mitem.icon}}"></i>{{$mitem.title}}</a>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if $item.drop.dropping}}
|
||||
<a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
|
||||
{{/if}}
|
||||
{{if $item.thread_author_menu}}
|
||||
<div class="dropdown-divider"></div>
|
||||
{{foreach $item.thread_author_menu as $mitem}}
|
||||
<a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} >{{$mitem.title}}</a>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if $item.edpost && $item.dreport}}
|
||||
<a class="dropdown-item" href="dreport/{{$item.mid}}">{{$item.dreport}}</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -84,9 +84,9 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="p-2 clearfix wall-item-tools">
|
||||
<div class="wall-item-tools-right pull-right">
|
||||
<div class="float-right wall-item-tools-right">
|
||||
{{if $item.toplevel && $item.emojis && $item.reactions}}
|
||||
<div class="btn-group dropdown">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-react-{{$item.id}}">
|
||||
<i class="fa fa-smile-o"></i>
|
||||
</button>
|
||||
@ -97,7 +97,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="btn-group dropdown">
|
||||
<div class="btn-group">
|
||||
{{if $item.like}}
|
||||
<button type="button" title="{{$item.like.0}}" class="btn btn-outline-secondary btn-sm" onclick="dolike({{$item.id}},'like'); return false;">
|
||||
<i class="fa fa-thumbs-o-up{{if $item.my_responses.like}} ivoted{{/if}}" ></i>
|
||||
@ -109,7 +109,7 @@
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if $item.isevent}}
|
||||
<div class="btn-group dropdown">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-attend-menu-{{$item.id}}" title="{{$item.attend_title}}">
|
||||
<i class="fa fa-calendar-check-o"></i>
|
||||
</button>
|
||||
@ -127,7 +127,7 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if $item.canvote}}
|
||||
<div class="btn-group dropdown">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-consensus-menu-{{$item.id}}" title="{{$item.vote_title}}">
|
||||
<i class="fa fa-check-square-o"></i>
|
||||
</button>
|
||||
@ -144,51 +144,53 @@
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
|
||||
<i class="fa fa-cog"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="wall-item-menu-{{$item.id}}">
|
||||
{{if $item.share}}
|
||||
<a class="dropdown-item" href="#" onclick="jotShare({{$item.id}}); return false"><i class="generic-icons-nav fa fa-fw fa-retweet" title="{{$item.share.0}}"></i>{{$item.share.0}}</a>
|
||||
{{/if}}
|
||||
{{if $item.plink}}
|
||||
<a class="dropdown-item" href="{{$item.plink.href}}" title="{{$item.plink.title}}" class="u-url"><i class="generic-icons-nav fa fa-fw fa-external-link"></i>{{$item.plink.title}}</a>
|
||||
{{/if}}
|
||||
{{if $item.edpost}}
|
||||
<a class="dropdown-item" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}"><i class="generic-icons-nav fa fa-fw fa-pencil"></i>{{$item.edpost.1}}</a>
|
||||
{{/if}}
|
||||
{{if $item.tagger}}
|
||||
<a class="dropdown-item" href="#" onclick="itemTag({{$item.id}}); return false;"><i id="tagger-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-tag" title="{{$item.tagger.tagit}}"></i>{{$item.tagger.tagit}}</a>
|
||||
{{/if}}
|
||||
{{if $item.filer}}
|
||||
<a class="dropdown-item" href="#" onclick="itemFiler({{$item.id}}); return false;"><i id="filer-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-folder-open" title="{{$item.filer}}"></i>{{$item.filer}}</a>
|
||||
{{/if}}
|
||||
{{if $item.bookmark}}
|
||||
<a class="dropdown-item" href="#" onclick="itemBookmark({{$item.id}}); return false;"><i id="bookmarker-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-bookmark" title="{{$item.bookmark}}"></i>{{$item.bookmark}}</a>
|
||||
{{/if}}
|
||||
{{if $item.addtocal}}
|
||||
<a class="dropdown-item" href="#" onclick="itemAddToCal({{$item.id}}); return false;"><i id="addtocal-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-calendar" title="{{$item.addtocal}}"></i>{{$item.addtocal}}</a>
|
||||
{{/if}}
|
||||
{{if $item.star}}
|
||||
<a class="dropdown-item" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-star {{$item.star.isstarred}}" title="{{$item.star.toggle}}"></i>{{$item.star.toggle}}</a>
|
||||
{{/if}}
|
||||
{{if $item.thread_action_menu}}
|
||||
{{foreach $item.thread_action_menu as $mitem}}
|
||||
<a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} ><i class="generic-icons-nav fa fa-fw fa-{{$mitem.icon}}"></i>{{$mitem.title}}</a>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if $item.drop.dropping}}
|
||||
<a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
|
||||
{{/if}}
|
||||
{{if $item.thread_author_menu}}
|
||||
<div class="dropdown-divider"></div>
|
||||
{{foreach $item.thread_author_menu as $mitem}}
|
||||
<a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} >{{$mitem.title}}</a>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if $item.edpost && $item.dreport}}
|
||||
<a class="dropdown-item" href="dreport/{{$item.mid}}">{{$item.dreport}}</a>
|
||||
{{/if}}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" data-toggle="dropdown" id="wall-item-menu-{{$item.id}}">
|
||||
<i class="fa fa-cog"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="wall-item-menu-{{$item.id}}">
|
||||
{{if $item.share}}
|
||||
<a class="dropdown-item" href="#" onclick="jotShare({{$item.id}}); return false"><i class="generic-icons-nav fa fa-fw fa-retweet" title="{{$item.share.0}}"></i>{{$item.share.0}}</a>
|
||||
{{/if}}
|
||||
{{if $item.plink}}
|
||||
<a class="dropdown-item" href="{{$item.plink.href}}" title="{{$item.plink.title}}" class="u-url"><i class="generic-icons-nav fa fa-fw fa-external-link"></i>{{$item.plink.title}}</a>
|
||||
{{/if}}
|
||||
{{if $item.edpost}}
|
||||
<a class="dropdown-item" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}"><i class="generic-icons-nav fa fa-fw fa-pencil"></i>{{$item.edpost.1}}</a>
|
||||
{{/if}}
|
||||
{{if $item.tagger}}
|
||||
<a class="dropdown-item" href="#" onclick="itemTag({{$item.id}}); return false;"><i id="tagger-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-tag" title="{{$item.tagger.tagit}}"></i>{{$item.tagger.tagit}}</a>
|
||||
{{/if}}
|
||||
{{if $item.filer}}
|
||||
<a class="dropdown-item" href="#" onclick="itemFiler({{$item.id}}); return false;"><i id="filer-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-folder-open" title="{{$item.filer}}"></i>{{$item.filer}}</a>
|
||||
{{/if}}
|
||||
{{if $item.bookmark}}
|
||||
<a class="dropdown-item" href="#" onclick="itemBookmark({{$item.id}}); return false;"><i id="bookmarker-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-bookmark" title="{{$item.bookmark}}"></i>{{$item.bookmark}}</a>
|
||||
{{/if}}
|
||||
{{if $item.addtocal}}
|
||||
<a class="dropdown-item" href="#" onclick="itemAddToCal({{$item.id}}); return false;"><i id="addtocal-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-calendar" title="{{$item.addtocal}}"></i>{{$item.addtocal}}</a>
|
||||
{{/if}}
|
||||
{{if $item.star}}
|
||||
<a class="dropdown-item" href="#" onclick="dostar({{$item.id}}); return false;"><i id="starred-{{$item.id}}" class="generic-icons-nav fa fa-fw fa-star {{$item.star.isstarred}}" title="{{$item.star.toggle}}"></i>{{$item.star.toggle}}</a>
|
||||
{{/if}}
|
||||
{{if $item.thread_action_menu}}
|
||||
{{foreach $item.thread_action_menu as $mitem}}
|
||||
<a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} ><i class="generic-icons-nav fa fa-fw fa-{{$mitem.icon}}"></i>{{$mitem.title}}</a>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if $item.drop.dropping}}
|
||||
<a class="dropdown-item" href="#" onclick="dropItem('item/drop/{{$item.id}}', '#thread-wrapper-{{$item.id}}'); return false;" title="{{$item.drop.delete}}" ><i class="generic-icons-nav fa fa-fw fa-trash-o"></i>{{$item.drop.delete}}</a>
|
||||
{{/if}}
|
||||
{{if $item.thread_author_menu}}
|
||||
<div class="dropdown-divider"></div>
|
||||
{{foreach $item.thread_author_menu as $mitem}}
|
||||
<a class="dropdown-item" {{if $mitem.href}}href="{{$mitem.href}}"{{/if}} {{if $mitem.action}}onclick="{{$mitem.action}}"{{/if}} {{if $mitem.title}}title="{{$mitem.title}}"{{/if}} >{{$mitem.title}}</a>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
{{if $item.edpost && $item.dreport}}
|
||||
<a class="dropdown-item" href="dreport/{{$item.mid}}">{{$item.dreport}}</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
3
view/tpl/item_binary.tpl
Normal file
3
view/tpl/item_binary.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
<p>
|
||||
<center><a class="zrl" href="{{$url}}"><button class="btn btn-warning fakelink">{{$download}}</button></a></center>
|
||||
</p>
|
Reference in New Issue
Block a user