diff options
-rw-r--r-- | mod/manage.php | 11 | ||||
-rw-r--r-- | view/css/mod_manage.css | 65 | ||||
-rwxr-xr-x | view/tpl/channel.tpl | 59 | ||||
-rwxr-xr-x | view/tpl/channels.tpl | 60 |
4 files changed, 95 insertions, 100 deletions
diff --git a/mod/manage.php b/mod/manage.php index 671003efd..1f7c26cd8 100644 --- a/mod/manage.php +++ b/mod/manage.php @@ -134,9 +134,7 @@ function manage_content(&$a) { } } - $links = array( - array( 'new_channel', t('Create a new channel'), t('Create a new channel')) - ); + $create = array( 'new_channel', t('Create a new channel'), t('Create New')); $delegates = q("select * from abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and (abook_their_perms & %d) > 0", @@ -156,8 +154,6 @@ function manage_content(&$a) { $delegates = null; } - - $o = replace_macros(get_markup_template('channels.tpl'), array( '$header' => t('Channel Manager'), '$msg_selected' => t('Current Channel'), @@ -165,17 +161,16 @@ function manage_content(&$a) { '$desc' => t('Switch to one of your channels by selecting it.'), '$msg_default' => t('Default Channel'), '$msg_make_default' => t('Make Default'), - '$links' => $links, + '$create' => $create, '$all_channels' => $channels, '$mail_format' => t('%d new messages'), '$intros_format' => t('%d new introductions'), '$channel_usage_message' => $channel_usage_message, - '$delegate_header' => t('Delegated Channels'), + '$delegated_desc' => t('Delegated Channel'), '$delegates' => $delegates, )); - return $o; } diff --git a/view/css/mod_manage.css b/view/css/mod_manage.css index fbe4a672a..077b6b838 100644 --- a/view/css/mod_manage.css +++ b/view/css/mod_manage.css @@ -1,57 +1,34 @@ -#channels-selected { - color: #666666; - font-size: 0.8em; +.make-default-link, +.make-default-link:hover { + color: inherit; + text-decoration: none; } -#channels-desc { - color: #666666; - font-size: 1.2em; - margin-top: 15px; - margin-bottom: 20px; -} - -.channels-break { - margin-bottom: 15px; -} - -.channel-selection-default { - font-size: 0.8em; - margin-bottom: 10px; +.new-notification { + color: #c60032; } -.channel-selection { - width: 12em; - height: 16em; - float: left; - text-align: center; +.channel-photo-wrapper { + display: table-cell; + table-layout: fixed; + vertical-align: top; } -.channel-selection img { - display: block; - margin-left: auto; - margin-right: auto; +.channel-photo-wrapper img { + border-radius: 4px; } -.channel-selection-name-link { - font-size: 1.2em; - margin-top: 10px; +.channel-notifications-wrapper { + display: table-cell; + table-layout: fixed; + vertical-align: top; + padding-left: 10px; } -.channel-selection-name-link .channel-name { - padding-top: 10px; - word-wrap: break-word; - overflow: hidden; +.selected-channel { + color: green; } -.channels-notifications-wrapper { - clear: both; - padding-top: 10px; -} - -.selected-channel img { - border: 2px solid #ff0000; +#all-channels-end { + margin-bottom: 20px; } - -.channels-end { - clear: both; -}
\ No newline at end of file diff --git a/view/tpl/channel.tpl b/view/tpl/channel.tpl index 23f1e0dd4..d306f0aa0 100755 --- a/view/tpl/channel.tpl +++ b/view/tpl/channel.tpl @@ -1,12 +1,49 @@ -<div class='channel-selection {{if $selected == $channel.channel_id}}selected-channel{{/if}}'> -{{if $channel.default_links}} -{{if $channel.default}} -<div class="channel-selection-default default"><i class="icon-check"></i> {{$msg_default}}</div> -{{else}} -<div class="channel-selection-default"><a href="manage/{{$channel.channel_id}}/default"><i class="icon-check-empty" title="{{$msg_make_default}}"></i></a></div> -{{/if}} -{{/if}} -<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> -<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> -<a href="{{$channel.link}}" class="channel-selection-name-link" title="{{$channel.channel_name}}"><div class="channel-name">{{$channel.channel_name}}</div></a> +<div class="section-subtitle-wrapper"> + <div class="pull-right"> + {{if $channel.default_links}} + {{if $channel.default}} + <div> + <i class="icon-check"></i> {{$msg_default}} + </div> + {{else}} + <a href="manage/{{$channel.channel_id}}/default" class="make-default-link"> + <i class="icon-check-empty"></i> {{$msg_make_default}} + </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> diff --git a/view/tpl/channels.tpl b/view/tpl/channels.tpl index 44daa0a3e..be9017bff 100755 --- a/view/tpl/channels.tpl +++ b/view/tpl/channels.tpl @@ -1,38 +1,24 @@ -<div class="generic-content-wrapper-styled"> -<h3>{{$header}}</h3> - -{{if $links}} -{{foreach $links as $l}} -<a class="channels-links" href="{{$l.0}}" title="{{$l.1}}">{{$l.2}}</a> -{{/foreach}} -{{/if}} -<div class="channels-break"></div> - -{{if $channel_usage_message}} -<div id="channel-usage-message" class="usage-message"> -{{$channel_usage_message}} -</div> -{{/if}} -<div id="channels-desc" class="descriptive-text">{{$desc}}</div> - -<div id="all-channels"> -{{foreach $all_channels as $chn}} -{{include file="channel.tpl" channel=$chn}} -{{/foreach}} -</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 class="generic-content-wrapper"> + <div class="section-title-wrapper"> + <a class="btn btn-success btn-xs pull-right" href="{{$create.0}}" title="{{$create.1}}">{{$create.2}}</a> + <h2>{{$header}}</h2> + </div> + <div class="section-content-wrapper-np"> + {{if $channel_usage_message}} + <div id="channel-usage-message" class="section-content-warning-wrapper"> + {{$channel_usage_message}} + </div> + {{/if}} + <div id="channels-desc" class="section-content-info-wrapper"> + {{$desc}} + </div> + {{foreach $all_channels as $chn}} + {{include file="channel.tpl" channel=$chn}} + {{/foreach}} + {{if $delegates}} + {{foreach $delegates as $chn}} + {{include file="channel.tpl" channel=$chn}} + {{/foreach}} + {{/if}} + </div> </div> |