diff --git a/bower.json b/bower.json
index 72e15cd..d82dc00 100644
--- a/bower.json
+++ b/bower.json
@@ -19,7 +19,8 @@
"angular": "~1.4.2",
"font-awesome": "fontawesome#~4.5.0",
"ngstorage": "~0.3.10",
- "bootswatch": "~3.3.6"
+ "bootswatch": "~3.3.6",
+ "angular-moment": "~0.10.3"
},
"devDependencies": {
"angular-mocks": "~1.4.2"
diff --git a/src/app/index.module.js b/src/app/index.module.js
index 013bc85..4482c8f 100644
--- a/src/app/index.module.js
+++ b/src/app/index.module.js
@@ -2,6 +2,9 @@
'use strict';
angular
- .module('angular', ['ngAnimate', 'ngCookies', 'ngStorage', 'ngTouch', 'ngSanitize', 'ngMessages', 'ngAria', 'restangular', 'ui.router', 'ui.bootstrap', 'toastr']);
+ .module('angular', ['ngAnimate', 'ngCookies', 'ngStorage', 'ngTouch',
+ 'ngSanitize', 'ngMessages', 'ngAria', 'restangular',
+ 'ui.router', 'ui.bootstrap', 'toastr',
+ 'angularMoment']);
})();
diff --git a/src/app/index.route.js b/src/app/index.route.js
index f34e582..a283a65 100644
--- a/src/app/index.route.js
+++ b/src/app/index.route.js
@@ -6,8 +6,6 @@
.config(routeConfig);
function routeConfig($stateProvider, $urlRouterProvider) {
- $urlRouterProvider.when('/profile/:profile', '/:profile');
-
$stateProvider
.state('main', {
url: '/',
@@ -26,6 +24,12 @@
controller: 'ProfileController',
controllerAs: 'vm'
})
+ .state('main.profile.info', {
+ url: '^/profile/:profile',
+ templateUrl: 'app/profile-info/profile-info.html',
+ controller: 'ProfileInfoController',
+ controllerAs: 'vm'
+ })
.state('main.profile.page', {
url: '/{page:.*}',
templateUrl: 'app/content-viewer/page.html',
diff --git a/src/app/profile-info/profile-info.controller.js b/src/app/profile-info/profile-info.controller.js
new file mode 100644
index 0000000..3e4da6c
--- /dev/null
+++ b/src/app/profile-info/profile-info.controller.js
@@ -0,0 +1,23 @@
+(function() {
+ 'use strict';
+
+ angular
+ .module('angular')
+ .controller('ProfileInfoController', ProfileInfoController);
+
+
+ /** @ngInject */
+ function ProfileInfoController(noosfero, $log, $stateParams, $scope, Restangular) {
+ var vm = this;
+ vm.profile = null;
+ vm.activities = [];
+ activate();
+
+ function activate() {
+ vm.profile = $scope.vm.owner;
+ noosfero.profiles.one(vm.profile.id).one('activities').get().then(function(result) {
+ vm.activities = result.activities;
+ });
+ }
+ }
+})();
diff --git a/src/app/profile-info/profile-info.html b/src/app/profile-info/profile-info.html
new file mode 100644
index 0000000..b47fb2f
--- /dev/null
+++ b/src/app/profile-info/profile-info.html
@@ -0,0 +1,19 @@
+
{{vm.profile.name}}
+
+
diff --git a/src/app/profile-info/profile-info.scss b/src/app/profile-info/profile-info.scss
new file mode 100644
index 0000000..4ac1025
--- /dev/null
+++ b/src/app/profile-info/profile-info.scss
@@ -0,0 +1,186 @@
+//http://bootsnipp.com/snippets/featured/timeline-responsive
+.timeline {
+ list-style: none;
+ padding: 20px 0 20px;
+ position: relative;
+
+ &:before {
+ top: 0;
+ bottom: 0;
+ position: absolute;
+ content: " ";
+ width: 3px;
+ background-color: #eeeeee;
+ left: 50%;
+ margin-left: -1.5px;
+ }
+
+ > li {
+ margin-bottom: 20px;
+ position: relative;
+ }
+
+ > li:before,
+ > li:after {
+ content: " ";
+ display: table;
+ }
+
+ > li:after {
+ clear: both;
+ }
+
+ > li:before, > li:after {
+ content: " ";
+ display: table;
+ }
+
+ > li:after {
+ clear: both;
+ }
+
+ > li > .timeline-panel {
+ width: 46%;
+ float: left;
+ border: 1px solid #d4d4d4;
+ border-radius: 2px;
+ padding: 20px;
+ position: relative;
+ -webkit-box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
+ box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
+ }
+
+ > li > .timeline-panel:before {
+ position: absolute;
+ top: 26px;
+ right: -15px;
+ display: inline-block;
+ border-top: 15px solid transparent;
+ border-left: 15px solid #ccc;
+ border-right: 0 solid #ccc;
+ border-bottom: 15px solid transparent;
+ content: " ";
+ }
+
+ > li > .timeline-panel:after {
+ position: absolute;
+ top: 27px;
+ right: -14px;
+ display: inline-block;
+ border-top: 14px solid transparent;
+ border-left: 14px solid #fff;
+ border-right: 0 solid #fff;
+ border-bottom: 14px solid transparent;
+ content: " ";
+ }
+
+ > li > .timeline-badge {
+ color: #fff;
+ width: 50px;
+ height: 50px;
+ line-height: 50px;
+ font-size: 1.4em;
+ text-align: center;
+ position: absolute;
+ top: 16px;
+ left: 50%;
+ margin-left: -25px;
+ background-color: #999999;
+ z-index: 100;
+ border-top-right-radius: 50%;
+ border-top-left-radius: 50%;
+ border-bottom-right-radius: 50%;
+ border-bottom-left-radius: 50%;
+ }
+
+ > li.timeline-inverted > .timeline-panel {
+ float: right;
+ }
+
+ > li.timeline-inverted > .timeline-panel:before {
+ border-left-width: 0;
+ border-right-width: 15px;
+ left: -15px;
+ right: auto;
+ }
+
+ > li.timeline-inverted > .timeline-panel:after {
+ border-left-width: 0;
+ border-right-width: 14px;
+ left: -14px;
+ right: auto;
+ }
+
+ .timeline-badge.primary {
+ background-color: #2e6da4;
+ }
+
+ .timeline-badge.success {
+ background-color: #3f903f;
+ }
+
+ .timeline-badge.warning {
+ background-color: #f0ad4e;
+ }
+
+ .timeline-badge.danger {
+ background-color: #d9534f;
+ }
+
+ .timeline-badge.info {
+ background-color: #5bc0de;
+ }
+
+ .timeline-title {
+ margin-top: 0;
+ color: inherit;
+ }
+
+ .timeline-body > p,
+ .timeline-body > ul {
+ margin-bottom: 0;
+ }
+
+ .timeline-body > p + p {
+ margin-top: 5px;
+ }
+
+ @media (max-width: 767px) {
+
+ &:before {
+ left: 40px;
+ }
+
+ > li {
+ > .timeline-panel {
+ width: calc(100% - 90px);
+ width: -moz-calc(100% - 90px);
+ width: -webkit-calc(100% - 90px);
+ }
+
+ > .timeline-badge {
+ left: 15px;
+ margin-left: 0;
+ top: 16px;
+ }
+
+ > .timeline-panel {
+ float: right;
+ }
+
+ > .timeline-panel:before {
+ border-left-width: 0;
+ border-right-width: 15px;
+ left: -15px;
+ right: auto;
+ }
+
+ > .timeline-panel:after {
+ border-left-width: 0;
+ border-right-width: 14px;
+ left: -14px;
+ right: auto;
+ }
+ }
+ }
+}
--
libgit2 0.21.2