whip mod manage into shape
This commit is contained in:
parent
28599fe652
commit
97e1a6dfde
@ -134,9 +134,7 @@ function manage_content(&$a) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$links = array(
|
$create = array( 'new_channel', t('Create a new channel'), t('Create New'));
|
||||||
array( 'new_channel', t('Create a new channel'), t('Create a new channel'))
|
|
||||||
);
|
|
||||||
|
|
||||||
$delegates = q("select * from abook left join xchan on abook_xchan = xchan_hash where
|
$delegates = q("select * from abook left join xchan on abook_xchan = xchan_hash where
|
||||||
abook_channel = %d and (abook_their_perms & %d) > 0",
|
abook_channel = %d and (abook_their_perms & %d) > 0",
|
||||||
@ -156,8 +154,6 @@ function manage_content(&$a) {
|
|||||||
$delegates = null;
|
$delegates = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$o = replace_macros(get_markup_template('channels.tpl'), array(
|
$o = replace_macros(get_markup_template('channels.tpl'), array(
|
||||||
'$header' => t('Channel Manager'),
|
'$header' => t('Channel Manager'),
|
||||||
'$msg_selected' => t('Current Channel'),
|
'$msg_selected' => t('Current Channel'),
|
||||||
@ -165,17 +161,16 @@ function manage_content(&$a) {
|
|||||||
'$desc' => t('Switch to one of your channels by selecting it.'),
|
'$desc' => t('Switch to one of your channels by selecting it.'),
|
||||||
'$msg_default' => t('Default Channel'),
|
'$msg_default' => t('Default Channel'),
|
||||||
'$msg_make_default' => t('Make Default'),
|
'$msg_make_default' => t('Make Default'),
|
||||||
'$links' => $links,
|
'$create' => $create,
|
||||||
'$all_channels' => $channels,
|
'$all_channels' => $channels,
|
||||||
'$mail_format' => t('%d new messages'),
|
'$mail_format' => t('%d new messages'),
|
||||||
'$intros_format' => t('%d new introductions'),
|
'$intros_format' => t('%d new introductions'),
|
||||||
'$channel_usage_message' => $channel_usage_message,
|
'$channel_usage_message' => $channel_usage_message,
|
||||||
'$delegate_header' => t('Delegated Channels'),
|
'$delegated_desc' => t('Delegated Channel'),
|
||||||
'$delegates' => $delegates,
|
'$delegates' => $delegates,
|
||||||
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
return $o;
|
return $o;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,57 +1,34 @@
|
|||||||
#channels-selected {
|
.make-default-link,
|
||||||
color: #666666;
|
.make-default-link:hover {
|
||||||
font-size: 0.8em;
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#channels-desc {
|
.new-notification {
|
||||||
color: #666666;
|
color: #c60032;
|
||||||
font-size: 1.2em;
|
}
|
||||||
margin-top: 15px;
|
|
||||||
|
.channel-photo-wrapper {
|
||||||
|
display: table-cell;
|
||||||
|
table-layout: fixed;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.channel-photo-wrapper img {
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.channel-notifications-wrapper {
|
||||||
|
display: table-cell;
|
||||||
|
table-layout: fixed;
|
||||||
|
vertical-align: top;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-channel {
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
|
|
||||||
|
#all-channels-end {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.channels-break {
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.channel-selection-default {
|
|
||||||
font-size: 0.8em;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.channel-selection {
|
|
||||||
width: 12em;
|
|
||||||
height: 16em;
|
|
||||||
float: left;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.channel-selection img {
|
|
||||||
display: block;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.channel-selection-name-link {
|
|
||||||
font-size: 1.2em;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.channel-selection-name-link .channel-name {
|
|
||||||
padding-top: 10px;
|
|
||||||
word-wrap: break-word;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.channels-notifications-wrapper {
|
|
||||||
clear: both;
|
|
||||||
padding-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.selected-channel img {
|
|
||||||
border: 2px solid #ff0000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.channels-end {
|
|
||||||
clear: both;
|
|
||||||
}
|
|
@ -1,12 +1,49 @@
|
|||||||
<div class='channel-selection {{if $selected == $channel.channel_id}}selected-channel{{/if}}'>
|
<div class="section-subtitle-wrapper">
|
||||||
{{if $channel.default_links}}
|
<div class="pull-right">
|
||||||
{{if $channel.default}}
|
{{if $channel.default_links}}
|
||||||
<div class="channel-selection-default default"><i class="icon-check"></i> {{$msg_default}}</div>
|
{{if $channel.default}}
|
||||||
{{else}}
|
<div>
|
||||||
<div class="channel-selection-default"><a href="manage/{{$channel.channel_id}}/default"><i class="icon-check-empty" title="{{$msg_make_default}}"></i></a></div>
|
<i class="icon-check"></i> {{$msg_default}}
|
||||||
{{/if}}
|
</div>
|
||||||
{{/if}}
|
{{else}}
|
||||||
<a href="{{$channel.link}}" class="channel-selection-photo-link" title="{{$channel.channel_name}}"><img class="channel-photo" src="{{$channel.xchan_photo_m}}" alt="{{$channel.channel_name}}" /></a>
|
<a href="manage/{{$channel.channel_id}}/default" class="make-default-link">
|
||||||
<div class="channels-notifications-wrapper">{{if $channel.delegate}}{{else}}<a href='manage/{{$channel.channel_id}}/message' style="{{if $channel.mail != 0}}color:#c60032;{{/if}}" title='{{$channel.mail|string_format:$mail_format}}'><i class="icon-envelope"></i> {{$channel.mail}}</a> <a href='manage/{{$channel.channel_id}}/connections/ifpending' style="{{if $channel.intros != 0}}color:#c60032;{{/if}}" title='{{$channel.intros|string_format:$intros_format}}'><i class="icon-user"></i> {{$channel.intros}}</a>{{/if}}</div>
|
<i class="icon-check-empty"></i> {{$msg_make_default}}
|
||||||
<a href="{{$channel.link}}" class="channel-selection-name-link" title="{{$channel.channel_name}}"><div class="channel-name">{{$channel.channel_name}}</div></a>
|
</a>
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
||||||
|
{{if $channel.delegate}}
|
||||||
|
{{$delegated_desc}}
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
|
<h3>
|
||||||
|
{{if $selected == $channel.channel_id}}
|
||||||
|
<i class="selected-channel icon-circle" title="{{$msg_selected}}"></i>
|
||||||
|
{{/if}}
|
||||||
|
{{if $channel.delegate}}
|
||||||
|
<i class="icon-circle-arrow-right" title="{{$delegated_desc}}"></i>
|
||||||
|
{{/if}}
|
||||||
|
{{if $selected != $channel.channel_id}}<a href="{{$channel.link}}" title="{{$channel.channel_name}}">{{/if}}
|
||||||
|
{{$channel.channel_name}}
|
||||||
|
{{if $selected != $channel.channel_id}}</a>{{/if}}
|
||||||
|
</h3>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
<div class="section-content-wrapper">
|
||||||
|
<div class="channel-photo-wrapper">
|
||||||
|
{{if $selected != $channel.channel_id}}<a href="{{$channel.link}}" class="channel-selection-photo-link" title="{{$channel.channel_name}}">{{/if}}
|
||||||
|
<img class="channel-photo" src="{{$channel.xchan_photo_m}}" alt="{{$channel.channel_name}}" />
|
||||||
|
{{if $selected != $channel.channel_id}}</a>{{/if}}
|
||||||
|
</div>
|
||||||
|
<div class="channel-notifications-wrapper">
|
||||||
|
{{if !$channel.delegate}}
|
||||||
|
<div class="channel-notification">
|
||||||
|
<i class="icon-envelope{{if $channel.mail != 0}} new-notification{{/if}}"></i>
|
||||||
|
{{if $channel.mail != 0}}<a href="manage/{{$channel.channel_id}}/mail/combined">{{/if}}{{$channel.mail|string_format:$mail_format}}{{if $channel.mail != 0}}</a>{{/if}}
|
||||||
|
</div>
|
||||||
|
<div class="channel-notification">
|
||||||
|
<i class="icon-user{{if $channel.intros != 0}} new-notification{{/if}}"></i>
|
||||||
|
{{if $channel.intros != 0}}<a href='manage/{{$channel.channel_id}}/connections/ifpending'>{{/if}}{{$channel.intros|string_format:$intros_format}}{{if $channel.intros != 0}}</a>{{/if}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,38 +1,24 @@
|
|||||||
<div class="generic-content-wrapper-styled">
|
<div class="generic-content-wrapper">
|
||||||
<h3>{{$header}}</h3>
|
<div class="section-title-wrapper">
|
||||||
|
<a class="btn btn-success btn-xs pull-right" href="{{$create.0}}" title="{{$create.1}}">{{$create.2}}</a>
|
||||||
{{if $links}}
|
<h2>{{$header}}</h2>
|
||||||
{{foreach $links as $l}}
|
</div>
|
||||||
<a class="channels-links" href="{{$l.0}}" title="{{$l.1}}">{{$l.2}}</a>
|
<div class="section-content-wrapper-np">
|
||||||
{{/foreach}}
|
{{if $channel_usage_message}}
|
||||||
{{/if}}
|
<div id="channel-usage-message" class="section-content-warning-wrapper">
|
||||||
<div class="channels-break"></div>
|
{{$channel_usage_message}}
|
||||||
|
</div>
|
||||||
{{if $channel_usage_message}}
|
{{/if}}
|
||||||
<div id="channel-usage-message" class="usage-message">
|
<div id="channels-desc" class="section-content-info-wrapper">
|
||||||
{{$channel_usage_message}}
|
{{$desc}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{foreach $all_channels as $chn}}
|
||||||
<div id="channels-desc" class="descriptive-text">{{$desc}}</div>
|
{{include file="channel.tpl" channel=$chn}}
|
||||||
|
{{/foreach}}
|
||||||
<div id="all-channels">
|
{{if $delegates}}
|
||||||
{{foreach $all_channels as $chn}}
|
{{foreach $delegates as $chn}}
|
||||||
{{include file="channel.tpl" channel=$chn}}
|
{{include file="channel.tpl" channel=$chn}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</div>
|
{{/if}}
|
||||||
|
</div>
|
||||||
<div class="channels-end all"></div>
|
|
||||||
|
|
||||||
{{if $delegates}}
|
|
||||||
<hr />
|
|
||||||
<h3>{{$delegate_header}}</h3>
|
|
||||||
<div id="delegated-channels">
|
|
||||||
{{foreach $delegates as $chn}}
|
|
||||||
{{include file="channel.tpl" channel=$chn}}
|
|
||||||
{{/foreach}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="channels-end all"></div>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user