clean up the webpage list a bit
This commit is contained in:
parent
5c8c555461
commit
31fd284b3c
@ -164,7 +164,7 @@ $(document).ready(function() {
|
||||
<div style="color:#808080;font-weight:bold;font-size:3.0em; margin-bottom:30px;">Dream it. Do it.</div>
|
||||
<div id="word-flasher" style="font-size: 3.0em; font-weight: bold; margin-bottom: 30px;">RedMatrix</div>
|
||||
<div class="tr" style="font-size: 1.6em; color: #666; margin-left: 75px; margin-right: 75px;">
|
||||
The RedMatrix (aka "red") is an open source webapp providing a complete <strong>decentralised</strong> publishing, sharing, and communications system. It provides communications (private messaging, chat and social networking), media management (photos, events, files, web pages) and enough other features to make your head spin.
|
||||
The RedMatrix (aka "red") is an open source webapp providing a complete <strong>decentralised</strong> publishing, sharing, and communications system. It provides communications (private messaging, chat and social networking), media management (photos, events, files, web pages) and enough features to make your head spin.
|
||||
</div>
|
||||
<br />
|
||||
<div class="tr" style="font-size: 1.6em; color: #666; margin-left: 75px; margin-right: 75px;">
|
||||
|
@ -12,28 +12,38 @@ function writepages_widget ($who,$which){
|
||||
|
||||
|
||||
|
||||
// Chan is channel_id, $who is channel_address - we'll need to pass observer later too.
|
||||
function pagelist_widget ($chan,$who){
|
||||
$r = q("select * from item_id where uid = %d and service = 'WEBPAGE' order by sid asc",
|
||||
intval($chan)
|
||||
// Chan is channel_id, $which is channel_address - we'll need to pass observer later too.
|
||||
function pagelist_widget ($owner,$which){
|
||||
|
||||
$r = q("select * from item_id left join item on item_id.iid = item.id where item_id.uid = %d and service = 'WEBPAGE' order by item.created desc",
|
||||
intval($owner)
|
||||
);
|
||||
|
||||
$pages = null;
|
||||
// TODO - only list public pages. Doesn't matter for now, since we don't have ACL anyway.
|
||||
|
||||
if($r) {
|
||||
$pages = array();
|
||||
foreach($r as $rr) {
|
||||
$pages[$rr['iid']][] = array('url' => $rr['iid'],'title' => $rr['sid']);
|
||||
$pages[$rr['iid']][] = array('url' => $rr['iid'],'pagetitle' => $rr['sid'],'title' => $rr['title'],'created' => datetime_convert('UTC',date_default_timezone_get(),$rr['created']),'edited' => datetime_convert('UTC',date_default_timezone_get(),$rr['edited']));
|
||||
}
|
||||
}
|
||||
|
||||
return replace_macros(get_markup_template('webpagelist.tpl'), array(
|
||||
//Build the base URL for edit links
|
||||
$url = z_root() . "/editwebpage/" . $which;
|
||||
// This isn't pretty, but it works. Until I figure out what to do with the UI, it's Good Enough(TM).
|
||||
return $o . replace_macros(get_markup_template("webpagelist.tpl"), array(
|
||||
'$baseurl' => $url,
|
||||
'$edit' => '',
|
||||
'$edit' => t('Edit'),
|
||||
'$pages' => $pages,
|
||||
'$channel' => $who,
|
||||
'$preview' => '',
|
||||
'$widget' => 1,
|
||||
'$channel' => $which,
|
||||
'$view' => t('View'),
|
||||
'$preview' => t('Preview'),
|
||||
'$actions_txt' => t('Actions'),
|
||||
'$pagelink_txt' => t('Page Link'),
|
||||
'$title_txt' => t('Title'),
|
||||
'$created_txt' => t('Created'),
|
||||
'$edited_txt' => t('Edited')
|
||||
|
||||
));
|
||||
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ function webpages_content(&$a) {
|
||||
// Get a list of webpages. We can't display all them because endless scroll makes that unusable, so just list titles and an edit link.
|
||||
//TODO - this should be replaced with pagelist_widget
|
||||
|
||||
$r = q("select item_id.* from item_id left join item on item_id.iid = item.id where item_id.uid = %d and service = 'WEBPAGE' order by item.created desc",
|
||||
$r = q("select * from item_id left join item on item_id.iid = item.id where item_id.uid = %d and service = 'WEBPAGE' order by item.created desc",
|
||||
intval($owner)
|
||||
);
|
||||
|
||||
@ -106,7 +106,7 @@ function webpages_content(&$a) {
|
||||
if($r) {
|
||||
$pages = array();
|
||||
foreach($r as $rr) {
|
||||
$pages[$rr['iid']][] = array('url' => $rr['iid'],'title' => $rr['sid']);
|
||||
$pages[$rr['iid']][] = array('url' => $rr['iid'],'pagetitle' => $rr['sid'],'title' => $rr['title'],'created' => datetime_convert('UTC',date_default_timezone_get(),$rr['created']),'edited' => datetime_convert('UTC',date_default_timezone_get(),$rr['edited']));
|
||||
}
|
||||
}
|
||||
|
||||
@ -121,6 +121,11 @@ function webpages_content(&$a) {
|
||||
'$channel' => $which,
|
||||
'$view' => t('View'),
|
||||
'$preview' => t('Preview'),
|
||||
'$actions_txt' => t('Actions'),
|
||||
'$pagelink_txt' => t('Page Link'),
|
||||
'$title_txt' => t('Title'),
|
||||
'$created_txt' => t('Created'),
|
||||
'$edited_txt' => t('Edited')
|
||||
|
||||
));
|
||||
|
||||
|
@ -1 +1 @@
|
||||
2014-04-28.659
|
||||
2014-04-29.660
|
||||
|
6
view/css/mod_webpages.css
Normal file
6
view/css/mod_webpages.css
Normal file
@ -0,0 +1,6 @@
|
||||
.webpage-list-table tr {
|
||||
height: 20px;
|
||||
}
|
||||
.webpage-list-table td {
|
||||
padding: 5px;
|
||||
}
|
@ -1715,19 +1715,6 @@ header {
|
||||
.profile-thing-list {
|
||||
list-style-type: none;
|
||||
}
|
||||
/*
|
||||
.profile-thing-list li {
|
||||
float: left;
|
||||
margin-right: 25px;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
div#pagelist-content-wrapper {
|
||||
width: 80%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
div.page-list-item {
|
||||
margin: 20px;
|
||||
|
@ -1,16 +1,35 @@
|
||||
{{if $pages}}
|
||||
|
||||
<div id="pagelist-content-wrapper" class="generic-content-wrapper">
|
||||
<table class="webpage-list-table">
|
||||
<tr><td>{{$actions_txt}}</td><td>{{$pagelink_txt}}</td><td>{{$title_txt}}</td><td>{{$created_txt}}</td><td>{{$edited_txt}}</td></tr>
|
||||
{{foreach $pages as $key => $items}}
|
||||
{{foreach $items as $item}}
|
||||
<div class="page-list-item">
|
||||
{{if $edit}}<a href="{{$baseurl}}/{{$item.url}}" title="{{$edit}}"><i class="icon-pencil design-icons design-edit-icon"></i></a> {{/if}}
|
||||
{{if $view}}<a href="page/{{$channel}}/{{$item.title}}" title="{{$view}}"><i class="icon-external-link design-icons design-view-icon"></i></a> {{/if}}
|
||||
{{if $preview}}<a href="page/{{$channel}}/{{$item.title}}?iframe=true&width=80%&height=80%" title="{{$preview}}" class="webpage-preview" ><i class="icon-eye-open design-icons design-preview-icon"></i></a> {{/if}}
|
||||
<tr>
|
||||
<td>
|
||||
{{if $edit}}<a href="{{$baseurl}}/{{$item.url}}" title="{{$edit}}"><i class="icon-pencil design-icons design-edit-icon btn btn-default"></i></a> {{/if}}
|
||||
{{if $view}}<a href="page/{{$channel}}/{{$item.pagetitle}}" title="{{$view}}"><i class="icon-external-link design-icons design-view-icon btn btn-default"></i></a> {{/if}}
|
||||
{{if $preview}}<a href="page/{{$channel}}/{{$item.pagetitle}}?iframe=true&width=80%&height=80%" title="{{$preview}}" class="webpage-preview" ><i class="icon-eye-open design-icons design-preview-icon btn btn-default"></i></a> {{/if}}
|
||||
</td>
|
||||
<td>
|
||||
{{if $view}}<a href="page/{{$channel}}/{{$item.pagetitle}}" title="{{$view}}">{{$item.pagetitle}}</a>
|
||||
{{else}}{{$item.pagetitle}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>
|
||||
{{$item.title}}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{$item.created}}
|
||||
</td>
|
||||
<td>
|
||||
{{$item.edited}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
{{/foreach}}
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
Reference in New Issue
Block a user