From 75b6aa235e18e9491bc953f43d6d95cf00453406 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 6 Apr 2014 21:40:23 -0700 Subject: more work on #395 --- mod/connections.php | 7 +++---- view/css/mod_connections.css | 4 ++++ view/tpl/connection_template.tpl | 9 +++++++++ view/tpl/connections.tpl | 26 ++++++++++++++++++++++++++ view/tpl/contacts-template.tpl | 26 -------------------------- 5 files changed, 42 insertions(+), 30 deletions(-) create mode 100755 view/tpl/connection_template.tpl create mode 100755 view/tpl/connections.tpl delete mode 100755 view/tpl/contacts-template.tpl diff --git a/mod/connections.php b/mod/connections.php index 1b5e08cfe..f0879ae31 100644 --- a/mod/connections.php +++ b/mod/connections.php @@ -375,16 +375,14 @@ function connections_content(&$a) { 'username' => $rr['xchan_name'], 'sparkle' => $sparkle, 'link' => z_root() . '/connedit/' . $rr['abook_id'], - 'url' => $rr['xchan_url'], + 'url' => chanlink_url($rr['xchan_url']), 'network' => network_to_name($rr['network']), ); } } } - - $tpl = get_markup_template("contacts-template.tpl"); - $o .= replace_macros($tpl,array( + $o .= replace_macros(get_markup_template('connections.tpl'),array( '$header' => t('Connections') . (($head) ? ' - ' . $head : ''), '$tabs' => $t, '$total' => $total, @@ -392,6 +390,7 @@ function connections_content(&$a) { '$desc' => t('Search your connections'), '$finding' => (($searching) ? t('Finding: ') . "'" . $search . "'" : ""), '$submit' => t('Find'), + '$edit' => t('Edit'), '$cmd' => $a->cmd, '$contacts' => $contacts, '$paginate' => paginate($a), diff --git a/view/css/mod_connections.css b/view/css/mod_connections.css index c460fec28..94373389b 100644 --- a/view/css/mod_connections.css +++ b/view/css/mod_connections.css @@ -109,6 +109,9 @@ width: 120px; height: 120px; padding: 10px; + margin: 8px 10px 0 0; + border-top: 1px solid #eee; + border-left: 2px solid #eee; } #contacts-search { @@ -128,6 +131,7 @@ float: left; margin-left: 0px; margin-right: 10px; + margin-bottom: 10px; width: 120px; overflow: hidden; } diff --git a/view/tpl/connection_template.tpl b/view/tpl/connection_template.tpl new file mode 100755 index 000000000..fc9052d41 --- /dev/null +++ b/view/tpl/connection_template.tpl @@ -0,0 +1,9 @@ +
+
+ {{$contact.name}} +
+
+
{{$contact.name}}
+
{{$edit}}
+
+
diff --git a/view/tpl/connections.tpl b/view/tpl/connections.tpl new file mode 100755 index 000000000..f254ce8c2 --- /dev/null +++ b/view/tpl/connections.tpl @@ -0,0 +1,26 @@ +

{{$header}}{{if $total}} ({{$total}}){{/if}}

+ +{{if $finding}}

{{$finding}}

{{/if}} + +
+
+{{$desc}} + + +
+
+
+ +{{$tabs}} + + +{{foreach $contacts as $contact}} + {{include file="connection_template.tpl"}} +{{/foreach}} +
+ +{{$paginate}} + + + + diff --git a/view/tpl/contacts-template.tpl b/view/tpl/contacts-template.tpl deleted file mode 100755 index 0c7e01038..000000000 --- a/view/tpl/contacts-template.tpl +++ /dev/null @@ -1,26 +0,0 @@ -

{{$header}}{{if $total}} ({{$total}}){{/if}}

- -{{if $finding}}

{{$finding}}

{{/if}} - -
-
-{{$desc}} - - -
-
-
- -{{$tabs}} - - -{{foreach $contacts as $contact}} - {{include file="contact_template.tpl"}} -{{/foreach}} -
- -{{$paginate}} - - - - -- cgit v1.2.3