]> git.mxchange.org Git - friendica.git/commitdiff
redesign the network page header when cid selected
authorrabuzarus <>
Sun, 29 Nov 2015 03:57:42 +0000 (04:57 +0100)
committerrabuzarus <>
Sun, 29 Nov 2015 03:57:42 +0000 (04:57 +0100)
mod/network.php
view/theme/vier/style.css

index fd22f3e192f7d0d9a8fa7f272b462c9cce9bdd4f..3e841d27593b5297e87b1a531390fd5c129cd7d5 100644 (file)
@@ -152,14 +152,14 @@ function network_init(&$a) {
        $a->page['aside'] .= saved_searches($search);
        $a->page['aside'] .= fileas_widget($a->get_baseurl(true) . '/network',(x($_GET, 'file') ? $_GET['file'] : ''));
 
-       if(x($_GET['cid']) && intval($_GET['cid']) != 0) {
-               $r = q("SELECT `url` FROM `contact` WHERE `id` = %d",
-                       intval($_GET['cid']));
-               if ($r) {
-                       $a->page['aside'] = "";
-                       profile_load($a, "", 0, get_contact_details_by_url($r[0]["url"]));
-               }
-       }
+//     if(x($_GET['cid']) && intval($_GET['cid']) != 0) {
+//             $r = q("SELECT `url` FROM `contact` WHERE `id` = %d",
+//                     intval($_GET['cid']));
+//             if ($r) {
+//                     $a->page['aside'] = "";
+//                     profile_load($a, "", 0, get_contact_details_by_url($r[0]["url"]));
+//             }
+//     }
 }
 
 function saved_searches($search) {
@@ -583,7 +583,7 @@ function network_content(&$a, $update = 0) {
        }
        elseif($cid) {
 
-               $r = q("SELECT `id`,`name`,`network`,`writable`,`nurl` FROM `contact` WHERE `id` = %d
+               $r = q("SELECT `id`,`name`,`network`,`writable`,`nurl`, `forum`, `prv`, `addr`, `thumb`, `location` FROM `contact` WHERE `id` = %d
                                AND `blocked` = 0 AND `pending` = 0 LIMIT 1",
                        intval($cid)
                );
@@ -594,8 +594,17 @@ function network_content(&$a, $update = 0) {
                                            ON $sql_table.$sql_parent = `temp1`.`parent` ";
                        $sql_extra = "";
 
-                       $o = replace_macros(get_markup_template("section_title.tpl"),array(
-                               '$title' => sprintf( t('Contact: %s'), htmlentities($r[0]['name']))
+                       $entries[0] = array(
+                               'id' => 'network',
+                               'name' => htmlentities($r[0]['name']),
+                               'itemurl' => (($r[0]['addr']) ? ($r[0]['addr']) : ($r[0]['nurl'])),
+                               'thumb' => proxy_url($r[0]['thumb'], false, PROXY_SIZE_THUMB),
+                               'account_type' => (($r[0]['forum']) || ($r[0]['prv']) ? t('Forum') : ''),
+                               'details' => $r[0]['location'],
+                       );
+
+                       $o = replace_macros(get_markup_template("viewcontact_template.tpl"),array(
+                               'contacts' => $entries,
                        )) . $o;
 
                        if($r[0]['network'] === NETWORK_OSTATUS && $r[0]['writable'] && (! get_pconfig(local_user(),'system','nowarn_insecure'))) {
index 5bd475759fff3d0a7ef4389e27cd4266e1306dc9..d4da5e2d6c1b1cb600294aa1ed4cfe042099da04 100644 (file)
@@ -1199,6 +1199,21 @@ section.minimal {
   height: 100%;
 }
 
+#contact-entry-wrapper-network {
+  float: none;
+  width: 100%;
+  background-color: #FAFAFA;
+  box-shadow: 1px 2px 0px 0px #D8D8D8;
+  border-bottom: 1px solid #D2D2D2;
+  padding: 10px 10px 0 10px;
+  width: 745px;
+}
+#contact-entry-accounttype-network {
+  font-size: 20px;
+}
+#contact-entry-name-network {
+  font-size: 24.5px;
+}
 /* wall item */
 .tread-wrapper {
 /*    border-bottom: 1px solid #BDCDD4; */