mirror of
https://github.com/JanGross/quicknotes.git
synced 2025-11-30 23:37:16 +01:00
Fix backend to shared notes, and initial fronted code.
This commit is contained in:
@@ -2,18 +2,7 @@
|
||||
<div id="notes-grid-div" class="notes-grid">
|
||||
{{#each notes}}
|
||||
<div class="note-grid-item">
|
||||
<div class="quicknote noselect {{#if isshared}}shared{{/if}} {{#if sharedwith}}shareowner{{/if}}" style="background-color: {{color}}" data-id="{{ id }}" data-timestamp="{{ timestamp }}" >
|
||||
{{#if isshared}}
|
||||
<div>
|
||||
<div class='icon-share shared-title' title="Shared by {{ userid }}"></div>
|
||||
<div class='note-title'>
|
||||
{{{ title }}}
|
||||
</div>
|
||||
</div>
|
||||
<div id='content' class='note-content'>
|
||||
{{{ content }}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="quicknote noselect" style="background-color: {{color}}" data-id="{{ id }}" data-timestamp="{{ timestamp }}" >
|
||||
<div class='note-header'>
|
||||
<div class='note-attachts'>
|
||||
{{#each attachts}}
|
||||
@@ -25,17 +14,14 @@
|
||||
</div>
|
||||
<div class='note-body'>
|
||||
<div>
|
||||
{{#unless is_shared}}
|
||||
{{#if ispinned}}
|
||||
<div class="icon-header-note icon-pinned fixed-header-icon" title="{{t "quicknotes" "Unpin note"}}"></div>
|
||||
{{else}}
|
||||
<div class="icon-header-note icon-pin hide-header-icon" title="{{t "quicknotes" "Pin note"}}"></div>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
<div class="icon-header-note icon-delete hide-header-icon icon-delete-note" title="{{t "quicknotes" "Delete note"}}"></div>
|
||||
<!--
|
||||
{{#if sharedwith}}
|
||||
<div class='icon-share shared-title-owner' title="Shared with {{ sharedwith }}"></div>
|
||||
{{/if}}
|
||||
-->
|
||||
<div class='note-title'>
|
||||
{{{ title }}}
|
||||
</div>
|
||||
@@ -43,6 +29,14 @@
|
||||
<div class='note-content'>
|
||||
{{{ content }}}
|
||||
</div>
|
||||
<div class='note-shares'>
|
||||
{{#each shared_with}}
|
||||
<div class="icon-user slim-share" share-id="{{ id }}" title="Shared with {{ shared_user }}">{{{ shared_user }}}</div>
|
||||
{{/each}}
|
||||
{{#each shared_by}}
|
||||
<div class="icon-user slim-share" share-id="{{ id }}" title="Shared by {{ user_id }}">{{{ user_id }}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
<div class='note-tags'>
|
||||
{{#each tags}}
|
||||
<div class='icon-tag slim-tag' tag-id="{{ id }}">
|
||||
@@ -51,7 +45,6 @@
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
@@ -68,6 +61,7 @@
|
||||
<div contenteditable="true" id='title-editable' class='note-title'></div>
|
||||
</div>
|
||||
<div contenteditable="true" id='content-editable' class='note-content'></div>
|
||||
<div class='note-shares'></div>
|
||||
<div class='note-tags'></div>
|
||||
</div>
|
||||
<div class="note-options">
|
||||
@@ -87,9 +81,9 @@
|
||||
<a href="#" class="circle-toolbar" style="background-color: #CECECE"></a>
|
||||
</div>
|
||||
<div class="buttons-toolbar">
|
||||
<!--
|
||||
<button id='share-button'><?php p($l->t('Share'));?></button>
|
||||
-->
|
||||
<button id='share-button' class='round-tool-button'>
|
||||
<div class="icon-shared" title="{{t "quicknotes" "Share note"}}"></div>
|
||||
</button>
|
||||
<button id='attach-button' class='round-tool-button'>
|
||||
<div class="icon-picture" title="{{t "quicknotes" "Attach file"}}"></div>
|
||||
</button>
|
||||
@@ -102,10 +96,14 @@
|
||||
<button id='save-button'>
|
||||
{{ saveTxt }}
|
||||
</button>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<div class="note-disable-options">
|
||||
<div class="buttons-toolbar">
|
||||
<button id='close-button'>{{t "quicknotes" "Close"}}</button>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
8
js/templates/shares.handlebars
Normal file
8
js/templates/shares.handlebars
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class='note-shares'>
|
||||
{{#each shared_with}}
|
||||
<div class="icon-user slim-share" share-id="{{ id }}" title="Shared with {{ shared_user }}">{{{ shared_user }}}</div>
|
||||
{{/each}}
|
||||
{{#each shared_by}}
|
||||
<div class="icon-user slim-share" share-id="{{ id }}" title="Shared from {{ user_id }}">{{{ user_id }}}</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
Reference in New Issue
Block a user