-
Notifications
You must be signed in to change notification settings - Fork 0
/
orgchart.html
121 lines (100 loc) · 3.48 KB
/
orgchart.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<head>
<title>orgchart</title>
<link href="css/bootstrap.min.css" type="text/css" />
<link href="css/font-awesome.min.css" type="text/css" />
<link href="css/orgchart.css" type="text/css" />
</head>
<body>
<header class="navbar navbar-static-top bs-docs-nav" id="top" role="banner">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#bs-navbar" aria-controls="bs-navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="../" class="navbar-brand">
<span class="fa-stack">
<i class="fa fa-square-o fa-stack-2x"></i>
<i class="fa fa-sitemap fa-stack-1x"></i>
</span> Orgchartr</a>
</div>
<nav id="bs-navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<!-- <li>
<a href="../getting-started/">Getting started</a>
</li> -->
</ul>
<ul class="nav navbar-nav navbar-right">
<!-- <li><a href="http://expo.getbootstrap.com" onclick="ga('send', 'event', 'Navbar', 'Community links', 'Expo');">Expo</a></li> -->
</ul>
</nav>
</div>
</header>
<div class="container">
<div class="row">
<div class="sidebar">
{{#if showEditForm}}
{{>addPersonForm person=getEditPerson}}
{{else}}
{{>sidebarForm}}
{{/if}}
</div>
<div class="col-lg-10 col-lg-offset-2 col-md-10 col-md-offset-2 col-sm-10 col-sm-offset-2">
<!-- <ul id="personList">
{{#each people}}
{{> person}}
{{/each}}
</ul> -->
{{> diagram}}
</div>
</div>
</div>
</body>
<template name="person">
<li>{{name}} {{boss_id}}</li>
</template>
<template name="addPersonForm">
<form class="edit-person">
<div class="form-group">
<label for="personName">Name</label>
<input value="{{person.name}}" type="text" class="form-control" id="personName" placeholder="John Smith">
</div>
<div class="form-group">
<label for="personTitle">Title</label>
<input value="{{person.title}}" type="text" class="form-control" id="personTitle" placeholder="President">
</div>
<div class="form-group">
<label for="personBoss">Manager</label>
<select id="personBoss" class="form-control">
<option>---</option>
{{#each people}}
{{#if ne ../person._id _id}}
<option value="{{_id}}" selected="{{equals ../person.boss_id _id}}">{{name}} {{bossId}}</option>
{{/if}}
{{/each}}
</select>
</div>
<div class="form-group save-cancel-group">
<button class="save btn btn-primary">Save</button>
<button class="cancel btn btn-default">Cancel</button>
</div>
{{#if person}}
<div class="form-group">
<button class="delete btn btn-xs btn-danger">Delete</button>
</div>
{{/if}}
</form>
</template>
<template name="diagram">
<div id="svgdiv">
<svg></svg>
</div>
</template>
<template name="sidebarForm">
<button class="sidebar-item btn btn-primary add-person">
<i class="fa fa-user-plus"></i> Add Person
</button>
<!-- <div class="sidebar-item add-team">Add Team</div> -->
</template>