mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
HQ dashboard - initial checkin
This commit is contained in:
@@ -49,16 +49,16 @@ class Hq extends \Zotlabs\Web\Controller {
|
||||
$sql_extra = '';
|
||||
|
||||
if(! $item_hash) {
|
||||
$r = q("SELECT mid FROM item
|
||||
WHERE uid = %d $item_normal
|
||||
AND mid = parent_mid
|
||||
AND item_private IN (0, 1)
|
||||
ORDER BY created DESC LIMIT 1",
|
||||
intval(local_channel())
|
||||
);
|
||||
if($r[0]['mid']) {
|
||||
$item_hash = $r[0]['mid'];
|
||||
}
|
||||
//$r = q("SELECT mid FROM item
|
||||
//WHERE uid = %d $item_normal
|
||||
//AND mid = parent_mid
|
||||
//AND item_private IN (0, 1)
|
||||
//ORDER BY created DESC LIMIT 1",
|
||||
//intval(local_channel())
|
||||
//);
|
||||
//if($r[0]['mid']) {
|
||||
//$item_hash = $r[0]['mid'];
|
||||
//}
|
||||
}
|
||||
|
||||
if($item_hash) {
|
||||
|
||||
@@ -166,6 +166,7 @@ class Page extends \Zotlabs\Web\Controller {
|
||||
function get() {
|
||||
|
||||
$r = \App::$data['webpage'];
|
||||
|
||||
if(! $r)
|
||||
return;
|
||||
|
||||
|
||||
@@ -19,15 +19,13 @@ class Hq_controls {
|
||||
if (! local_channel())
|
||||
return;
|
||||
|
||||
$entries = [
|
||||
'toggle_editor' => [
|
||||
$entries['toggle_editor'] = [
|
||||
'label' => t('Toggle post editor'),
|
||||
'href' => '#',
|
||||
'class' => 'btn jot-toggle',
|
||||
'type' => 'button',
|
||||
'icon' => 'pencil',
|
||||
'extra' => 'data-toggle="button"'
|
||||
]
|
||||
];
|
||||
|
||||
if(Apps::system_app_installed(local_channel(), 'Notes')) {
|
||||
@@ -41,6 +39,15 @@ class Hq_controls {
|
||||
];
|
||||
}
|
||||
|
||||
$entries['toggle_channel_activities'] = [
|
||||
'label' => t('Channel activities'),
|
||||
'href' => '#',
|
||||
'class' => 'btn channel-activities-toggle d-none',
|
||||
'type' => 'button',
|
||||
'icon' => 'user-circle-o',
|
||||
'extra' => 'data-toggle="button"'
|
||||
];
|
||||
|
||||
return replace_macros(get_markup_template('hq_controls.tpl'),
|
||||
[
|
||||
'$entries' => $entries,
|
||||
|
||||
@@ -2702,10 +2702,11 @@ function attach_move($channel_id, $resource_id, $new_folder_hash, $newname = '',
|
||||
}
|
||||
|
||||
|
||||
q("update attach set content = '%s', folder = '%s', filename = '%s' where id = %d",
|
||||
q("update attach set content = '%s', folder = '%s', filename = '%s', edited = '%s' where id = %d",
|
||||
dbescbin($newstorepath),
|
||||
dbesc($new_folder_hash),
|
||||
dbesc($filename),
|
||||
dbesc(datetime_convert()),
|
||||
intval($r[0]['id'])
|
||||
);
|
||||
|
||||
|
||||
@@ -1719,12 +1719,14 @@ function prepare_page($item) {
|
||||
}
|
||||
|
||||
$body = prepare_body($item, true, [ 'newwin' => false ]);
|
||||
$edit_link = (($item['uid'] === local_channel()) ? z_root() . '/editwebpage/' . argv(1) . '/' . $item['id'] : '');
|
||||
|
||||
if(App::$page['template'] == 'none') {
|
||||
$tpl = 'page_display_empty.tpl';
|
||||
|
||||
return replace_macros(get_markup_template($tpl), array(
|
||||
'$body' => $body['html']
|
||||
'$body' => $body['html'],
|
||||
'$edit_link' => $edit_link
|
||||
));
|
||||
|
||||
}
|
||||
@@ -1741,6 +1743,7 @@ function prepare_page($item) {
|
||||
'$body' => $body['html'],
|
||||
'$preview' => $preview,
|
||||
'$link' => $link,
|
||||
'$edit_link' => $edit_link
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
14
view/css/bootstrap-red.css
vendored
14
view/css/bootstrap-red.css
vendored
@@ -41,20 +41,6 @@ nav .dropdown-menu {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#navbar-collapse-2 {
|
||||
flex-basis: 100%;
|
||||
max-height: 70vh;
|
||||
}
|
||||
|
||||
#navbar-collapse-2.show {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
||||
#navbar-collapse-2.collapsing .dropdown-header,
|
||||
#navbar-collapse-2.show .dropdown-header {
|
||||
padding: 0.5rem 0.1rem;
|
||||
}
|
||||
|
||||
.navbar-dark .navbar-toggler {
|
||||
color: rgba(255,255,255,1);
|
||||
|
||||
@@ -316,14 +316,10 @@ a.wall-item-name-link {
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: Courier, monospace;
|
||||
font-size: 1em;
|
||||
padding: 1em 1.5em;
|
||||
display: block;
|
||||
}
|
||||
|
||||
code.inline-code {
|
||||
padding: 0.2em;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,27 +47,3 @@ td > i {
|
||||
#wikis-index td:nth-last-child(1){
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
pre code {
|
||||
background: #F5F5F5;
|
||||
font-family: Courier, monospace;
|
||||
font-size: 1em;
|
||||
padding: 1em 1.5em;
|
||||
display: block;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
code {
|
||||
background: #F5F5F5;
|
||||
font-family: Courier, monospace;
|
||||
font-size: 1em;
|
||||
display: inline;
|
||||
padding: 0.2em 0.2em;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
#wiki-content-container code {
|
||||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
@@ -164,8 +164,8 @@ $(document).ready(function() {
|
||||
jQuery.timeago.settings.allowFuture = true;
|
||||
|
||||
$(document).on('click', '.notification, .message', function(e) {
|
||||
let b64mid = $(this).data('b64mid');
|
||||
let notify_id = $(this).data('notify_id');
|
||||
let b64mid = this.dataset.b64mid;
|
||||
let notify_id = this.dataset.notify_id;
|
||||
let path = $(this)[0].pathname.split('/')[1];
|
||||
let stateObj = { b64mid: b64mid };
|
||||
let singlethread_modules = ['display', 'hq'];
|
||||
@@ -882,7 +882,7 @@ function updateInit() {
|
||||
if($('#live-channel').length) { src = 'channel'; }
|
||||
if($('#live-pubstream').length) { src = 'pubstream'; }
|
||||
if($('#live-display').length) { src = 'display'; }
|
||||
if($('#live-hq').length) { src = 'hq'; }
|
||||
//if($('#live-hq').length) { src = 'hq'; }
|
||||
if($('#live-search').length) { src = 'search'; }
|
||||
// if($('#live-cards').length) { src = 'cards'; }
|
||||
// if($('#live-articles').length) { src = 'articles'; }
|
||||
|
||||
@@ -14,6 +14,11 @@ $(document).ready(function () {
|
||||
|
||||
// Per File Tools
|
||||
|
||||
// highlight and scroll into view if we got an id via hash
|
||||
if(window.location.hash) {
|
||||
$('#cloud-index-' + window.location.hash.substr(1)).addClass('cloud-index-active').get(0).scrollIntoView({block: 'center'});
|
||||
}
|
||||
|
||||
$('.cloud-tool-info-btn').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
let id = $(this).data('id');
|
||||
|
||||
@@ -1,17 +1,42 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
$(document).on('click', '.jot-toggle', function(e) {
|
||||
$('.autotime').timeago();
|
||||
|
||||
if (bParam_mid) {
|
||||
src = 'hq';
|
||||
$('.channel-activities-toggle').removeClass('d-none');
|
||||
}
|
||||
else {
|
||||
$('#channel-activities').removeClass('d-none');
|
||||
}
|
||||
|
||||
$(document).one('click', '.notification, .message', function(e) {
|
||||
page_load = false;
|
||||
followUpPageLoad = true;
|
||||
src = 'hq';
|
||||
$('#channel-activities').addClass('d-none');
|
||||
$('.channel-activities-toggle').removeClass('d-none');
|
||||
});
|
||||
|
||||
$(document).on('click', '.channel-activities-toggle', function(e) {
|
||||
$(window).scrollTop(0);
|
||||
$(document).trigger('hz:hqControlsClickAction');
|
||||
$('#channel-activities').toggleClass('d-none');
|
||||
$(this).toggleClass('active');
|
||||
});
|
||||
|
||||
$(document).on('click', '.jot-toggle', function(e) {
|
||||
$(document).trigger('hz:hqControlsClickAction');
|
||||
$('#jot-popup').toggle();
|
||||
$('#profile-jot-text').focus();
|
||||
$('#profile-jot-text').focus().get(0).scrollIntoView({block: 'center'});
|
||||
$(this).toggleClass('active');
|
||||
});
|
||||
|
||||
$(document).on('click', '.notes-toggle', function(e) {
|
||||
$(window).scrollTop(0);
|
||||
$(document).trigger('hz:hqControlsClickAction');
|
||||
$('#personal-notes').toggleClass('d-none');
|
||||
$('#note-text').focus();
|
||||
$('#note-text-html').get(0).scrollIntoView({block: 'center'});
|
||||
$(this).toggleClass('active');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
[/widget]
|
||||
[/region]
|
||||
[region=content]
|
||||
[widget=channel_activities][/widget]
|
||||
[widget=notes]
|
||||
[var=hidden]1[/var]
|
||||
[var=app]1[/var]
|
||||
|
||||
@@ -145,23 +145,6 @@ input[type=text], textarea {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
pre code {
|
||||
border: none;
|
||||
padding: 1em 1.5em;
|
||||
}
|
||||
|
||||
code {
|
||||
background: #ccc;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
pre {
|
||||
background: #F5F5F5;
|
||||
color: #333;
|
||||
border:1px solid #ccc;
|
||||
border-radius: $radius;
|
||||
}
|
||||
|
||||
.heart {
|
||||
color: #FF0000;
|
||||
}
|
||||
@@ -209,7 +192,7 @@ nav {
|
||||
max-height: 50%;
|
||||
background: $comment_item_colour;
|
||||
padding: 1rem;
|
||||
border-bottom: #ccc 1px solid;
|
||||
border-bottom: #e0e0e0 1px solid;
|
||||
overflow: auto;
|
||||
-moz-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
|
||||
-webkit-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
|
||||
@@ -455,7 +438,7 @@ footer {
|
||||
.pager-prev,
|
||||
.pager-next,
|
||||
.pager_n {
|
||||
border: 1px solid #ccc;
|
||||
border: 1px solid #e0e0e0;
|
||||
background: transparent;
|
||||
padding: 4px;
|
||||
}
|
||||
@@ -706,7 +689,7 @@ nav .acpopup {
|
||||
*/
|
||||
.oauthapp {
|
||||
height: auto; overflow: auto;
|
||||
border-bottom: 2px solid #cccccc;
|
||||
border-bottom: 2px solid #e0e0e0;
|
||||
padding-bottom: 1em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
@@ -1086,7 +1069,7 @@ img.mail-conv-sender-photo {
|
||||
|
||||
.hide-comments-outer {
|
||||
background-color: $comment_item_colour;
|
||||
border-top-color: #ccc;
|
||||
border-top-color: #e0e0e0;
|
||||
border-style: solid;
|
||||
border-top-style: dashed;
|
||||
border-width: 1px 0px 0px 0px;
|
||||
@@ -1140,13 +1123,13 @@ img.mail-conv-sender-photo {
|
||||
|
||||
|
||||
.comment-edit-text {
|
||||
border: 1px solid #ccc;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: $radius;
|
||||
}
|
||||
|
||||
.divgrow-showmore {
|
||||
display: block;
|
||||
border-top: 1px dashed #ccc;
|
||||
border-top: 1px dashed #e0e0e0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -1180,7 +1163,7 @@ img.mail-conv-sender-photo {
|
||||
}
|
||||
|
||||
#datebrowse-sidebar select {
|
||||
border: 1px solid #ccc;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: $radius;
|
||||
}
|
||||
|
||||
@@ -1265,7 +1248,7 @@ img.mail-conv-sender-photo {
|
||||
}
|
||||
|
||||
.generic-content-wrapper {
|
||||
border: 1px solid rgba(0, 0, 0, .2);
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: $radius;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
@@ -1437,7 +1420,7 @@ main.fullscreen .section-content-wrapper-np {
|
||||
blockquote {
|
||||
font-size: 1rem;
|
||||
font-style: italic;
|
||||
border-left: 3px solid #ccc;
|
||||
border-left: 3px solid #e0e0e0;
|
||||
padding: 1em 0px 1em 1.5em;
|
||||
margin: 0px;
|
||||
}
|
||||
@@ -1612,7 +1595,7 @@ dl.bb-dl > dd > li {
|
||||
|
||||
.onoffswitch.checkbox > div label {
|
||||
display: block; overflow: hidden; cursor: pointer;
|
||||
border: 1px solid #ccc;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 12px;
|
||||
margin:0px;
|
||||
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
|
||||
@@ -1651,13 +1634,13 @@ dl.bb-dl > dd > li {
|
||||
.onoffswitch-inner:after {
|
||||
content: attr(data-off);
|
||||
padding-left: 21px;
|
||||
background-color: $item_colour; color: #ccc;
|
||||
background-color: $item_colour; color: #e0e0e0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.onoffswitch-switch {
|
||||
display: block; width: 15px; margin:4px;
|
||||
background: #ccc;
|
||||
background: #e0e0e0;
|
||||
border-radius: 10px;
|
||||
position: absolute; top: 0; bottom: 0; right: 36px;
|
||||
-moz-transition: all 0.3s ease-in 0s; -webkit-transition: all 0.3s ease-in 0s;
|
||||
@@ -1801,3 +1784,7 @@ span.default-highlight {
|
||||
.bootstrap-tagsinput {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.jg-entry img {
|
||||
border-radius: $radius;
|
||||
}
|
||||
|
||||
@@ -80,13 +80,13 @@ if (! $nav_active_icon_colour)
|
||||
if (! $link_colour)
|
||||
$link_colour = '#0d6efd';
|
||||
if (! $banner_colour)
|
||||
$banner_colour = '#fff';
|
||||
$banner_colour = '#efefef';
|
||||
if (! $bgcolour)
|
||||
$bgcolour = 'rgb(254,254,254)';
|
||||
if (! $background_image)
|
||||
$background_image ='';
|
||||
if (! $item_colour)
|
||||
$item_colour = 'rgb(238,238,238)';
|
||||
$item_colour = '#f6f6f6';
|
||||
if (! $comment_item_colour)
|
||||
$comment_item_colour = 'rgb(255,255,255)';
|
||||
if (! $item_opacity)
|
||||
|
||||
@@ -69,7 +69,9 @@
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.messages-timeago').timeago();
|
||||
if (bParam_mid) {
|
||||
$('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active');
|
||||
}
|
||||
});
|
||||
|
||||
$('#messages-widget').on('scroll', function() {
|
||||
@@ -130,7 +132,9 @@
|
||||
else {
|
||||
$('#messages-empty').show();
|
||||
}
|
||||
if (bParam_mid) {
|
||||
$('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active');
|
||||
}
|
||||
$('#messages-loading').hide();
|
||||
$('.messages-timeago').timeago();
|
||||
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
<div class="page-author"><a class="page-author-link" href="{{$auth_url}}">{{$author}}</a></div>
|
||||
<div class="page-date">{{$date}}</div>
|
||||
<div class="page-body">{{$body}}</div>
|
||||
{{if $edit_link}}
|
||||
<div class="position-fixed bottom-0 end-0 m-3">
|
||||
<a href="{{$edit_link}}" class="btn btn-lg btn-primary rounded-circle"><i class="fa fa-pencil"></i></a>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
{{$body}}
|
||||
{{if $edit_link}}
|
||||
<div class="position-fixed bottom-0 end-0 m-3">
|
||||
<a href="{{$edit_link}}" class="btn btn-lg btn-primary rounded-circle"><i class="fa fa-pencil"></i></a>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
Reference in New Issue
Block a user