mirror of https://github.com/akveo/blur-admin
setting up the viewer
parent
ba64bdd3ca
commit
e94cd1e429
Binary file not shown.
|
@ -10,6 +10,7 @@
|
|||
|
||||
'BlurAdmin.pages.surveys',
|
||||
'BlurAdmin.pages.teams',
|
||||
'BlurAdmin.pages.viewer',
|
||||
])
|
||||
.config(routeConfig);
|
||||
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
/**
|
||||
* @author v.lugovsky
|
||||
* created on 16.12.2015
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular.module('BlurAdmin.pages.viewer')
|
||||
.controller('ViewerPageCtrl', ViewerPageCtrl);
|
||||
|
||||
/** @ngInject */
|
||||
function ViewerPageCtrl($scope, $stateParams, SurveyService, $log) {
|
||||
//alert('test');
|
||||
|
||||
var vm = this;
|
||||
|
||||
function loadSurveys() {
|
||||
SurveyService
|
||||
.list()
|
||||
.then(function (data){
|
||||
vm.surveys = data;
|
||||
$log.info("Got the survey data",data);
|
||||
vm.survey = getSurvey();
|
||||
console.log(vm.surveys);
|
||||
console.log(vm.survey);
|
||||
}, function (error){
|
||||
$log.error(error);
|
||||
});
|
||||
}
|
||||
|
||||
function getSurvey() {
|
||||
$log.info("getSurvey",$stateParams.survey_id);
|
||||
return vm.surveys.filter(function(s){
|
||||
return s.id == $stateParams.survey_id;
|
||||
})[0];
|
||||
}
|
||||
|
||||
function activate(){
|
||||
vm.surveys = [];
|
||||
vm.survey = [];
|
||||
loadSurveys();
|
||||
|
||||
|
||||
}
|
||||
|
||||
activate();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
})();
|
|
@ -0,0 +1,36 @@
|
|||
<style>
|
||||
aside, div.page-top , footer, div.content-top {display:none !important;}
|
||||
.al-main {margin-left:0 !important;}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div ba-panel ba-panel-title="{{vm.survey.name}}" ba-panel-class="with-scroll">
|
||||
|
||||
<div class="section-block bold-text ng-scope"><p>{{vm.survey.description}}</p></div>
|
||||
|
||||
<div class="separator"></div>
|
||||
|
||||
|
||||
<div id="{{e.id}}" class="form-group answer" ng-repeat="e in vm.survey.elements">
|
||||
<p>{{ e.text }}</p>
|
||||
<label ng-class="{!el.multiple: custom-radio, el.multiple: custom-checkbox} radio-inline nowrap" ng-repeat="el in e.items">
|
||||
<input ng-attr-type="{{el.multiple? 'checkbox' : 'radio'}}" name="{{ e.id }}_{{ $index }}" id="{{ e.id }}_{{ $index }}" value="{{ e.value }}" ng-required="el.required">
|
||||
<span>{{ e.value }}</span>
|
||||
</label>
|
||||
<div class="form-group" ng-if="el.hasComment">
|
||||
<label for="input01">{{el.commentLabel}}</label>
|
||||
<input type="text" class="form-control" id="{{ e.id }}_comment" name="{{ e.id }}_comment" placeholder="..." >
|
||||
</div>
|
||||
<div class="separator"></div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button ng-click="submitSurvey()" class="btn btn-success btn-lg">
|
||||
Send
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,26 @@
|
|||
/**
|
||||
* @author v.lugovsky
|
||||
* created on 16.12.2015
|
||||
*/
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular.module('BlurAdmin.pages.viewer', [])
|
||||
.config(routeConfig);
|
||||
|
||||
/** @ngInject */
|
||||
function routeConfig($stateProvider) {
|
||||
$stateProvider
|
||||
.state('viewer', {
|
||||
url: '/viewer/:survey_id',
|
||||
title: 'Viewer',
|
||||
templateUrl: 'app/pages/viewer/viewer.html',
|
||||
controller: 'ViewerPageCtrl as vm',
|
||||
sidebarMeta: {
|
||||
icon: 'ion-gear-a',
|
||||
order: 1000,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
})();
|
|
@ -35,7 +35,7 @@
|
|||
<label for="inputName3" class="col-sm-2 control-label">Name</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="inputName3" placeholder="Full Name">
|
||||
<input type="text" class="form-control" id="inputName3" ng-model="ViewerPageCtrl.test" placeholder="Full Name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Blur Admin</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900italic,900&subset=latin,greek,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic' rel='stylesheet' type='text/css'>
|
||||
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="assets/img/favicon-16x16.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="assets/img/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="assets/img/favicon-96x96.png">
|
||||
|
||||
<!-- build:css({.tmp/serve,src}) styles/vendor.css -->
|
||||
<!-- bower:css -->
|
||||
<!-- run `gulp inject` to automatically populate bower styles dependencies -->
|
||||
<!-- endbower -->
|
||||
<!-- endbuild -->
|
||||
|
||||
<!-- build:css({.tmp/serve,src}) styles/auth.css -->
|
||||
<!-- inject:css -->
|
||||
<!-- css files will be automatically insert here -->
|
||||
<!-- endinject -->
|
||||
<!-- endbuild -->
|
||||
</head>
|
||||
<body>
|
||||
<main class="auth-main">
|
||||
<div class="auth-block">
|
||||
<h1>Sign up to Blur Admin</h1>
|
||||
<a href="auth.html" class="auth-link">Already have a Blur Admin account? Sign in!</a>
|
||||
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="inputName3" class="col-sm-2 control-label">Name</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="inputName3" placeholder="Full Name">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputEmail3" class="col-sm-2 control-label">Email</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<input type="email" class="form-control" id="inputEmail3" placeholder="Email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="inputPassword3" class="col-sm-2 control-label">Password</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" id="inputPassword3" placeholder="Password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-default btn-auth">Sign up</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="auth-sep"><span><span>or Sign up with one click</span></span></div>
|
||||
|
||||
<div class="al-share-auth">
|
||||
<ul class="al-share clearfix">
|
||||
<li><i class="socicon socicon-facebook" title="Share on Facebook"></i></li>
|
||||
<li><i class="socicon socicon-twitter" title="Share on Twitter"></i></li>
|
||||
<li><i class="socicon socicon-google" title="Share on Google Plus"></i></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue