aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-11-29 18:41:34 -0800
committerzotlabs <mike@macgirvin.com>2016-11-29 18:41:34 -0800
commit8c87f32b381ec0be066cdd0e6ca4fe50079bbd16 (patch)
tree945ee8080a92c1d7124034f7946583d375402b2a /view
parent0cf6c6c132dda695853ce52089f6745a9c4b29dc (diff)
downloadvolse-hubzilla-8c87f32b381ec0be066cdd0e6ca4fe50079bbd16.tar.gz
volse-hubzilla-8c87f32b381ec0be066cdd0e6ca4fe50079bbd16.tar.bz2
volse-hubzilla-8c87f32b381ec0be066cdd0e6ca4fe50079bbd16.zip
This isn't the most elegant solution as it requires a bit of arcane knowledge, but provide a way to step through connections with a specific tab/panel open in the connection editor. It does not close the default panel, but merely opens the one specified by a &section= URL parameter (closing the default panel would require a major refactoring of the default panel logic). Valid choices for section currently are affinity, filter, and perms. This tab/panel selection should persist across form posting and 'prev/next'.
Diffstat (limited to 'view')
-rwxr-xr-xview/tpl/abook_edit.tpl11
1 files changed, 6 insertions, 5 deletions
diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl
index 12ec879a9..2e02de33b 100755
--- a/view/tpl/abook_edit.tpl
+++ b/view/tpl/abook_edit.tpl
@@ -21,10 +21,10 @@
{{if $abook_prev || $abook_next}}
<div class="btn-group">
{{if $abook_prev}}
- <a href="connedit/{{$abook_prev}}" class="btn btn-default btn-xs" ><i class="fa fa-backward"></i></a>
+ <a href="connedit/{{$abook_prev}}{{if $section}}?f=&section={{$section}}{{/if}}" class="btn btn-default btn-xs" ><i class="fa fa-backward"></i></a>
{{/if}}
{{if $abook_next}}
- <a href="connedit/{{$abook_next}}" class="btn btn-default btn-xs" ><i class="fa fa-forward"></i></a>
+ <a href="connedit/{{$abook_next}}{{if $section}}?f=&section={{$section}}{{/if}}" class="btn btn-default btn-xs" ><i class="fa fa-forward"></i></a>
{{/if}}
</div>
{{/if}}
@@ -63,6 +63,7 @@
<form id="abook-edit-form" action="connedit/{{$contact_id}}" method="post" >
<input type="hidden" name="contact_id" value="{{$contact_id}}">
+ <input type="hidden" name="section" value="{{$section}}">
<div class="panel-group" id="contact-edit-tools" role="tablist" aria-multiselectable="true">
{{if $notself}}
@@ -96,7 +97,7 @@
</a>
</h3>
</div>
- <div id="affinity-tool-collapse" class="panel-collapse collapse{{if !$is_pending}} in{{/if}}" role="tabpanel" aria-labelledby="affinity-tool">
+ <div id="affinity-tool-collapse" class="panel-collapse collapse{{if !$is_pending || $section == 'affinity'}} in{{/if}}" role="tabpanel" aria-labelledby="affinity-tool">
<div class="section-content-tools-wrapper">
{{if $slide}}
<div class="form-group"><strong>{{$lbl_slider}}</strong></div>
@@ -127,7 +128,7 @@
</a>
</h3>
</div>
- <div id="fitert-tool-collapse" class="panel-collapse collapse{{if !$is_pending && !($slide || $multiprofs)}} in{{/if}}" role="tabpanel" aria-labelledby="fitert-tool">
+ <div id="fitert-tool-collapse" class="panel-collapse collapse{{if ( !$is_pending && !($slide || $multiprofs)) || $section == 'filter' }} in{{/if}}" role="tabpanel" aria-labelledby="fitert-tool">
<div class="section-content-tools-wrapper">
{{include file="field_textarea.tpl" field=$incl}}
{{include file="field_textarea.tpl" field=$excl}}
@@ -181,7 +182,7 @@
</h3>
</div>
{{/if}}
- <div id="perms-tool-collapse" class="panel-collapse collapse{{if $self}} in{{/if}}" role="tabpanel" aria-labelledby="perms-tool">
+ <div id="perms-tool-collapse" class="panel-collapse collapse{{if $self || $section === 'perms'}} in{{/if}}" role="tabpanel" aria-labelledby="perms-tool">
<div class="section-content-tools-wrapper">
<div class="section-content-warning-wrapper">
{{if $notself}}{{$permnote}}{{/if}}