aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-23 21:15:40 -0800
committerfriendica <info@friendica.com>2013-01-23 21:15:40 -0800
commit6e6b268e2523d95624361d29a8bd80b1133aa627 (patch)
tree95c01140f753fe42f0031064597b12c7dc297835 /view
parentc1a5c88720cf00a041ac4838c4e799ee53933ae9 (diff)
downloadvolse-hubzilla-6e6b268e2523d95624361d29a8bd80b1133aa627.tar.gz
volse-hubzilla-6e6b268e2523d95624361d29a8bd80b1133aa627.tar.bz2
volse-hubzilla-6e6b268e2523d95624361d29a8bd80b1133aa627.zip
auto permissions (such as for forums or whatever) - untested but might just work
Diffstat (limited to 'view')
-rw-r--r--view/js/mod_connections.js18
-rw-r--r--view/tpl/abook_edit.tpl13
-rw-r--r--view/tpl/smarty3/abook_edit.tpl13
3 files changed, 42 insertions, 2 deletions
diff --git a/view/js/mod_connections.js b/view/js/mod_connections.js
index 7fb38b56e..485e2244b 100644
--- a/view/js/mod_connections.js
+++ b/view/js/mod_connections.js
@@ -26,6 +26,8 @@ function connectFullShare() {
$('#me_id_perms_view_profile').attr('checked','checked');
$('#me_id_perms_view_photos').attr('checked','checked');
$('#me_id_perms_view_contacts').attr('checked','checked');
+ $('#me_id_perms_view_storage').attr('checked','checked');
+ $('#me_id_perms_view_pages').attr('checked','checked');
$('#me_id_perms_send_stream').attr('checked','checked');
$('#me_id_perms_post_wall').attr('checked','checked');
$('#me_id_perms_post_comments').attr('checked','checked');
@@ -39,12 +41,28 @@ function connectCautiousShare() {
$('#me_id_perms_view_stream').attr('checked','checked');
$('#me_id_perms_view_profile').attr('checked','checked');
$('#me_id_perms_view_photos').attr('checked','checked');
+ $('#me_id_perms_view_storage').attr('checked','checked');
+ $('#me_id_perms_view_pages').attr('checked','checked');
$('#me_id_perms_send_stream').attr('checked','checked');
$('#me_id_perms_post_comments').attr('checked','checked');
$('#me_id_perms_post_mail').attr('checked','checked');
}
+function connectForum() {
+ $('#me_id_perms_view_stream').attr('checked','checked');
+ $('#me_id_perms_view_profile').attr('checked','checked');
+ $('#me_id_perms_view_photos').attr('checked','checked');
+ $('#me_id_perms_view_contacts').attr('checked','checked');
+ $('#me_id_perms_view_storage').attr('checked','checked');
+ $('#me_id_perms_view_pages').attr('checked','checked');
+ $('#me_id_perms_send_stream').attr('checked','checked');
+ $('#me_id_perms_post_comments').attr('checked','checked');
+ $('#me_id_perms_post_mail').attr('checked','checked');
+ $('#me_id_perms_tag_deliver').attr('checked','checked');
+}
+
+
function connectFollowOnly() {
$('#me_id_perms_send_stream').attr('checked','checked');
diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl
index 606e61b80..4deb84823 100644
--- a/view/tpl/abook_edit.tpl
+++ b/view/tpl/abook_edit.tpl
@@ -3,20 +3,28 @@
<h3>$addr</h3>
+{{ if $notself }}
<div id="connection-flag-tabs">
$tabs
</div>
+{{ endif }}
+
+{{ if $self }}
+<div id="autoperm-desc" class="descriptive-paragraph">$autolbl</div>
+{{ endif }}
<div id="contact-edit-wrapper">
+{{ if $notself }}
{{ if $slide }}
<h3>$lbl_slider</h3>
$slide
{{ endif }}
+{{ endif }}
-<h3>Permissions</h3>
+<h3>$permlbl</h3>
<form action="connections/$contact_id" method="post" >
<input type="hidden" name="contact_id" value="$contact_id">
@@ -25,6 +33,9 @@ $slide
<br />
<b>$quick</b>
<ul>
+{{ if $self }}
+<li><a href="#" onclick="connectForum(); return false;">$forum</a></li>
+{{ endif }}
<li><a href="#" onclick="connectFullShare(); return false;">$full</a></li>
<li><a href="#" onclick="connectCautiousShare(); return false;">$cautious</a></li>
<li><a href="#" onclick="connectFollowOnly(); return false;">$follow</a></li>
diff --git a/view/tpl/smarty3/abook_edit.tpl b/view/tpl/smarty3/abook_edit.tpl
index 623f13dd4..e3da32999 100644
--- a/view/tpl/smarty3/abook_edit.tpl
+++ b/view/tpl/smarty3/abook_edit.tpl
@@ -3,20 +3,28 @@
<h3>{{$addr}}</h3>
+{{if $notself}}
<div id="connection-flag-tabs">
{{$tabs}}
</div>
+{{/if}}
+
+{{if $self}}
+<div id="autoperm-desc" class="descriptive-paragraph">{{$autolbl}}</div>
+{{/if}}
<div id="contact-edit-wrapper">
+{{if $notself}}
{{if $slide}}
<h3>{{$lbl_slider}}</h3>
{{$slide}}
{{/if}}
+{{/if}}
-<h3>Permissions</h3>
+<h3>{{$permlbl}}</h3>
<form action="connections/{{$contact_id}}" method="post" >
<input type="hidden" name="contact_id" value="{{$contact_id}}">
@@ -25,6 +33,9 @@
<br />
<b>{{$quick}}</b>
<ul>
+{{if $self}}
+<li><a href="#" onclick="connectForum(); return false;">{{$forum}}</a></li>
+{{/if}}
<li><a href="#" onclick="connectFullShare(); return false;">{{$full}}</a></li>
<li><a href="#" onclick="connectCautiousShare(); return false;">{{$cautious}}</a></li>
<li><a href="#" onclick="connectFollowOnly(); return false;">{{$follow}}</a></li>