This commit is contained in:
redmatrix 2016-01-14 11:47:23 -08:00
commit 96990fc1c5
8 changed files with 92 additions and 204 deletions

View File

@ -170,8 +170,8 @@ function widget_follow($args) {
} }
return replace_macros(get_markup_template('follow.tpl'),array( return replace_macros(get_markup_template('follow.tpl'),array(
'$connect' => t('Add New Connection'), '$connect' => t('Add New Connection'),
'$desc' => t('Enter the channel address'), '$desc' => t('Enter channel address'),
'$hint' => t('Example: bob@example.com, http://example.com/barbara'), '$hint' => t('Examples: bob@example.com, https://example.com/barbara'),
'$follow' => t('Connect'), '$follow' => t('Connect'),
'$abook_usage_message' => $abook_usage_message '$abook_usage_message' => $abook_usage_message
)); ));

View File

@ -121,53 +121,60 @@ function connections_content(&$a) {
$search = ((x($_REQUEST,'search')) ? notags(trim($_REQUEST['search'])) : ''); $search = ((x($_REQUEST,'search')) ? notags(trim($_REQUEST['search'])) : '');
$tabs = array( $tabs = array(
/*
array( array(
'label' => t('Suggestions'), 'label' => t('Suggestions'),
'url' => z_root() . '/suggest', 'url' => z_root() . '/suggest',
'sel' => '', 'sel' => '',
'title' => t('Suggest new connections'), 'title' => t('Suggest new connections'),
), ),
array( */
'pending' => array(
'label' => t('New Connections'), 'label' => t('New Connections'),
'url' => z_root() . '/connections/pending', 'url' => z_root() . '/connections/pending',
'sel' => ($pending) ? 'active' : '', 'sel' => ($pending) ? 'active' : '',
'title' => t('Show pending (new) connections'), 'title' => t('Show pending (new) connections'),
), ),
array(
'all' => array(
'label' => t('All Connections'), 'label' => t('All Connections'),
'url' => z_root() . '/connections/all', 'url' => z_root() . '/connections/all',
'sel' => ($all) ? 'active' : '', 'sel' => ($all) ? 'active' : '',
'title' => t('Show all connections'), 'title' => t('Show all connections'),
), ),
/*
array( array(
'label' => t('Unblocked'), 'label' => t('Unblocked'),
'url' => z_root() . '/connections', 'url' => z_root() . '/connections',
'sel' => (($unblocked) && (! $search) && (! $nets)) ? 'active' : '', 'sel' => (($unblocked) && (! $search) && (! $nets)) ? 'active' : '',
'title' => t('Only show unblocked connections'), 'title' => t('Only show unblocked connections'),
), ),
*/
array( 'blocked' => array(
'label' => t('Blocked'), 'label' => t('Blocked'),
'url' => z_root() . '/connections/blocked', 'url' => z_root() . '/connections/blocked',
'sel' => ($blocked) ? 'active' : '', 'sel' => ($blocked) ? 'active' : '',
'title' => t('Only show blocked connections'), 'title' => t('Only show blocked connections'),
), ),
array( 'ignored' => array(
'label' => t('Ignored'), 'label' => t('Ignored'),
'url' => z_root() . '/connections/ignored', 'url' => z_root() . '/connections/ignored',
'sel' => ($ignored) ? 'active' : '', 'sel' => ($ignored) ? 'active' : '',
'title' => t('Only show ignored connections'), 'title' => t('Only show ignored connections'),
), ),
array( 'archived' => array(
'label' => t('Archived'), 'label' => t('Archived'),
'url' => z_root() . '/connections/archived', 'url' => z_root() . '/connections/archived',
'sel' => ($archived) ? 'active' : '', 'sel' => ($archived) ? 'active' : '',
'title' => t('Only show archived connections'), 'title' => t('Only show archived connections'),
), ),
array( 'hidden' => array(
'label' => t('Hidden'), 'label' => t('Hidden'),
'url' => z_root() . '/connections/hidden', 'url' => z_root() . '/connections/hidden',
'sel' => ($hidden) ? 'active' : '', 'sel' => ($hidden) ? 'active' : '',
@ -184,8 +191,8 @@ function connections_content(&$a) {
); );
$tab_tpl = get_markup_template('common_tabs.tpl'); //$tab_tpl = get_markup_template('common_tabs.tpl');
$t = replace_macros($tab_tpl, array('$tabs'=>$tabs)); //$t = replace_macros($tab_tpl, array('$tabs'=>$tabs));
$searching = false; $searching = false;
if($search) { if($search) {
@ -224,6 +231,7 @@ function connections_content(&$a) {
$contacts[] = array( $contacts[] = array(
'img_hover' => sprintf( t('%1$s [%2$s]'),$rr['xchan_name'],$rr['xchan_url']), 'img_hover' => sprintf( t('%1$s [%2$s]'),$rr['xchan_name'],$rr['xchan_url']),
'edit_hover' => t('Edit connection'), 'edit_hover' => t('Edit connection'),
'delete_hover' => t('Delete connection'),
'id' => $rr['abook_id'], 'id' => $rr['abook_id'],
'alt_text' => $alt_text, 'alt_text' => $alt_text,
'dir_icon' => $dir_icon, 'dir_icon' => $dir_icon,
@ -232,7 +240,9 @@ function connections_content(&$a) {
'username' => $rr['xchan_name'], 'username' => $rr['xchan_name'],
'classes' => (intval($rr['abook_archived']) ? 'archived' : ''), 'classes' => (intval($rr['abook_archived']) ? 'archived' : ''),
'link' => z_root() . '/connedit/' . $rr['abook_id'], 'link' => z_root() . '/connedit/' . $rr['abook_id'],
'deletelink' => z_root() . '/connedit/' . $rr['abook_id'] . '/drop',
'edit' => t('Edit'), 'edit' => t('Edit'),
'delete' => t('Delete'),
'url' => chanlink_url($rr['xchan_url']), 'url' => chanlink_url($rr['xchan_url']),
'network' => network_to_name($rr['network']), 'network' => network_to_name($rr['network']),
); );
@ -257,12 +267,13 @@ function connections_content(&$a) {
else { else {
$o .= "<script> var page_query = '" . $_GET['q'] . "'; var extra_args = '" . extra_query_args() . "' ; </script>"; $o .= "<script> var page_query = '" . $_GET['q'] . "'; var extra_args = '" . extra_query_args() . "' ; </script>";
$o .= replace_macros(get_markup_template('connections.tpl'),array( $o .= replace_macros(get_markup_template('connections.tpl'),array(
'$header' => t('Connections') . (($head) ? ' - ' . $head : ''), '$header' => t('Connections') . (($head) ? ': ' . $head : ''),
'$tabs' => $t, '$tabs' => $tabs,
'$total' => $total, '$total' => $total,
'$search' => $search_hdr, '$search' => $search_hdr,
'$label' => t('Search'),
'$desc' => t('Search your connections'), '$desc' => t('Search your connections'),
'$finding' => (($searching) ? t('Finding: ') . "'" . $search . "'" : ""), '$finding' => (($searching) ? t('Connections search') . ": '" . $search . "'" : ""),
'$submit' => t('Find'), '$submit' => t('Find'),
'$edit' => t('Edit'), '$edit' => t('Edit'),
'$cmd' => $a->cmd, '$cmd' => $a->cmd,

View File

@ -1,151 +1,18 @@
.search-input { #contacts-search-form {
padding: 4px 12px; display: none;
margin: 3px;
} }
.field_abook_help { .section-subtitle-wrapper .btn-xs {
color: #000; margin-top: -2px;
}
.abook-them {
margin-left: 375px;
margin-bottom: 15px;
}
.abook-me {
margin-left: 36px;
margin-bottom: 15px;
}
.acheckbox {
margin-bottom: 5px !important;
} }
.abook-pending-contact { .contact-search {
background: orange; height: 22px;
font-weight: bold; border-top-right-radius: 0px;
margin: 10px; border-bottom-right-radius: 0px;
padding: 20px 5px 10px;
} }
#contact-slider { .directory-photo-img.archived {
width: 600px !important; opacity: 0.3;
} filter:alpha(opacity=30);
.abook-edit-them, .abook-edit-me {
float: left;
width: 100px !important;
}
.field_abook_help {
float: left;
}
#contacts-main {
margin-top: 20px;
margin-bottom: 20px;
}
#contact-edit-wrapper {
margin-top: 10px;
}
#contact-edit-banner-name {
font-size: 1.4em;
font-weight: bold;
}
#contact-edit-poll-wrapper {
margin-top: 15px;
}
#contact-edit-poll-text {
margin-top: 15px;
margin-bottom: 5px;
}
#contact-edit-update-now {
margin-top: 15px;
}
#contact-edit-links{
clear: both;
}
#contact-edit-links ul {
list-style: none;
list-style-type: none;
margin-left: 0px;
padding-left: 0px;
}
#contact-edit-links li {
margin-top: 5px;
}
#contact-edit-drop-link {
float: right;
margin-right: 20px;
}
#contact-edit-nav-end {
clear: both;
}
#contact-edit-wrapper {
width: 100%;
}
#contact-edit-end {
clear: both;
margin-top: 15px;
}
#contact-profile-selector {
width: 175px;
margin-left: 175px;
}
.contact-edit-submit {
margin-top: 20px;
}
.contact-entry-wrapper {
float: left;
width: auto;
height: auto;
padding: 10px;
margin: 8px 10px 0 0;
border-top: 1px solid #eee;
border-left: 2px solid #eee;
}
#contacts-search {
font-size: 1em;
width: 300px;
}
#contacts-search-end {
margin-bottom: 10px;
}
.contact-entry-photo-end {
clear: both;
}
.contact-entry-name {
float: left;
margin-left: 0px;
margin-right: 10px;
margin-bottom: 10px;
width: 147px;
height: auto;
overflow: hidden;
white-space: nowrap;
}
.contact-entry-name-end {
clear:both;
}
.contact-entry-end {
clear: both;
} }

