update the poke page layout and UI
This commit is contained in:
parent
40b00ab362
commit
d586f64e40
19
mod/poke.php
19
mod/poke.php
@ -158,16 +158,27 @@ function poke_content(&$a) {
|
|||||||
if($v[1] !== 'NOTRANSLATION')
|
if($v[1] !== 'NOTRANSLATION')
|
||||||
$shortlist[] = array($k,$v[1]);
|
$shortlist[] = array($k,$v[1]);
|
||||||
|
|
||||||
$tpl = get_markup_template('poke_content.tpl');
|
|
||||||
|
|
||||||
$o = replace_macros($tpl,array(
|
$poke_basic = get_config('system','poke_basic');
|
||||||
'$title' => t('Poke/Prod'),
|
if($poke_basic) {
|
||||||
'$desc' => t('poke, prod or do other things to somebody'),
|
$title = t('Poke');
|
||||||
|
$desc = t('Poke somebody');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$title = t('Poke/Prod');
|
||||||
|
$desc = t('Poke, prod or do other things to somebody');
|
||||||
|
}
|
||||||
|
|
||||||
|
$o = replace_macros(get_markup_template('poke_content.tpl'),array(
|
||||||
|
'$title' => $title,
|
||||||
|
'$poke_basic' => $poke_basic,
|
||||||
|
'$desc' => $desc,
|
||||||
'$clabel' => t('Recipient'),
|
'$clabel' => t('Recipient'),
|
||||||
'$choice' => t('Choose what you wish to do to recipient'),
|
'$choice' => t('Choose what you wish to do to recipient'),
|
||||||
'$verbs' => $shortlist,
|
'$verbs' => $shortlist,
|
||||||
'$parent' => $parent,
|
'$parent' => $parent,
|
||||||
'$prv_desc' => t('Make this post private'),
|
'$prv_desc' => t('Make this post private'),
|
||||||
|
'$private' => array('private', t('Make this post private'), false, ''),
|
||||||
'$submit' => t('Submit'),
|
'$submit' => t('Submit'),
|
||||||
'$name' => $name,
|
'$name' => $name,
|
||||||
'$id' => $id
|
'$id' => $id
|
||||||
|
@ -1,32 +1,48 @@
|
|||||||
<h3>{{$title}}</h3>
|
|
||||||
|
|
||||||
<div id="poke-desc">{{$desc}}</div>
|
<div id="poke-content" class="generic-content-wrapper">
|
||||||
|
<div class="section-title-wrapper">
|
||||||
|
<h2>{{$title}}</h2>
|
||||||
|
</div>
|
||||||
|
<div class="section-content-wrapper">
|
||||||
|
|
||||||
|
<div id="poke-desc">{{$desc}}</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
|
||||||
|
|
||||||
<form action="poke" method="get">
|
<form action="poke" method="get">
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<div id="poke-recip-label">{{$clabel}}</div>
|
|
||||||
<br />
|
<div class="form-group field input">
|
||||||
<input id="poke-recip" type="text" size="64" maxlength="255" value="{{$name}}" name="pokename" autocomplete="off" />
|
<label id="poke-recip-label" for="poke-recip">{{$clabel}}</label>
|
||||||
<input id="poke-recip-complete" type="hidden" value="{{$id}}" name="cid" />
|
<input class="form-control" id="poke-recip" type="text" value="{{$name}}" name="pokename" autocomplete="off" />
|
||||||
<input id="poke-parent" type="hidden" value="{{$parent}}" name="parent" />
|
</div>
|
||||||
<br />
|
|
||||||
<br />
|
<input id="poke-recip-complete" type="hidden" value="{{$id}}" name="cid" />
|
||||||
<div id="poke-action-label">{{$choice}}</div>
|
<input id="poke-parent" type="hidden" value="{{$parent}}" name="parent" />
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<select name="verb" id="poke-verb-select" >
|
{{if $poke_basic}}
|
||||||
{{foreach $verbs as $v}}
|
<input type="hidden" name="verb" value="poke" />
|
||||||
<option value="{{$v.0}}">{{$v.1}}</option>
|
{{else}}
|
||||||
{{/foreach}}
|
<div class="form-group field custom">
|
||||||
</select>
|
<label for="poke-verb-select" id="poke-verb-lbl">{{$choice}}</label>
|
||||||
<br />
|
<select class="form-control" name="verb" id="poke-verb-select" >
|
||||||
<br />
|
{{foreach $verbs as $v}}
|
||||||
<div id="poke-private-desc">{{$prv_desc}}</div>
|
<option value="{{$v.0}}">{{$v.1}}</option>
|
||||||
<input type="checkbox" name="private" {{if $parent}}disabled="disabled"{{/if}} value="1" />
|
{{/foreach}}
|
||||||
<br />
|
</select>
|
||||||
<br />
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{if ! $parent}}
|
||||||
|
{{include file="field_checkbox.tpl" field=$private}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<input type="submit" name="submit" value="{{$submit}}" />
|
<input type="submit" name="submit" value="{{$submit}}" />
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
Reference in New Issue
Block a user