diff options
Diffstat (limited to 'view/tpl')
-rw-r--r-- | view/tpl/channel_activities.tpl | 21 | ||||
-rw-r--r-- | view/tpl/channel_activities_photos.tpl | 19 | ||||
-rw-r--r-- | view/tpl/contact_edit_modal.tpl | 29 | ||||
-rw-r--r-- | view/tpl/messages_widget.tpl | 8 | ||||
-rw-r--r-- | view/tpl/page_display.tpl | 5 | ||||
-rw-r--r-- | view/tpl/page_display_empty.tpl | 7 |
6 files changed, 72 insertions, 17 deletions
diff --git a/view/tpl/channel_activities.tpl b/view/tpl/channel_activities.tpl new file mode 100644 index 000000000..a675f71db --- /dev/null +++ b/view/tpl/channel_activities.tpl @@ -0,0 +1,21 @@ +<div class="mb-1 text-uppercase"> + <a href="{{$url}}"><i class="fa fa-fw fa-{{$icon}} generic-icons-nav"></i>{{$label}}</a> +</div> +<div class="row mb-3"> + {{foreach $items as $i}} + <div class="col-sm-4 mb-3"> + <div class="card"> + <a href="{{$i.url}}" class="text-dark"> + <div class="card-body"> + {{if $i.title}} + <strong>{{$i.title}}</strong> + <hr> + {{/if}} + {{$i.summary}} + </div> + <div class="card-footer text-muted autotime" title="{{$i.footer}}">{{$i.footer}}</div> + </a> + </div> + </div> + {{/foreach}} +</div> diff --git a/view/tpl/channel_activities_photos.tpl b/view/tpl/channel_activities_photos.tpl new file mode 100644 index 000000000..b0079f382 --- /dev/null +++ b/view/tpl/channel_activities_photos.tpl @@ -0,0 +1,19 @@ +<div class="mb-1 text-uppercase"> + <a href="{{$url}}"><i class="fa fa-fw fa-{{$icon}} generic-icons-nav"></i>{{$label}}</a> +</div> +<div id="photo-album" class="mb-4"> + {{foreach $items as $i}} + <a href="{{$i.url}}" title="{{$i.alt}}"> + <img src="{{$i.src}}" width="{{$i.width}}" height="{{$i.height}}" alt="{{$i.alt}}"> + <div class='jg-caption autotime' title="{{$i.edited}}"></div> + </a> + {{/foreach}} +</div> +<script> + $('#photo-album').justifiedGallery({ + border: 0, + margins: 3, + maxRowsCount: 1, + waitThumbnailsLoad: false + }); +</script> diff --git a/view/tpl/contact_edit_modal.tpl b/view/tpl/contact_edit_modal.tpl index ddb1557c1..72feb7138 100644 --- a/view/tpl/contact_edit_modal.tpl +++ b/view/tpl/contact_edit_modal.tpl @@ -24,29 +24,24 @@ </div> </div> <script> + let poi; let section = 'roles'; let sub_section; - - $('#edit-modal').on('hidden.bs.modal', function (e) { - if (window.location.hash) { - history.replaceState(null, '', 'connections'); - } - }) - - if (window.location.hash) { - poi = window.location.hash.substr(1); - init_contact_edit(poi); - } - - window.onhashchange = function() { + $(document).ready(function() { if (window.location.hash) { poi = window.location.hash.substr(1); init_contact_edit(poi); } - }; + window.onhashchange = function() { + if (window.location.hash) { + poi = window.location.hash.substr(1); + init_contact_edit(poi); + } + }; + }); $(document).on('click', '.contact-edit', function (e) { e.preventDefault(); @@ -101,6 +96,12 @@ } }); + $('#edit-modal').on('hidden.bs.modal', function (e) { + if (window.location.hash) { + history.replaceState(null, '', 'connections'); + } + }); + function init_contact_edit(poi) { if (!poi) return; diff --git a/view/tpl/messages_widget.tpl b/view/tpl/messages_widget.tpl index 83f563db6..ddb21beb5 100644 --- a/view/tpl/messages_widget.tpl +++ b/view/tpl/messages_widget.tpl @@ -69,7 +69,9 @@ $(document).ready(function () { $('.messages-timeago').timeago(); - $('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active'); + if (bParam_mid) { + $('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active'); + } }); $('#messages-widget').on('scroll', function() { @@ -130,7 +132,9 @@ else { $('#messages-empty').show(); } - $('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active'); + if (bParam_mid) { + $('.message[data-b64mid=\'' + bParam_mid + '\']').addClass('active'); + } $('#messages-loading').hide(); $('.messages-timeago').timeago(); diff --git a/view/tpl/page_display.tpl b/view/tpl/page_display.tpl index a320920c7..589de0b41 100644 --- a/view/tpl/page_display.tpl +++ b/view/tpl/page_display.tpl @@ -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> diff --git a/view/tpl/page_display_empty.tpl b/view/tpl/page_display_empty.tpl index 9f000dee8..5a3bdc530 100644 --- a/view/tpl/page_display_empty.tpl +++ b/view/tpl/page_display_empty.tpl @@ -1 +1,6 @@ -{{$body}}
\ No newline at end of file +{{$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}} |