View File

@ -23,17 +23,6 @@
margin-top: 10px; margin-top: 10px;
} }
/* follow */
#side-follow-url {
margin-top: 5px;
width: 100%;
}
#side-follow-submit {
margin-top: 15px;
}
/* notes */ /* notes */
#note-text { #note-text {

View File

@ -1,10 +1,15 @@
<div class="contact-entry-wrapper" id="contact-entry-wrapper-{{$contact.id}}" > <div id="contact-entry-wrapper-{{$contact.id}}">
<div class="contact-entry-photo-wrapper" > <div class="section-subtitle-wrapper">
<a href="{{$contact.url}}" title="{{$contact.img_hover}}" ><img class="contact-block-img {{if $contact.classes}}{{$contact.classes}}{{/if}}" src="{{$contact.thumb}}" alt="{{$contact.name}}" /></a> <div class="pull-right">
<a href="#" class="btn btn-danger btn-xs" title="{{$contact.delete_hover}}" onclick="dropItem('{{$contact.deletelink}}', '#contact-entry-wrapper-{{$contact.id}}'); return false;"><i class="icon-trash"></i> {{$contact.delete}}</a>
<a href="{{$contact.link}}" class="btn btn-success btn-xs" title="{{$contact.edit_hover}}"><i class="icon-pencil"></i> {{$contact.edit}}</a>
</div>
<h3><a href="{{$contact.url}}" title="{{$contact.img_hover}}" >{{$contact.name}}</a></h3>
</div>
<div class="section-content-tools-wrapper">
<div class="contact-entry-photo-wrapper" >
<a href="{{$contact.url}}" title="{{$contact.img_hover}}" ><img class="directory-photo-img {{if $contact.classes}}{{$contact.classes}}{{/if}}" src="{{$contact.thumb}}" alt="{{$contact.name}}" /></a>
</div>
</div> </div>
<div class="contact-entry-photo-end" ></div>
<a href="{{$contact.url}}" title="{{$contact.img_hover}}" ><div class="contact-entry-name" id="contact-entry-name-{{$contact.id}}" >{{$contact.name}}</div></a>
<div class="contact-entry-name-end" ></div>
<div class="contact-entry-edit btn btn-default"><a href="{{$contact.link}}"><i class="icon-pencil connection-edit-icons"></i> {{$contact.edit}}</a></div>
<div class="contact-entry-end" ></div>
</div> </div>

