Commit e80a93b4e965c72a652435459181aafae630ed9a

Authored by Leandro Santos
1 parent 6596b7af

change scrap timeline visualization

src/app/profile/activities/activity/activity.component.spec.ts
... ... @@ -62,11 +62,11 @@ describe("Components", () => {
62 62 });
63 63 });
64 64  
65   - it("render scrap template correctly", done => {
66   - activity = { name: "scrap1", verb: "scrap" };
  65 + it("render leave scrap template correctly", done => {
  66 + activity = { name: "scrap1", verb: "leave_scrap" };
67 67 tcb.createAsync(BlockContainerComponent).then(fixture => {
68 68 let component: ActivityComponent = fixture.debugElement.componentViewChildren[0].componentInstance;
69   - expect(fixture.debugElement.queryAll(".activity.scrap").length).toEqual(1);
  69 + expect(fixture.debugElement.queryAll(".activity.leave_scrap").length).toEqual(1);
70 70 done();
71 71 });
72 72 });
... ...
src/app/profile/activities/activity/leave_scrap.html 0 → 100644
... ... @@ -0,0 +1,17 @@
  1 +<timeline-badge class="success">
  2 + <i class="fa fa-commenting-o"></i>
  3 +</timeline-badge>
  4 +<timeline-panel>
  5 + <timeline-heading>
  6 + <h4 class="timeline-title">
  7 + <a ui-sref="main.profile.info({profile: ctrl.activity.user.identifier})"><strong ng-bind="ctrl.activity.user.name"></strong></a>
  8 + <span> {{"activities.scrap.description" | translate}} </span>
  9 + </h4>
  10 + <p><small class="text-muted"><i class="fa fa-clock-o"></i> <span am-time-ago="ctrl.activity.created_at | dateFormat"></span></small></p>
  11 + </timeline-heading>
  12 + <div class="timeline-body">
  13 + <div class="scrap">
  14 + <div ng-bind-html="ctrl.activity.content | stripTags | truncate: 100 : '...': true"></div>
  15 + </div>
  16 + </div>
  17 +</timeline-panel>
... ...
src/app/profile/activities/activity/scrap.html
... ... @@ -1,17 +0,0 @@
1   -<timeline-badge class="success">
2   - <i class="fa fa-file-text"></i>
3   -</timeline-badge>
4   -<timeline-panel>
5   - <timeline-heading>
6   - <h4 class="timeline-title">
7   - <a ui-sref="main.profile.info({profile: ctrl.activity.user.identifier})"><strong ng-bind="ctrl.activity.user.name"></strong></a>
8   - <span> {{"activities.scrap.description" | translate}} </span>
9   - </h4>
10   - <p><small class="text-muted"><i class="fa fa-clock-o"></i> <span am-time-ago="ctrl.activity.created_at | dateFormat"></span></small></p>
11   - </timeline-heading>
12   - <div class="timeline-body">
13   - <div class="scrap">
14   - <div ng-bind-html="ctrl.activity.content | stripTags | truncate: 100 : '...': true"></div>
15   - </div>
16   - </div>
17   -</timeline-panel>
src/languages/en.json
... ... @@ -21,7 +21,7 @@
21 21 "profile.person.title": "Person",
22 22 "activities.title": "Activities",
23 23 "activities.create_article.description": "has published on",
24   - "activities.scrap.description": "wrote",
  24 + "activities.scrap.description": "wrote in its timeline",
25 25 "activities.add_member_in_community.description": "has joined the community",
26 26 "activities.new_friendship.description": "has made {friends, plural, one{one new friend} other{# new friends}}:",
27 27 "auth.title": "Great to have you back!",
... ...
src/languages/pt.json
... ... @@ -21,7 +21,7 @@
21 21 "profile.person.title": "Pessoa",
22 22 "activities.title": "Atividades",
23 23 "activities.create_article.description": "publicou em",
24   - "activities.scrap.description": "escreveu",
  24 + "activities.scrap.description": "escreveu em sua linha do tempo",
25 25 "activities.add_member_in_community.description": "entrou na comunidade",
26 26 "activities.new_friendship.description": "fez {friends, plural, one{um novo amigo} other{# novos amigos}}:",
27 27 "auth.title": "Legal ter você de volta!",
... ...