Project

General

Profile

1
<aside id="sidebar_main">
2
  <div *ngIf="stakeholder" class="sidebar_main_header">
3
    <div class="uk-padding-small">
4
      <img class="uk-margin-bottom" *ngIf="stakeholder.logoUrl" [src]="stakeholder.logoUrl">
5
      <h4 class="uk-text-bold uk-margin-remove">{{stakeholder.index_name}}</h4>
6
      <span class="uk-text-large">Admin Dashboard</span>
7
    </div>
8
  </div>
9
  <div *ngIf="stakeholder" class="menu_section">
10
    <ul>
11
      <li [class.current_section]="analysisOpen"
12
          [class.act_section]="analysisOpen"
13
          class="submenu_trigger">
14
        <a href="#" (click)="analysisOpen = !analysisOpen; $event.preventDefault()">
15
          <span class="menu_icon"><i class="material-icons">donut_large</i></span>
16
          <span class="menu_title">Analysis Indicators</span>
17
        </a>
18
        <ul [style.display]="(analysisOpen?'block':'none')">
19
          <ng-template ngFor [ngForOf]="stakeholder.topics" let-topic let-i="index">
20
            <li>
21
              <a [routerLink]="topic.alias">
22
                <span *ngIf="topic.icon" class="menu_icon uk-margin-small-right"><i
23
                  class="material-icons">{{topic.icon}}</i></span>
24
                <div class="menu_title uk-inline">
25
                  {{topic.name}}
26
                  <button class="uk-position-center-right-out uk-margin-right uk-button uk-button-link onHover"
27
                          (click)="$event.stopPropagation();saveTopicOpen(editTopic, i); $event.preventDefault()">
28
                    <i class="material-icons">more_horiz</i>
29
                  </button>
30
                </div>
31
              </a>
32
              <div uk-drop="mode: none; offset: -2; delay-hide: 0;" #editTopic
33
                   class="uk-padding-large uk-padding-remove-vertical uk-padding-remove-right uk-drop">
34
                <div *ngIf="copyTopic">
35
                  <div class="md-card">
36
                    <div class="md-card-content uk-position-relative">
37
                      <a class="uk-position-top-right">
38
                        <i (click)="hide(editTopic)" class="material-icons">close</i>
39
                      </a>
40
                      <div class="uk-grid-small" uk-grid>
41
                        <div class="uk-width-1-1">
42
                          <label class="uk-text-bold">Topic Settings</label>
43
                          <input class="uk-input uk-form-small" [(ngModel)]="copyTopic.name"
44
                                 [class.uk-form-danger]="!valid && !copyTopic.name"
45
                                 type="text">
46
                        </div>
47
                        <div class="uk-width-1-1">
48
                          <label>Description</label>
49
                          <textarea class="uk-textarea" [(ngModel)]="copyTopic.description"
50
                                    rows="3" type="text"></textarea>
51
                        </div>
52
                        <div class="uk-width-1-2">
53
                          <select class="uk-select uk-form-small" [(ngModel)]="copyTopic.isPublic">
54
                            <option [value]="true">Public</option>
55
                            <option [value]="false">Private</option>
56
                          </select>
57
                        </div>
58
                        <div class="uk-width-1-2">
59
                          <select class="uk-select uk-form-small" [(ngModel)]="copyTopic.isActive">
60
                            <option [value]="true">Active</option>
61
                            <option [value]="false">Inactive</option>
62
                          </select>
63
                        </div>
64
                      </div>
65
                      <hr>
66
                      <div class="uk-grid-small uk-child-width-1-2" uk-grid>
67
                        <div>
68
                          <button class="md-btn md-btn-small" (click)="deleteTopicOpen(copyTopic.name, editTopic, i)">Delete</button>
69
                        </div>
70
                        <div>
71
                          <button class="md-btn md-btn-small md-btn-primary uk-float-right"
72
                                  (click)="saveTopic(editTopic, i)">Save
73
                          </button>
74
                        </div>
75
                      </div>
76
                    </div>
77
                  </div>
78
                </div>
79
              </div>
80
            </li>
81
          </ng-template>
82
          <li>
83
            <a href="#" (click)="saveTopicOpen(newTopic); $event.preventDefault()">
84
              <span class="menu_icon"><i class="material-icons">add</i></span>
85
              <span class="menu_title">Create new Topic</span>
86
            </a>
87
            <div uk-drop="mode: none; offset: -2; delay-hide: 0" #newTopic
88
                 class="uk-padding-large uk-padding-remove-vertical uk-padding-remove-right uk-drop">
89
              <div *ngIf="copyTopic">
