2015-06-15 21:49:16 +00:00
{{define "body"}}
< div class = "container-fluid" >
< div class = "row" >
< div class = "col-sm-3 col-md-2 sidebar" >
< ul class = "nav nav-sidebar" >
< li > < a href = "#" > Dashboard< / a >
< / li >
2015-06-17 04:09:27 +00:00
< li > < a href = "/campaigns" > Campaigns< / a >
2015-06-15 21:49:16 +00:00
< / li >
< li class = "active" > < a href = "#/users" > Users & Groups< / a >
< / li >
2015-06-17 04:09:27 +00:00
< li > < a href = "/templates" > Email Templates< / a >
2015-06-15 21:49:16 +00:00
< / li >
2015-06-17 04:09:27 +00:00
< li > < a href = "/landing_pages" > Landing Pages< / a >
2015-06-15 21:49:16 +00:00
< / li >
2015-06-17 04:09:27 +00:00
< li > < a href = "/settings" > Settings< / a >
2015-06-15 21:49:16 +00:00
< / li >
< li > < a href = "/api/" > API Documentation< / a >
< / li >
< / ul >
< / div >
< / div >
< / div >
< div class = "col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" ng-controller = "GroupCtrl" >
< h1 class = "page-header" >
Users & Groups
< / h1 >
2015-06-17 04:09:27 +00:00
< div id = "flashes" class = "row" > < / div >
2015-06-15 21:49:16 +00:00
< div class = "row" >
2015-06-17 04:09:27 +00:00
< button type = "button" class = "btn btn-primary" data-toggle = "modal" data-target = "#groupModal" > < i class = "fa fa-plus" > < / i > New Campaign< / button >
2015-06-15 21:49:16 +00:00
< / div >
2015-06-17 04:09:27 +00:00
< div id = "emptyMessage" class = "row" >
< div class = "alert alert-info" >
No groups created yet. Let's create one!
2015-06-15 21:49:16 +00:00
< / div >
< / div >
2015-06-17 04:09:27 +00:00
< table id = "groupTable" class = "table" style = "display:none;" >
< thead >
< tr >
< th > Name< / th >
< th > Members< / th >
< th > Modified Date< / th >
< / tr >
< / thead >
< tbody >
< / tbody >
< / table >
<!-- <div ng - show="groups.length" class="row">
2015-06-15 21:49:16 +00:00
< table ng-table = "mainTableParams" class = "table table-hover table-striped table-bordered" >
< tbody >
< tr ng-repeat = "group in $data | orderBy: '-modified_date'" class = "editable-row" >
2015-06-17 04:09:27 +00:00
< td data-title = "'Name'" sortable = "'name'" class = "col-sm-1" > group.name< / td >
2015-06-15 21:49:16 +00:00
< td data-title = "'Members'" class = "col-sm-2" >
< span ng-repeat = "target in group.targets | cut:5 track by $index " >
2015-06-17 04:09:27 +00:00
target$last ? '' : ', '
2015-06-15 21:49:16 +00:00
< / span >
< div class = "btn-group" style = "float: right;" >
< button type = "button" class = "btn btn-primary dropdown-toggle edit-button" data-toggle = "dropdown" >
< span class = "caret" style = "border-top-color:#FFFFFF" > < / span >
< span class = "sr-only" > Toggle Dropdown< / span >
< / button >
< ul class = "dropdown-menu" style = "left:auto; right:0;" role = "menu" >
< li > < a ng-click = "editGroup(group)" > Edit< / a >
< / li >
< li class = "divider" > < / li >
< li > < a ng-click = "deleteGroup(group)" > Delete< / a >
< / li >
< / ul >
< / div >
< / td >
2015-06-17 04:09:27 +00:00
< td data-title = "'Modified Date'" class = "col-sm-1" > group.modified_date | date:'medium'< / td >
2015-06-15 21:49:16 +00:00
< / tr >
< / tbody >
< / table >
2015-06-17 04:09:27 +00:00
< / div > -->
< / div >
<!-- Modal -->
< div class = "modal fade" id = "groupModal" tabindex = "-1" role = "dialog" aria-labelledby = "myModalLabel" >
< div class = "modal-dialog" role = "document" >
< div class = "modal-content" >
< div class = "modal-header" >
< button type = "button" class = "close" data-dismiss = "modal" aria-label = "Close" > < span aria-hidden = "true" > × < / span > < / button >
< h4 class = "modal-title" id = "groupModalLabel" > New Group< / h4 >
< / div >
< div class = "modal-body" >
< div class = "row" id = "modal.flashes" > < / div >
< div class = "form-group" >
< label for = "name" > Name:< / label >
< input type = "text" class = "form-control" id = "name" placeholder = "Campaign name" autofocus >
< br / >
< label class = "control-label" for = "template" > Template:< / label >
< input type = "text" class = "form-control" placeholder = "Template Name" id = "template" typeahead = "template.name for template in templates | filter:{name:$viewValue}" typeahead-editable = "false" ng-model = "campaign.template.name" / >
< br / >
< div class = "panel panel-default" >
< div class = "panel-heading" role = "tab" >
< a role = "button" class = "collapsed" data-toggle = "collapse" href = "#smtpPanel" aria-expanded = "false" aria-controls = "#smtpPanel" >
SMTP Options < i class = "pull-right glyphicon" > < / i >
< / a >
< / div >
< div class = "panel-collapse collapse" id = "smtpPanel" role = "tabpanel" >
< div class = "panel-body" >
< label class = "control-label" for = "from" > From:< / label >
< input type = "text" class = "form-control" placeholder = "First Last <test@example.com>" value = "" name = "from" >
< br / >
< label class = "control-label" for = "smtp_server" > Host:< / label >
< input type = "text" class = "form-control" placeholder = "smtp.example.com:25" value = "" name = "host" >
< br / >
< label class = "control-label" for = "smtp_server" > Username:< / label >
< input type = "text" class = "form-control" placeholder = "Username" value = "" name = "username" >
< br / >
< label class = "control-label" for = "smtp_server" > Password:< / label >
< input type = "password" class = "form-control" placeholder = "Password" value = "" name = "password" >
< br / >
< / div >
< / div >
< / div >
< label class = "control-label" for = "users" > Groups:< / label >
< form >
< div class = "input-group" >
< input type = "text" class = "form-control" placeholder = "Group Name" id = "users" typeahead = "group.name for group in groups | filter:{name:$viewValue}" typeahead-editable = "false" ng-model = "group.name" / >
< span class = "input-group-btn" >
< button class = "btn btn-primary" > < i class = "fa fa-plus" > < / i > Add< / button >
< / span >
< / div >
< / form >
< br / >
< table ng-table = "editGroupTableParams" class = "table table-hover table-striped table-condensed" >
< tbody >
< tr ng-repeat = "group in $data" class = "editable-row" >
< td > group.name
< span ng-click = "removeGroup(group)" class = "remove-row" > < i class = "fa fa-trash-o" > < / i >
< / span >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
< / div >
< div class = "modal-footer" >
< button type = "button" class = "btn btn-default" data-dismiss = "modal" > Close< / button >
< button type = "button" class = "btn btn-primary" onclick = "save()" > Save changes< / button >
< / div >
2015-06-15 21:49:16 +00:00
< / div >
2015-06-17 04:09:27 +00:00
< / div >
2015-06-15 21:49:16 +00:00
< / div >
{{end}}
2015-06-17 04:09:27 +00:00
{{define "scripts"}}
< script src = "/js/app/users.js" > < / script >
{{end}}