]> git.mxchange.org Git - friendica.git/commitdiff
our implementation of "aspects" functionally complete
authorMike Macgirvin <mike@macgirvin.com>
Fri, 17 Sep 2010 10:43:03 +0000 (03:43 -0700)
committerMike Macgirvin <mike@macgirvin.com>
Fri, 17 Sep 2010 10:43:03 +0000 (03:43 -0700)
mod/network.php
mod/profile.php
view/jot.tpl
view/theme/default/style.css

index 7eb93f435998a20fafbefce2a182bf0788f4000e..afe44dabf553fe28efbe15424ca38ad2733e217e 100644 (file)
@@ -20,9 +20,10 @@ function network_content(&$a, $update = false) {
 
        if(! $update) {
                        // pull out the group here because the updater might have different args
-               if($a->argc > 1)
+               if($a->argc > 1) {
                        $group = intval($a->argv[1]);
-
+                       $group_acl = array('allow_gid' => '<' . $group . '>');
+               }
                $_SESSION['return_url'] = $a->cmd;
 
                $tpl = file_get_contents('view/jot-header.tpl');
@@ -32,14 +33,20 @@ function network_content(&$a, $update = false) {
                require_once('view/acl_selectors.php');
 
                $tpl = file_get_contents("view/jot.tpl");
+               
+               if(($group) || (is_array($a->user) && ((strlen($a->user['allow_cid'])) || (strlen($a->user['allow_gid'])) || (strlen($a->user['deny_cid'])) || (strlen($a->user['deny_gid'])))))
+                               $lockstate = 'lock';
+                       else
+                               $lockstate = 'unlock';
 
                $o .= replace_macros($tpl,array(
                        '$return_path' => $a->cmd,
                        '$baseurl' => $a->get_baseurl(),
                        '$defloc' => $a->user['default-location'],
                        '$visitor' => 'block',
-                       '$lockstate' => 'unlock',
-                       '$acl' => populate_acl($a->user),
+                       '$lockstate' => $lockstate,
+                       '$acl' => populate_acl(($group) ? $group_acl : $a->user),
+                       '$bang' => (($group) ? '!' : ''),
                        '$profile_uid' => $_SESSION['uid']
                ));
 
index 18201e821a6b360d1d93011923ea76a2c7e2c916..5efb28ea752a769e5a1adfa9ca83f213bf70eee4 100644 (file)
@@ -144,6 +144,7 @@ function profile_content(&$a, $update = false) {
                                '$return_path' => $a->cmd,
                                '$visitor' => (($_SESSION['uid'] == $a->profile['profile_uid']) ? 'block' : 'none'),
                                '$lockstate' => $lockstate,
+                               '$bang' => '',
                                '$acl' => (($_SESSION['uid'] == $a->profile['profile_uid']) ? populate_acl($a->user) : ''),
                                '$profile_uid' => $a->profile['profile_uid']
                        ));
index ec11f286113edbf71c2cc921db3c149b96812742..e10c9a8eb5f80c0718066e71abe4374b37ab6201 100644 (file)
@@ -31,7 +31,7 @@
        <div id="profile-rotator-wrapper" style="display: $visitor;" >
                <img id="profile-rotator" src="images/rotator.gif" alt="Please wait" title="Please wait" style="display: none;" />
        </div> 
-       <div id="profile-jot-perms" class="profile-jot-perms" style="display: $visitor;" ><img src="images/$lockstate_icon.gif" alt="Permission Settings" title="Permission Settings" onClick="openClose('profile-jot-acl-wrapper');" /></div>
+       <div id="profile-jot-perms" class="profile-jot-perms" style="display: $visitor;" ><img src="images/$lockstate_icon.gif" alt="Permission Settings" title="Permission Settings" onClick="openClose('profile-jot-acl-wrapper');" />$bang</div>
        <div id="profile-jot-perms-end"></div>
        <div id="profile-jot-acl-wrapper" style="display: none;" >$acl</div>
 </div>
index 6176f84ff61641c61cbf283a1f311b386a9f9598..0e7882b304a0ac949f6884859092169d54bc399a 100644 (file)
@@ -776,6 +776,8 @@ input#dfrn-url {
 #profile-jot-perms {
        float: left;
        margin-left: 200px;
+       font-weight: bold;
+       font-size: 1.2em;
 }
 
 #profile-jot-perms-end {