.section.notes
  .content
    .section-title-bar.notes-title-bar
      .title {{ctrl.tag.content.title}} notes
      .add-button{"ng-click" => "ctrl.createNewNote()"} +
      %br
      .filter-section
        %input.filter-bar{"select-on-click" => "true", "ng-model" => "ctrl.noteFilter.text", "placeholder" => "Filter", "ng-change" => "ctrl.filterTextChanged()", "lowercase" => "true"}
      .section-menu.tag-menu-bar
        %ul.nav.nav-pills
          %li.dropdown
            %a.dropdown-toggle{"ng-click" => "ctrl.showMenu = !ctrl.showMenu"}
              File
              %span.caret
              %span.sr-only
            %ul.dropdown-menu.dropdown-menu-left.nt-dropdown-menu.dark{"ng-if" => "ctrl.showMenu"}
              %li{"ng-if" => "!ctrl.tag.isPublic()"}
                %a.text{"ng-click" => "ctrl.selectedMenuItem(); ctrl.selectedTagShare($event)"} Share Tag
              %li{"ng-if" => "ctrl.tag.isPublic()"}
                %a.text{"ng-click" => "ctrl.selectedMenuItem(); ctrl.selectedTagUnshare()"} Unshare Tag
              %li{"ng-if" => "!ctrl.tag.all"}
                %a.text{"ng-click" => "ctrl.selectedMenuItem(); ctrl.selectedTagDelete()"} Delete Tag
        .menu-right-container
          .public-link{"ng-if" => "ctrl.tag.isPublic()"}
            %a.url{"ng-if" => "!ctrl.editingUrl", "href" => "{{ctrl.tag.presentationURL()}}", "target" => "_blank"}
              %span.icon-rss.icon
              {{ctrl.tag.presentationURL()}}
            .edit-url{"ng-if" => "ctrl.editingUrl"}
              {{ctrl.url.base}}
              %input.input{"ng-model" => "ctrl.url.token", "ng-keyup" => "$event.keyCode == 13 && ctrl.saveUrl($event)",
                        "ng-change" => "ctrl.urlChanged()", "ng-focus" => "ctrl.onUrlFocus()",
                        "select-on-click" => "true", "autofocus" => "true"}
    .note{"ng-repeat" => "note in ctrl.tag.notes | filter: ctrl.filterNotes",
        "ng-click" => "ctrl.selectNote(note)", "ng-class" => "{'selected' : ctrl.selectedNote == note}",
        "ng-attr-draggable" => "{{note.dummy ? undefined : 'true'}}", "note" => "note"}
      .name
        {{note.content.title}}
      .date {{(note.created_at | appDateTime) || 'Now'}}
