+ PageCollective component
This commit is contained in:
1 parent
3d0150c289
commit
bfd1c139f5
9 files changed
+34
-35
No files matched your search
+2
-6
@@ -18,9 +18,9 @@ import FooterLinks from './components/FooterLinks';
|
|||||||
|
|
||||||
import PageSchool from './components/PageSchool';
|
import PageSchool from './components/PageSchool';
|
||||||
import PageSchedule from './components/PageSchedule';
|
import PageSchedule from './components/PageSchedule';
|
||||||
|
import PageCollective from './components/PageCollective';
|
||||||
|
|
||||||
import AppController from './controllers/AppController';
|
import AppController from './controllers/AppController';
|
||||||
import CollectiveController from './controllers/CollectiveController';
|
|
||||||
import GalleryController from './controllers/GalleryController';
|
import GalleryController from './controllers/GalleryController';
|
||||||
import AlbumController from './controllers/AlbumController';
|
import AlbumController from './controllers/AlbumController';
|
||||||
import DocumentsController from './controllers/DocumentsController';
|
import DocumentsController from './controllers/DocumentsController';
|
||||||
@@ -92,8 +92,8 @@ app.run(($location, $rootScope, $http) => {
|
|||||||
TeacherProfile,
|
TeacherProfile,
|
||||||
PageSchool,
|
PageSchool,
|
||||||
PageSchedule,
|
PageSchedule,
|
||||||
|
PageCollective,
|
||||||
AppController,
|
AppController,
|
||||||
CollectiveController,
|
|
||||||
GalleryController,
|
GalleryController,
|
||||||
AlbumController,
|
AlbumController,
|
||||||
DocumentsController,
|
DocumentsController,
|
||||||
@@ -117,9 +117,5 @@ app.run(($location, $rootScope, $http) => {
|
|||||||
app.controller('DocumentsPageController', ($scope) => {
|
app.controller('DocumentsPageController', ($scope) => {
|
||||||
$scope.pageClass = 'page-documents';
|
$scope.pageClass = 'page-documents';
|
||||||
});
|
});
|
||||||
|
|
||||||
app.controller('CollectivePageController', ($scope) => {
|
|
||||||
$scope.pageClass = 'page-collective';
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
].map(i => i(app));
|
].map(i => i(app));
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import template from '../../templates/components/page-collective.html';
|
||||||
|
import {collectiveSortPattern} from '../config';
|
||||||
|
|
||||||
|
export default function (app) {
|
||||||
|
app.component('pageCollective', {
|
||||||
|
template: template,
|
||||||
|
controller: function(api) {
|
||||||
|
this.pageClass = 'page-collective';
|
||||||
|
|
||||||
|
api.collective.list(collectiveSortPattern)
|
||||||
|
.success(collective => {
|
||||||
|
this.members = collective;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -32,8 +32,7 @@ export let routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '/collective',
|
name: '/collective',
|
||||||
templateUrl: '/views/collective.html',
|
template: '<page-collective></page-collective>',
|
||||||
controller: 'CollectivePageController',
|
|
||||||
title: 'Преподаватели'
|
title: 'Преподаватели'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
import {collectiveSortPattern} from '../config';
|
|
||||||
|
|
||||||
export default function (app) {
|
|
||||||
app.controller('CollectiveController', ($scope, api) => {
|
|
||||||
api.collective.list(collectiveSortPattern)
|
|
||||||
.success(collective => {
|
|
||||||
$scope.members = collective;
|
|
||||||
collective.map(person => {
|
|
||||||
|
|
||||||
return person;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
@import "../variables";
|
||||||
|
|
||||||
|
.page-collective {
|
||||||
|
&.ng-leave {
|
||||||
|
animation: slideOutLeft $short-duration both ease-in;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.ng-enter {
|
||||||
|
animation: slideInRight $short-duration both ease-in;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,16 +5,6 @@
|
|||||||
&.ng-enter {}
|
&.ng-enter {}
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-collective {
|
|
||||||
&.ng-leave {
|
|
||||||
animation: slideOutLeft 0.3s both ease-in;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.ng-enter {
|
|
||||||
animation: slideInRight 0.3s both ease-in;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-documents {
|
.page-documents {
|
||||||
&.ng-leave {
|
&.ng-leave {
|
||||||
transform-origin: 50% 50%;
|
transform-origin: 50% 50%;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
@import "components/page-school";
|
@import "components/page-school";
|
||||||
@import "components/page-schedule";
|
@import "components/page-schedule";
|
||||||
|
@import "components/page-collective";
|
||||||
|
|
||||||
@import "main";
|
@import "main";
|
||||||
@import "body-wrapper";
|
@import "body-wrapper";
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<div class="content content_semi-wide">
|
||||||
|
<teacher-profile ng-repeat="person in $ctrl.members track by $index" member="person"></teacher-profile>
|
||||||
|
</div>
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
<div class="content content_semi-wide" ng-controller="CollectiveController">
|
|
||||||
<teacher-profile ng-repeat="person in members track by $index" member="person"></teacher-profile>
|
|
||||||
</div>
|
|
||||||
Reference in new issue
Block a user