90
                <div class="md-card">
91
                  <div class="md-card-content uk-position-relative">
92
                    <a class="uk-position-top-right">
93
                      <i (click)="hide(newTopic)" class="material-icons">close</i>
94
                    </a>
95
                    <div class="uk-grid-small" uk-grid>
96
                      <div class="uk-width-1-1">
97
                        <label class="uk-text-bold">New Topic</label>
98
                        <input class="uk-input uk-form-small" [(ngModel)]="copyTopic.name"
99
                               [class.uk-form-danger]="!valid && !copyTopic.name"
100
                               type="text">
101
                      </div>
102
                      <div class="uk-width-1-1">
103
                        <label>Description</label>
104
                        <textarea class="uk-textarea" [(ngModel)]="copyTopic.description"
105
                                  rows="3" type="text"></textarea>
106
                      </div>
107
                      <div class="uk-width-1-2">
108
                        <select class="uk-select uk-form-small" [(ngModel)]="copyTopic.isPublic">
109
                          <option [value]="true">Public</option>
110
                          <option [value]="false">Private</option>
111
                        </select>
112
                      </div>
113
                      <div class="uk-width-1-2">
114
                        <select class="uk-select uk-form-small" [(ngModel)]="copyTopic.isActive">
115
                          <option [value]="true">Active</option>
116
                          <option [value]="false">Inactive</option>
117
                        </select>
118
                      </div>
119
                    </div>
120
                    <hr>
121
                    <div class="uk-grid-small uk-child-width-1-2" uk-grid>
122
                      <div>
123
                        <button class="md-btn md-btn-small" (click)="hide(newTopic)">Cancel</button>
124
                      </div>
125
                      <div>
126
                        <button class="md-btn md-btn-small md-btn-primary uk-float-right" (click)="saveTopic(newTopic)">
127
                          Create
128
                        </button>
129
                      </div>
130
                    </div>
131
                  </div>
132
                </div>
133
              </div>
134
            </div>
135
          </li>
136
        </ul>
137
      </li>
138
    </ul>
139
  </div>
140
</aside>
141
<div id="page_content" click-outside-or-esc targetId="page_content" (clickOutside)="toggleOpen($event)">
142
  <div id="page_content_inner">
143
    <h4 class="uk-text-bold">
144
      Customise your Monitor Dashboard!
145
    </h4>
146
    <div class="uk-text-large uk-margin-bottom">
147
      <div>
148
        Modify or add new topics, categories and content.<br><br>
149
        Start your navigation through the <span class="md-color-blue-900">left side menu!</span>
150
      </div>
151
      <div class="uk-margin-small-top uk-margin-small-bottom uk-margin-large-left">
152
        <svg xmlns="http://www.w3.org/2000/svg" width="30" height="88" viewBox="0 0 30 88">
153
          <g id="Group_749" data-name="Group 749" transform="translate(-872.168 -490.5)">
154
            <text class="fill_text" id="OR" transform="translate(872.168 540.271)" font-size="18"
155
                  font-family="OpenSans-Bold, Open Sans" font-weight="900" opacity="0.8">
156
              <tspan x="0" y="0">OR</tspan>
157
            </text>
158
            <line class="stroke_line" id="Line_225" data-name="Line 225" y2="30" transform="translate(885.5 490.5)"
159
                  fill="none" stroke="#000" stroke-width="1" opacity="0.2"/>
160
            <line class="stroke_line" id="Line_226" data-name="Line 226" y2="30" transform="translate(885.5 548.5)"
161
                  fill="none" stroke="#000" stroke-width="1" opacity="0.2"/>
162
          </g>
163
        </svg>
164
      </div>
165
      <div class="uk-width-1-1">
166
        Select one of the <span class="md-color-blue-900">topics below</span>!
167
      </div>
168
    </div>
169
    <div *ngIf="stakeholder" class="uk-child-width-1-3@m uk-child-width-1-1@s uk-grid-match uk-grid-medium" uk-grid>
170
      <ng-template ngFor [ngForOf]="stakeholder.topics" let-topic>
171
        <div>
172
          <a [routerLink]="topic.alias" class="md-card">
173
            <div class="md-card-content">
174
              <h6 class="uk-text-bold">{{topic.name}}</h6>
175
              <div class="uk-text-secondary">
176
                {{topic.description}}
177
              </div>
178
            </div>
179
          </a>
180
        </div>
181
      </ng-template>
182
    </div>
183
  </div>
184
</div>
185
<modal-alert #deleteTopicModal (alertOutput)="deleteTopic()"></modal-alert>
(2-2/4)