Laverna/laverna

View on GitHub
app/scripts/apps/notes/show/templates/item.html

Summary

Maintainability
Test Coverage
<nav class="layout--navbar header navbar navbar-static-top -note">
<div class="container-fluid">
    <div class="navbar-left header--left navbar-btn">
        <button title="{{i18n('Show sidebar')}}" id="show--sidebar" class="btn -note btn-default visible-xs">
            <span class="icon-left-open"></span>
        </button>
    </div>

    <div class="navbar-right header--right navbar-btn dropdown">
        <a href="#{{uri}}notes/edit/{{id}}" class="btn -note btn-default note--edit">
            <span class="icon-pencil"></span>
            <span class="hidden-xs">{{i18n('Edit')}}</span>
        </a>
        <a href="#" class="btn -note btn-default note--remove">
            <span class="icon-trashed"></span>
            <span class="hidden-xs"><% if (trash === 0) { %>{{i18n('Delete')}}<% } else { %> {{i18n('Forever')}}<% } %></span>
        </a>
        <% if (trash !== 1) { %>
        <a href="#{{uri}}settings" class="btn -note btn-default">
            <span class="icon-cog"></span>
            <span>{{i18n('Settings')}}</span>
        </a>
        <% } else { %>
        <a href="#" class="btn -note btn-default" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            <b class="caret"></b>
        </a>
        <div class="dropdown-menu">
            <div class="btn-group">
                <a href="#" class="note--restore btn">
                    <span class="icon-undo icon--block"></span>
                    {{i18n('Restore')}}
                </a>
                <a href="#{{uri}}settings" class="btn">
                    <span class="icon-cog icon--block"></span>
                    {{i18n('Settings')}}
                </a>
            </div>
        </div>
        <% } %>
    </div>
</div>
</nav>

<div class="layout--body -scroll -note">
    <div class="content container-fluid -note" data-id="{{id}}">
        <header>
            <h1 class="page-header -note">
                {=cleanXSS(title)}
                <small class="note--date">{{createdDate()}}</small>
                <button type="button" class="btn btn-link btn--favourite pull-right">
                    <span class="btn--favourite--icon icon-star-empty <% if (isFavorite === 1) {%>icon-favorite<% } %>"></span>
                </button>
            </h1>
        </header>

        <% if (taskAll !== 0) { %>
        <div class="progress">
            <div class="progress-bar progress-bar-info" role="progressbar"
                aria-valuenow="{{taskCompleted}}" aria-valuemin="0" aria-valuemax="{{taskAll}}" style="width: {{getProgress(taskCompleted, taskAll)}}%">
                <span class="progress-percent">
                    {{getProgress()}}%
                </span>
            </div>
        </div>
        <% } %>

        <p class="note--notebook">
            <% if (notebook && notebook.id) { %>
            <a href="#{{uri}}notes/f/notebook/q/{{notebook.id}}">
                <i class="icon-notebook"></i> {=cleanXSS(notebook.name)}
            </a>
            <% } %>
        </p>

        <div>
            {=content}
        </div>
    </div>
</div>