mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:35:13 +00:00
first cut at check-in activities
This commit is contained in:
parent
f71d5fe3f2
commit
46e07087dd
4 changed files with 19 additions and 1 deletions
|
@ -490,7 +490,7 @@ class Item extends Controller
|
|||
$layout_mid = ((x($_REQUEST, 'layout_mid')) ? escape_tags($_REQUEST['layout_mid']) : '');
|
||||
$plink = ((x($_REQUEST, 'permalink')) ? escape_tags($_REQUEST['permalink']) : '');
|
||||
$obj_type = ((x($_REQUEST, 'obj_type')) ? escape_tags($_REQUEST['obj_type']) : ACTIVITY_OBJ_NOTE);
|
||||
|
||||
$checkin = ((x($_REQUEST, 'checkin')) ? 1 : 0);
|
||||
|
||||
$item_unpublished = ((isset($_REQUEST['draft'])) ? intval($_REQUEST['draft']) : 0);
|
||||
|
||||
|
@ -1311,6 +1311,9 @@ class Item extends Controller
|
|||
if (!strlen($verb)) {
|
||||
$verb = ACTIVITY_POST;
|
||||
}
|
||||
if ($checkin) {
|
||||
$verb = 'Arrive';
|
||||
}
|
||||
|
||||
$notify_type = (($parent) ? 'comment-new' : 'wall-new');
|
||||
|
||||
|
|
|
@ -1033,6 +1033,8 @@ function z_status_editor($x, $popup = false)
|
|||
$feature_markup = false;
|
||||
}
|
||||
|
||||
$feature_checkin = false;
|
||||
|
||||
$lat = '';
|
||||
$lon = '';
|
||||
$geotag = (($x['allow_location']) ? replace_macros(Theme::get_template('jot_geotag.tpl'), []) : '');
|
||||
|
@ -1307,6 +1309,8 @@ function z_status_editor($x, $popup = false)
|
|||
'$jotcoll_label' => t('Collections'),
|
||||
'$defexpire' => $defexpire,
|
||||
'$feature_expire' => $feature_expire,
|
||||
'$feature_checkin' => $feature_checkin,
|
||||
'$checkin' => t('Check In'),
|
||||
'$expires' => t('Set expiration date'),
|
||||
'$save' => $permanent_draft,
|
||||
'$is_draft' => ((array_key_exists('is_draft', $x) && intval($x['is_draft'])) ? true : false),
|
||||
|
|
|
@ -334,6 +334,11 @@ let activeCommentText = '';
|
|||
});
|
||||
}
|
||||
|
||||
function jotCheckin() {
|
||||
let checkinVal = $('#jot-checkin').val();
|
||||
$('#jot-checkin').val(1 - checkinVal);
|
||||
}
|
||||
|
||||
function jotEmbed(id,post_type) {
|
||||
|
||||
if ($('#jot-popup').length != 0) $('#jot-popup').show();
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
<input type="hidden" id="jot-webpage" name="webpage" value="{{$webpage}}" />
|
||||
<input type="hidden" name="preview" id="jot-preview" value="0" />
|
||||
<input type="hidden" name="draft" id="jot-draft" value="0" />
|
||||
<input type="hidden" name="checkin" id="jot-checkin" value="0" />
|
||||
<input type="hidden" name="hidden_mentions" id="jot-hidden-mentions" value="{{$hidden_mentions}}" />
|
||||
<input type="hidden" id="jot-commentstate" name="comments_enabled" value="{{if $commentstate}}{{$commentstate}}{{else}}1{{/if}}" />
|
||||
|
||||
|
@ -168,6 +169,11 @@
|
|||
<i id="profile-encrypt" class="fa fa-key jot-icons"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
{{if $feature_checkin}}
|
||||
<button id="profile-checkin-wrapper" class="btn btn-outline-secondary btn-sm" title="{{$checkin}}" onclick="jotCheckin(); return false;">
|
||||
<i id="profile-checkin" class="fa fa-map-marker jot-icons"></i>
|
||||
</button>
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
{{if $writefiles || $weblink || $setloc || $clearloc || $feature_expire || $feature_encrypt }}
|
||||
|
|
Loading…
Reference in a new issue