Commit a06484dac7d777d7ec9199fa7251c919392387ae

Authored by Tallys Martins
1 parent 50fb1ccd

Improvements on profile-info

Signed-off-by: Tallys Martins <tallysmartins@gmail.com>
src/app/profile/info/profile-info.component.ts
... ... @@ -16,9 +16,18 @@ export class ProfileInfoComponent {
16 16  
17 17 activities: any;
18 18 profile: noosfero.Profile;
  19 + showInformation: boolean = false;
19 20  
20 21 constructor(private profileService: ProfileService, private amDateFormatFilter: any) {
21 22 this.init();
  23 + this.showInformation = false;
  24 + }
  25 +
  26 + toggleInformation() {
  27 + console.log(this.showInformation);
  28 + console.log("argila");
  29 + this.showInformation = !this.showInformation;
  30 + console.log(this.showInformation);
22 31 }
23 32  
24 33 init() {
... ...
src/app/profile/info/profile-info.html
... ... @@ -28,11 +28,12 @@
28 28 </div>
29 29 </div>
30 30 </div> -->
31   -<div class="bg-image" style="background-color: black";>
  31 +
  32 +<div class="bg-image" style="background-color: grey";>
32 33  
33 34 </div>
34 35  
35   -<div class="container" id="noosfero-profile" style="background-color: aqua";>
  36 +<div class="container" id="noosfero-profile">
36 37 <div class="col-sm-2">
37 38 <noosfero-profile-image [profile]="vm.profile" class="img-avatar-main" data-pin-nopin="true"></noosfero-profile-image>
38 39 <ul class="social">
... ... @@ -48,12 +49,11 @@
48 49 <br />
49 50 <p class="pull-left">www.noosfero.gov.br/<strong>patriciaoliveira</strong></p>
50 51 <div class="pull-right info-contato">
51   - <button type="button" class="btn btn-sm" data-toggle="collapse" data-target="#infocontato">Informações de Contato</button>
52   - <div id="infocontato" class="collapse">
53   - <br /><p>patricia@oliveira.com<br />
54   - 61 9999-9999</p>
55   - </div>
  52 + <button ng-click="vm.toggleInformation()" class="btn btn-sm">Informações de Contato</button>
  53 + <div clas="profile-contact" ng-show="vm.showInformation">
  54 + <p class="email">patricia@oliveira.com</p>
  55 + <p class="phone">61 9999-9999</p>
  56 + </div>
56 57 </div>
57 58 </div>
58 59 </div>
59   -
... ...
src/app/profile/profile.component.ts
... ... @@ -14,8 +14,7 @@ import {ProfileActionsComponent} from &quot;./profile-actions.component&quot;;
14 14 import {ProfileToolbarComponent} from "./profile-toolbar.component";
15 15 /**
16 16 * @ngdoc controller
17   - * @name profile.Profile
18   - * @description
  17 + * @name profile.Profile * @description
19 18 * This is the profile controller. It provide routes to supported Noosfero Profiles.
20 19 */
21 20  
... ... @@ -142,4 +141,6 @@ export class ProfileComponent {
142 141 notificationService.error({ message: "notification.profile.not_found" });
143 142 });
144 143 }
  144 +
  145 +
145 146 }
... ...
src/app/profile/profile.scss
... ... @@ -145,6 +145,7 @@ a{
145 145  
146 146 /* NOOSFERO PROFILE */
147 147 .bg-image {}
  148 +
148 149 #noosfero-profile {
149 150 background:#fff;
150 151 margin: -200px auto auto;
... ... @@ -164,7 +165,19 @@ a{
164 165 h3 {
165 166 margin-top: 16px;
166 167 }
  168 + .btn {
  169 + font-size: 12px;
  170 + padding: 5px 10px;
  171 + }
  172 + .profile-contact {
  173 + padding-top: 10px;
  174 +
  175 + p {
  176 + margin: 0px;
  177 + }
  178 + }
167 179 }
  180 +
168 181 ul.social {list-style:none; text-align:center;padding:0; margin:0;}
169 182 #infocontato {max-width:200px;}
170 183 #infocontato .alert-info{margin:.5rem 0;
... ...