mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
add option to hide default options
This commit is contained in:
parent
8c2c7178ea
commit
f85acb1783
4 changed files with 17 additions and 2 deletions
|
|
@ -53,6 +53,7 @@ class PollModel extends Poll
|
||||||
$poll->poll[$val->poll_index_srl]->title = $val->title;
|
$poll->poll[$val->poll_index_srl]->title = $val->title;
|
||||||
$poll->poll[$val->poll_index_srl]->checkcount = $val->checkcount;
|
$poll->poll[$val->poll_index_srl]->checkcount = $val->checkcount;
|
||||||
$poll->poll[$val->poll_index_srl]->poll_count = $val->poll_count;
|
$poll->poll[$val->poll_index_srl]->poll_count = $val->poll_count;
|
||||||
|
$poll->poll[$val->poll_index_srl]->hide = strpos($val->title, '[HIDE]') !== FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = executeQueryArray('poll.getPollItem', $args);
|
$output = executeQueryArray('poll.getPollItem', $args);
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,6 @@
|
||||||
<!--@foreach($val->item as $item_srl => $item)-->
|
<!--@foreach($val->item as $item_srl => $item)-->
|
||||||
{@$_idx = $poll->poll_srl.'_'.$poll_srl_index.'_'.$item_srl}
|
{@$_idx = $poll->poll_srl.'_'.$poll_srl_index.'_'.$item_srl}
|
||||||
|
|
||||||
<!-- {print_r($item)} -->
|
|
||||||
|
|
||||||
<div class="item <!--@if($_key==count($val->item)-1)-->noborder<!--@end-->" cond="strpos($item->title, '[HIDE]') === FALSE">
|
<div class="item <!--@if($_key==count($val->item)-1)-->noborder<!--@end-->" cond="strpos($item->title, '[HIDE]') === FALSE">
|
||||||
<!--@if($val->checkcount>1)-->
|
<!--@if($val->checkcount>1)-->
|
||||||
<input type="checkbox" name="item_{$poll->poll_srl}_{$poll_srl_index}" value="{$item->poll_item_srl}" id="item_{$item->poll_item_srl}" />
|
<input type="checkbox" name="item_{$poll->poll_srl}_{$poll_srl_index}" value="{$item->poll_item_srl}" id="item_{$item->poll_item_srl}" />
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,9 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#each question.items as |item itemid|}}
|
{{#each question.items as |item itemid|}}
|
||||||
|
{{#if item.hide}}
|
||||||
|
<!-- Option Not Shown ({{item.title}}) -->
|
||||||
|
{{else}}
|
||||||
<div class="poll_item">
|
<div class="poll_item">
|
||||||
<label for="item_{{item.poll_item_srl}}">
|
<label for="item_{{item.poll_item_srl}}">
|
||||||
{{#if question.isMultipleChoice}}
|
{{#if question.isMultipleChoice}}
|
||||||
|
|
@ -41,6 +44,7 @@
|
||||||
<input type="button" value="x" title="{$lang->delete_poll_item}" onclick="deleteRxDefaultItem({{question.poll_srl}},{{question.poll_index_srl}},{{item.poll_item_srl}}); return false;" class="btn poll_item_delete" />
|
<input type="button" value="x" title="{$lang->delete_poll_item}" onclick="deleteRxDefaultItem({{question.poll_srl}},{{question.poll_index_srl}},{{item.poll_item_srl}}); return false;" class="btn poll_item_delete" />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#if question.additem}}
|
{{#if question.additem}}
|
||||||
<div class="poll_item_add">
|
<div class="poll_item_add">
|
||||||
|
|
@ -82,6 +86,9 @@
|
||||||
{{#each questions as |question questionid|}}
|
{{#each questions as |question questionid|}}
|
||||||
<div class="title">{{question.title}} ({{question.poll_count}})</div>
|
<div class="title">{{question.title}} ({{question.poll_count}})</div>
|
||||||
{{#each question.items as |item itemid|}}
|
{{#each question.items as |item itemid|}}
|
||||||
|
{{#if item.hide}}
|
||||||
|
<!-- Option Not Shown ({{item.title}}) -->
|
||||||
|
{{else}}
|
||||||
<div class="rx_poll_default_item">
|
<div class="rx_poll_default_item">
|
||||||
<div class="item_text">
|
<div class="item_text">
|
||||||
{{#if question.showMembers}}
|
{{#if question.showMembers}}
|
||||||
|
|
@ -100,6 +107,7 @@
|
||||||
<div class="item_bar_text">{{item.poll_count}}</strong> ({{item.per}}%)</div>
|
<div class="item_bar_text">{{item.poll_count}}</strong> ({{item.per}}%)</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,9 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#each question.items as |item itemid|}}
|
{{#each question.items as |item itemid|}}
|
||||||
|
{{#if item.hide}}
|
||||||
|
<!-- Option Not Shown ({{item.title}}) -->
|
||||||
|
{{else}}
|
||||||
<div class="poll_item">
|
<div class="poll_item">
|
||||||
<label for="item_{{item.poll_item_srl}}">
|
<label for="item_{{item.poll_item_srl}}">
|
||||||
{{#if question.isMultipleChoice}}
|
{{#if question.isMultipleChoice}}
|
||||||
|
|
@ -41,6 +44,7 @@
|
||||||
<input type="button" value="x" title="{$lang->delete_poll_item}" onclick="deleteRxSmplItem({{question.poll_srl}},{{question.poll_index_srl}},{{item.poll_item_srl}}); return false;" class="btn poll_item_delete" />
|
<input type="button" value="x" title="{$lang->delete_poll_item}" onclick="deleteRxSmplItem({{question.poll_srl}},{{question.poll_index_srl}},{{item.poll_item_srl}}); return false;" class="btn poll_item_delete" />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#if question.additem}}
|
{{#if question.additem}}
|
||||||
<div class="poll_item_add">
|
<div class="poll_item_add">
|
||||||
|
|
@ -82,6 +86,9 @@
|
||||||
{{#each questions as |question questionid|}}
|
{{#each questions as |question questionid|}}
|
||||||
<div class="title">{{question.title}} ({{question.poll_count}})</div>
|
<div class="title">{{question.title}} ({{question.poll_count}})</div>
|
||||||
{{#each question.items as |item itemid|}}
|
{{#each question.items as |item itemid|}}
|
||||||
|
{{#if item.hide}}
|
||||||
|
<!-- Option Not Shown ({{item.title}}) -->
|
||||||
|
{{else}}
|
||||||
<div class="rx_poll_smpl_item">
|
<div class="rx_poll_smpl_item">
|
||||||
<div class="item_text">
|
<div class="item_text">
|
||||||
{{#if question.showMembers}}
|
{{#if question.showMembers}}
|
||||||
|
|
@ -100,6 +107,7 @@
|
||||||
<div class="item_bar_text">{{item.poll_count}}</strong> ({{item.per}}%)</div>
|
<div class="item_bar_text">{{item.poll_count}}</strong> ({{item.per}}%)</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue