diff --git a/src/app/main/main.component.ts b/src/app/main/main.component.ts index 9519618..21321dd 100644 --- a/src/app/main/main.component.ts +++ b/src/app/main/main.component.ts @@ -16,6 +16,7 @@ import {RecentDocumentsBlockComponent} from "../layout/blocks/recent-documents/r import {ProfileImageBlockComponent} from "../layout/blocks/profile-image/profile-image-block.component"; import {RawHTMLBlockComponent} from "../layout/blocks/raw-html/raw-html-block.component"; import {StatisticsBlockComponent} from "../layout/blocks/statistics/statistics-block.component"; +import {ProfileWallComponent} from "../profile/wall/profile-wall.component"; import {MembersBlockComponent} from "../layout/blocks/members/members-block.component"; import {CommunitiesBlockComponent} from "../layout/blocks/communities/communities-block.component"; @@ -99,7 +100,7 @@ export class EnvironmentContent { LinkListBlockComponent, CommunitiesBlockComponent, HtmlEditorComponent, MainBlockComponent, RecentDocumentsBlockComponent, Navbar, SidebarComponent, ProfileImageBlockComponent, MembersBlockComponent, NoosferoTemplate, DateFormat, RawHTMLBlockComponent, StatisticsBlockComponent, - LoginBlockComponent + LoginBlockComponent, ProfileWallComponent ].concat(plugins.mainComponents).concat(plugins.hotspots), providers: [AuthService, SessionService, NotificationService, BodyStateClassesService] diff --git a/src/app/profile/info/profile-info.component.ts b/src/app/profile/info/profile-info.component.ts index 64acaa7..11b5bf4 100644 --- a/src/app/profile/info/profile-info.component.ts +++ b/src/app/profile/info/profile-info.component.ts @@ -13,8 +13,6 @@ import {TranslateProfile} from "../../shared/pipes/translate-profile.filter"; @Inject(ProfileService) @Inject("amDateFormatFilter") export class ProfileInfoComponent { - - activities: any; profile: noosfero.Profile; constructor(private profileService: ProfileService, private amDateFormatFilter: any) { @@ -24,9 +22,6 @@ export class ProfileInfoComponent { init() { this.profileService.getCurrentProfile().then((profile: noosfero.Profile) => { this.profile = profile; - return this.profileService.getActivities(this.profile.id); - }).then((response: restangular.IResponse) => { - this.activities = response.data.activities; }); } } diff --git a/src/app/profile/info/profile-info.html b/src/app/profile/info/profile-info.html index db417de..c4268ea 100644 --- a/src/app/profile/info/profile-info.html +++ b/src/app/profile/info/profile-info.html @@ -1,5 +1,4 @@
-
@@ -16,15 +15,6 @@
-
- - - - - - - - -
+
diff --git a/src/app/profile/wall/index.ts b/src/app/profile/wall/index.ts new file mode 100644 index 0000000..f947d18 --- /dev/null +++ b/src/app/profile/wall/index.ts @@ -0,0 +1 @@ +export * from "./profile-wall.component"; \ No newline at end of file diff --git a/src/app/profile/wall/profile-wall.component.ts b/src/app/profile/wall/profile-wall.component.ts new file mode 100644 index 0000000..6bcf7b7 --- /dev/null +++ b/src/app/profile/wall/profile-wall.component.ts @@ -0,0 +1,25 @@ +import {Component, Inject, Input, provide} from 'ng-forward'; +import {ProfileService} from "../../../lib/ng-noosfero-api/http/profile.service"; +import {TranslateProfile} from "../../shared/pipes/translate-profile.filter"; + +@Component({ + selector: 'profile-wall', + templateUrl: "app/profile/wall/profile-wall.html", + providers: [provide('profileService', { useClass: ProfileService })], + pipes: [TranslateProfile] +}) +@Inject(ProfileService) +export class ProfileWallComponent { + @Input() profile: noosfero.Profile; + activities: noosfero.Activity[]; + + constructor(private profileService: ProfileService) { + } + + ngOnInit() { + this.profileService.getActivities(this.profile.id) + .then((response: restangular.IResponse) => { + this.activities = response.data.activities; + }); + } +} diff --git a/src/app/profile/wall/profile-wall.html b/src/app/profile/wall/profile-wall.html new file mode 100644 index 0000000..066d933 --- /dev/null +++ b/src/app/profile/wall/profile-wall.html @@ -0,0 +1,11 @@ +

Name: {{ctrl.profile.name}}

+
+ + + + + + + + +
\ No newline at end of file -- libgit2 0.21.2