diff --git a/src/app/layout/blocks/people-block/index.ts b/src/app/layout/blocks/people-block/index.ts
new file mode 100644
index 0000000..b744169
--- /dev/null
+++ b/src/app/layout/blocks/people-block/index.ts
@@ -0,0 +1,2 @@
+/* Module Index Entry - generated using the script npm run generate-index */
+export * from "./people-block.component";
diff --git a/src/app/layout/blocks/people-block/people-block.component.spec.ts b/src/app/layout/blocks/people-block/people-block.component.spec.ts
new file mode 100644
index 0000000..6d2f847
--- /dev/null
+++ b/src/app/layout/blocks/people-block/people-block.component.spec.ts
@@ -0,0 +1,53 @@
+import {TestComponentBuilder} from 'ng-forward/cjs/testing/test-component-builder';
+import {Provider, Input, provide, Component} from 'ng-forward';
+
+import {PeopleBlockComponent} from './people-block.component';
+
+const htmlTemplate: string = '';
+
+const tcb = new TestComponentBuilder();
+
+describe("Components", () => {
+ describe("People Block Component", () => {
+
+ beforeEach(angular.mock.module("templates"));
+
+ let state = jasmine.createSpyObj("state", ["go"]);
+ let providers = [
+ new Provider('truncateFilter', { useValue: () => { } }),
+ new Provider('stripTagsFilter', { useValue: () => { } }),
+ new Provider('$state', { useValue: state }),
+ new Provider('ProfileService', {
+ useValue: {
+ getProfileMembers: (profileId: number, filters: any): any => {
+ return Promise.resolve({ data: { people: [{ identifier: "person1" }] } });
+ }
+ }
+ }),
+ ];
+ @Component({ selector: 'test-container-component', template: htmlTemplate, directives: [PeopleBlockComponent], providers: providers })
+ class BlockContainerComponent {
+ block = { type: 'Block', settings: {} };
+ owner = { name: 'profile-name' };
+ constructor() {
+ }
+ }
+
+ it("get people of the block owner", done => {
+ tcb.createAsync(BlockContainerComponent).then(fixture => {
+ let block: PeopleBlockComponent = fixture.debugElement.componentViewChildren[0].componentInstance;
+ expect(block.people).toEqual([{ identifier: "person1" }]);
+ done();
+ });
+ });
+
+ it("render the profile image for each person", done => {
+ tcb.createAsync(BlockContainerComponent).then(fixture => {
+ fixture.debugElement.getLocal("$rootScope").$apply();
+ expect(fixture.debugElement.queryAll("noosfero-profile-image").length).toEqual(1);
+ done();
+ });
+ });
+
+ });
+});
\ No newline at end of file
diff --git a/src/app/layout/blocks/people-block/people-block.component.ts b/src/app/layout/blocks/people-block/people-block.component.ts
new file mode 100644
index 0000000..7870e00
--- /dev/null
+++ b/src/app/layout/blocks/people-block/people-block.component.ts
@@ -0,0 +1,26 @@
+import {Input, Inject, Component} from "ng-forward";
+import {EnvironmentService} from "../../../../lib/ng-noosfero-api/http/environment.service";
+
+@Component({
+ selector: "noosfero-people-block",
+ templateUrl: 'app/layout/blocks/people-block/people-block.html',
+})
+@Inject(EnvironmentService)
+export class PeopleBlockComponent {
+
+ @Input() block: noosfero.Block;
+ @Input() owner: noosfero.Environment;
+
+ people: noosfero.Person[] = [];
+
+ constructor(private environmentService: EnvironmentService) {
+ console.debug("Created PeopleBlockComponent");
+ }
+
+ ngOnInit() {
+ this.environmentService.getEnvironmentPeople({ limit: '6' }).then((people: noosfero.Person[]) => {
+ console.debug("People returned in PeopleBlockComponent: ", people);
+ this.people = people;
+ });
+ }
+}
diff --git a/src/app/layout/blocks/people-block/people-block.html b/src/app/layout/blocks/people-block/people-block.html
new file mode 100644
index 0000000..d7c89cf
--- /dev/null
+++ b/src/app/layout/blocks/people-block/people-block.html
@@ -0,0 +1,5 @@
+
diff --git a/src/app/layout/blocks/people-block/people-block.scss b/src/app/layout/blocks/people-block/people-block.scss
new file mode 100644
index 0000000..c5776e0
--- /dev/null
+++ b/src/app/layout/blocks/people-block/people-block.scss
@@ -0,0 +1,17 @@
+.members-block {
+ .member {
+ img, i.profile-image {
+ width: 60px;
+ }
+ img {
+ display: inline-block;
+ vertical-align: top;
+ }
+ i.profile-image {
+ text-align: center;
+ background-color: #889DB1;
+ color: #F1F1F1;
+ font-size: 4.5em;
+ }
+ }
+}
--
libgit2 0.21.2