aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-02-04 18:35:40 -0800
committerredmatrix <git@macgirvin.com>2016-02-04 18:35:40 -0800
commitd586f64e406306a9fc55e55fa6d153e46fe0796c (patch)
tree30a269e3670b8353749cfaa025c61df0dc5a6eab
parent40b00ab3624ba935e9bfdc1bccac373c0daf4597 (diff)
downloadvolse-hubzilla-d586f64e406306a9fc55e55fa6d153e46fe0796c.tar.gz
volse-hubzilla-d586f64e406306a9fc55e55fa6d153e46fe0796c.tar.bz2
volse-hubzilla-d586f64e406306a9fc55e55fa6d153e46fe0796c.zip
update the poke page layout and UI
-rwxr-xr-xmod/poke.php19
-rwxr-xr-xview/tpl/poke_content.tpl64
2 files changed, 55 insertions, 28 deletions
diff --git a/mod/poke.php b/mod/poke.php
index f66d28956..15a69780c 100755
--- a/mod/poke.php
+++ b/mod/poke.php
@@ -158,16 +158,27 @@ function poke_content(&$a) {
if($v[1] !== 'NOTRANSLATION')
$shortlist[] = array($k,$v[1]);
- $tpl = get_markup_template('poke_content.tpl');
- $o = replace_macros($tpl,array(
- '$title' => t('Poke/Prod'),
- '$desc' => t('poke, prod or do other things to somebody'),
+ $poke_basic = get_config('system','poke_basic');
+ if($poke_basic) {
+ $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'),
'$choice' => t('Choose what you wish to do to recipient'),
'$verbs' => $shortlist,
'$parent' => $parent,
'$prv_desc' => t('Make this post private'),
+ '$private' => array('private', t('Make this post private'), false, ''),
'$submit' => t('Submit'),
'$name' => $name,
'$id' => $id
diff --git a/view/tpl/poke_content.tpl b/view/tpl/poke_content.tpl
index 22a0b291f..f368cb024 100755
--- a/view/tpl/poke_content.tpl
+++ b/view/tpl/poke_content.tpl
@@ -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">
-<form action="poke" method="get">
-<br />
-<br />
+ <div id="poke-desc">{{$desc}}</div>
-<div id="poke-recip-label">{{$clabel}}</div>
-<br />
-<input id="poke-recip" type="text" size="64" maxlength="255" value="{{$name}}" name="pokename" autocomplete="off" />
-<input id="poke-recip-complete" type="hidden" value="{{$id}}" name="cid" />
-<input id="poke-parent" type="hidden" value="{{$parent}}" name="parent" />
-<br />
-<br />
-<div id="poke-action-label">{{$choice}}</div>
-<br />
-<br />
-<select name="verb" id="poke-verb-select" >
-{{foreach $verbs as $v}}
-<option value="{{$v.0}}">{{$v.1}}</option>
-{{/foreach}}
-</select>
-<br />
-<br />
-<div id="poke-private-desc">{{$prv_desc}}</div>
-<input type="checkbox" name="private" {{if $parent}}disabled="disabled"{{/if}} value="1" />
<br />
<br />
+
+
+<form action="poke" method="get">
+
+
+<div class="form-group field input">
+ <label id="poke-recip-label" for="poke-recip">{{$clabel}}</label>
+ <input class="form-control" id="poke-recip" type="text" value="{{$name}}" name="pokename" autocomplete="off" />
+</div>
+
+ <input id="poke-recip-complete" type="hidden" value="{{$id}}" name="cid" />
+ <input id="poke-parent" type="hidden" value="{{$parent}}" name="parent" />
+
+
+{{if $poke_basic}}
+<input type="hidden" name="verb" value="poke" />
+{{else}}
+<div class="form-group field custom">
+ <label for="poke-verb-select" id="poke-verb-lbl">{{$choice}}</label>
+ <select class="form-control" name="verb" id="poke-verb-select" >
+ {{foreach $verbs as $v}}
+ <option value="{{$v.0}}">{{$v.1}}</option>
+ {{/foreach}}
+ </select>
+</div>
+{{/if}}
+
+{{if ! $parent}}
+{{include file="field_checkbox.tpl" field=$private}}
+{{/if}}
+
<input type="submit" name="submit" value="{{$submit}}" />
</form>
+
+ </div>
+</div>