View File

@ -1,27 +1,38 @@
<div class="generic-content-wrapper-styled"> <div class="generic-content-wrapper">
<div class="section-title-wrapper">
<h1>{{$header}}{{if $total}} ({{$total}}){{/if}}</h1> <div class="dropdown pull-right">
<button type="button" class="btn btn-primary btn-xs" onclick="openClose('contacts-search-form');">
{{if $finding}}<h4>{{$finding}}</h4>{{/if}} <i class="icon-search"></i>&nbsp;{{$label}}
</button>
<div id="contacts-search-wrapper"> <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="{{$sort}}">
<form id="contacts-search-form" action="{{$cmd}}" method="get" > <i class="icon-sort"></i>
<span class="contacts-search-desc">{{$desc}}</span> </button>
<input type="text" name="search" id="contacts-search" class="search-input" onfocus="this.select();" value="{{$search}}" /> <ul class="dropdown-menu">
<input type="submit" name="submit" id="contacts-search-submit" class="btn btn-default" value="{{$submit}}" /> {{foreach $tabs as $menu}}
</form> <li><a href="{{$menu.url}}">{{$menu.label}}</a></li>
</div> {{/foreach}}
<div id="contacts-search-end"></div> </ul>
</div>
{{$tabs}} {{if $finding}}<h2>{{$finding}}</h2>{{else}}<h2>{{$header}}{{if $total}} ({{$total}}){{/if}}</h2>{{/if}}
</div>
<div id="connections-wrapper"> <div id="contacts-search-form" class="section-content-tools-wrapper">
{{foreach $contacts as $contact}} <form action="{{$cmd}}" method="get" >
{{include file="connection_template.tpl"}} <div class="form-group">
{{/foreach}} <div class="input-group">
<div id="page-end"></div> <input type="text" name="search" id="contacts-search" class="widget-input" onfocus="this.select();" value="{{$search}}" placeholder="{{$desc}}" />
</div> <div class="input-group-btn">
<div id="contact-edit-end"></div> <button id="contacts-search-submit" class="btn btn-default btn-sm" type="submit" name="submit" value="{{$submit}}"><i class="icon-search"></i></button>
</div>
</div>
</div>
</form>
</div>
<div id="connections-wrapper">
{{foreach $contacts as $contact}}
{{include file="connection_template.tpl"}}
{{/foreach}}
<div id="page-end"></div>
</div>
</div> </div>
<script>$(document).ready(function() { loadingPage = false;});</script> <script>$(document).ready(function() { loadingPage = false;});</script>
<div id="page-spinner"></div> <div id="page-spinner"></div>

