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" >
2015-06-24 04:02:29 +00:00
< li > < a href = "/" > Dashboard< / a >
2015-06-15 21:49:16 +00:00
< / li >
2015-06-24 04:02:29 +00:00
< li class = "active" > < a href = "/campaigns" > Campaigns< / a >
2015-06-15 21:49:16 +00:00
< / li >
2015-06-17 04:09:27 +00:00
< li > < a href = "/users" > Users & Groups< / a >
2015-06-15 21:49:16 +00:00
< / 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 >
2015-06-17 03:22:51 +00:00
< div class = "col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" >
2015-06-24 04:02:29 +00:00
< div class = "row" >
< h1 class = "page-header" >
Campaigns
< / h1 >
< / div >
2015-06-17 03:22:51 +00:00
< div id = "flashes" class = "row" > < / div >
2015-06-15 21:49:16 +00:00
< div class = "row" >
2015-06-18 03:44:05 +00:00
< button type = "button" class = "btn btn-primary" data-toggle = "modal" data-target = "#modal" > < 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" >
2015-06-17 03:22:51 +00:00
< div class = "alert alert-info" >
No campaigns created yet. Let's create one!
2015-06-15 21:49:16 +00:00
< / div >
< / div >
2015-06-24 04:02:29 +00:00
< div class = "row" >
< table id = "campaignTable" class = "table" style = "display:none;" >
< thead >
< tr >
< th > Created Date< / th >
< th > Name< / th >
< th > Status< / th >
< / tr >
< / thead >
< tbody >
< / tbody >
< / table >
< / div >
2015-06-16 03:51:18 +00:00
<!-- <table ng - table="mainTableParams" class="table table - hover table - striped table - bordered">
2015-06-15 21:49:16 +00:00
< tbody >
< tr ng-repeat = "campaign in $data | orderBy:modified_date:true" class = "editable-row" >
< td data-title = "'Created Date'" class = "col-sm-1" > campaign.created_date | date:'medium'< / td >
< td data-title = "'Name'" class = "col-sm-2" > campaign.name
< 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-href = "#/campaigns/campaign.id" > View< / a >
< / li >
< li > < a href = "/campaigns/campaign.id/relaunch" > Relaunch< / a >
< / li >
< li class = "divider" > < / li >
< li > < a ng-click = "deleteCampaign(campaign)" > Delete< / a >
< / li >
< / ul >
< / div >
< / td >
< td data-title = "'Status'" class = "col-sm-1" > campaign.status< / td >
< / tr >
< / tbody >
2015-06-16 03:51:18 +00:00
< / table > -->
2015-06-15 21:49:16 +00:00
< / div >
< / div >
2015-06-16 23:38:43 +00:00
<!-- Modal -->
2015-06-18 03:44:05 +00:00
< div class = "modal fade" id = "modal" tabindex = "-1" role = "dialog" aria-labelledby = "myModalLabel" >
2015-06-16 23:38:43 +00:00
< 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 = "campaignModalLabel" > New Campaign< / h4 >
< / div >
< div class = "modal-body" >
2015-06-17 03:22:51 +00:00
< div class = "row" id = "modal.flashes" > < / div >
2015-06-16 23:38:43 +00:00
< 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 >
2015-06-17 03:22:51 +00:00
< input type = "text" class = "form-control" placeholder = "First Last <test@example.com>" value = "" name = "from" >
2015-06-16 23:38:43 +00:00
< br / >
< label class = "control-label" for = "smtp_server" > Host:< / label >
2015-06-17 03:22:51 +00:00
< input type = "text" class = "form-control" placeholder = "smtp.example.com:25" value = "" name = "host" >
2015-06-16 23:38:43 +00:00
< br / >
< label class = "control-label" for = "smtp_server" > Username:< / label >
2015-06-17 03:22:51 +00:00
< input type = "text" class = "form-control" placeholder = "Username" value = "" name = "username" >
2015-06-16 23:38:43 +00:00
< br / >
< label class = "control-label" for = "smtp_server" > Password:< / label >
2015-06-17 03:22:51 +00:00
< input type = "password" class = "form-control" placeholder = "Password" value = "" name = "password" >
2015-06-16 23:38:43 +00:00
< br / >
< / div >
< / div >
< / div >
< label class = "control-label" for = "users" > Groups:< / label >
2015-06-17 03:22:51 +00:00
< form >
2015-06-16 23:38:43 +00:00
< 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 >
< / div >
< / div >
< / div >
2015-06-15 21:49:16 +00:00
{{end}}
2015-06-16 03:51:18 +00:00
{{define "scripts"}}
< script src = "/js/app/campaigns.js" > < / script >
{{end}}