View File

@ -1,9 +1,14 @@
<div id="follow-sidebar" class="widget"> <div id="follow-sidebar" class="widget">
<h3>{{$connect}}</h3> <h3>{{$connect}}</h3>
<div id="connect-desc">{{$desc}}</div>
<form action="follow" method="post" /> <form action="follow" method="post" />
<input id="side-follow-url" type="text" name="url" title="{{$hint}}" /> <div class="form-group">
<input id="side-follow-submit" type="submit" name="submit" class="btn btn-default" value="{{$follow}}" /> <div class="input-group">
<input class="widget-input" type="text" name="url" title="{{$hint}}" placeholder="{{$desc}}" />
<div class="input-group-btn">
<button class="btn btn-default btn-sm" type="submit" name="submit" value="{{$follow}}"><i class="icon-plus"></i></button>
</div>
</div>
</div>
</form> </form>
{{if $abook_usage_message}} {{if $abook_usage_message}}
<div class="usage-message" id="abook-usage-message">{{$abook_usage_message}}</div> <div class="usage-message" id="abook-usage-message">{{$abook_usage_message}}</div>

View File

@ -5,7 +5,7 @@
<div class="form-group"> <div class="form-group">
<div class="input-group"> <div class="input-group">
<input class="widget-input" type="text" name="search" title="{{$hint}}{{if $advanced_search}}{{$advanced_hint}}{{/if}}" placeholder="{{$desc}}" /> <input class="widget-input" type="text" name="search" title="{{$hint}}{{if $advanced_search}}{{$advanced_hint}}{{/if}}" placeholder="{{$desc}}" />
<div class="input-group-btn"> <div class="input-group-btn">
<button class="btn btn-default btn-sm" type="submit" name="submit"><i class="icon-search"></i></button> <button class="btn btn-default btn-sm" type="submit" name="submit"><i class="icon-search"></i></button>
</div> </div>
</div> </div>