Compare View

switch
from
...
to
 
Commits (6)
src/app/index.scss
@@ -39,6 +39,12 @@ $break-sm-min: 992px; @@ -39,6 +39,12 @@ $break-sm-min: 992px;
39 $break-xxs-max: ($break-xxs-min - 1); 39 $break-xxs-max: ($break-xxs-min - 1);
40 $break-sm-max: ($break-sm-min - 1); 40 $break-sm-max: ($break-sm-min - 1);
41 $break-xs-max: ($break-xs-min - 1); 41 $break-xs-max: ($break-xs-min - 1);
  42 +// TODO: improve this method to collect all the paddings with a single var
  43 +$wrapper-padding: 15px 15px 35px 15px;
  44 +$wrapper-padding-top: 15px;
  45 +$wrapper-padding-right: 15px;
  46 +$wrapper-padding-bottom: 35px;
  47 +$wrapper-padding-left: 15px;
42 48
43 49
44 @import "../../bower_components/bootswatch/flatly/_variables.scss"; 50 @import "../../bower_components/bootswatch/flatly/_variables.scss";
src/app/layout/blocks/communities/communities-block.html
1 -<div class="communities-block">  
2 - <a ng-repeat="profile in ctrl.profiles" ui-sref="main.profile.home({profile: profile.identifier})" class="profile"> 1 +<div ng-repeat="profile in ctrl.profiles" class="col-xs-2 col-md-4 block-item">
  2 + <a ui-sref="main.profile.home({profile: profile.identifier})">
3 <noosfero-profile-image [profile]="profile"></noosfero-profile-image> 3 <noosfero-profile-image [profile]="profile"></noosfero-profile-image>
4 </a> 4 </a>
  5 + <p>{{profile.name}}</p>
5 </div> 6 </div>
src/app/layout/blocks/communities/communities-block.scss
1 -.communities-block {  
2 - .profile { 1 +.communitiesblock {
  2 + .panel-body {
  3 + text-align: center;
3 margin: 10px; 4 margin: 10px;
4 - img, i.profile-image {  
5 - width: 60px;  
6 - }  
7 img { 5 img {
8 display: inline-block; 6 display: inline-block;
9 vertical-align: top; 7 vertical-align: top;
10 } 8 }
11 i.profile-image { 9 i.profile-image {
12 text-align: center; 10 text-align: center;
13 - font-size: 4.5em; 11 + font-size: 7rem;
  12 + }
  13 + p {
  14 + overflow: hidden;
  15 + font-size: 1rem;
  16 + }
  17 + .block-item {
  18 + padding: 0px;
14 } 19 }
15 } 20 }
16 } 21 }
src/app/layout/scss/skins/_whbl.scss
@@ -122,7 +122,7 @@ $whbl-font-color: #16191c; @@ -122,7 +122,7 @@ $whbl-font-color: #16191c;
122 margin-bottom: 0; 122 margin-bottom: 0;
123 position: relative; 123 position: relative;
124 min-height: 1200px; 124 min-height: 1200px;
125 - padding: 15px 15px 35px 15px; 125 + padding: $wrapper-padding;
126 margin-left: 220px; 126 margin-left: 220px;
127 // border-left: 2px solid #e7ebee; 127 // border-left: 2px solid #e7ebee;
128 } 128 }
src/app/profile/activities/activities.html
1 -<timeline>  
2 - <timeline-event ng-repeat="activity in ctrl.activities | orderBy: 'created_at':true">  
3 - <noosfero-activity [activity]="activity"></noosfero-activity>  
4 - </timeline-event>  
5 -</timeline> 1 +<div class="row">
  2 + <hr class="divider"/>
  3 + <div id="atividades">
  4 + <h4>Atividades Recentes</h4>
  5 + <timeline>
  6 + <timeline-event ng-repeat="activity in vm.activities | orderBy: 'created_at':true">
  7 + <hr class="divider"/>
  8 + <noosfero-activity [activity]="activity"></noosfero-activity>
  9 + </timeline-event>
  10 + </timeline>
  11 + <button type="button" class="btn btn-sm btn-block">Carregar mais</button>
  12 + </div>
  13 +</div>
src/app/profile/image/image.html
1 <span class="profile-image-wrap" title="{{ctrl.profile.name}}"> 1 <span class="profile-image-wrap" title="{{ctrl.profile.name}}">
2 - <img ng-if="ctrl.profile.image" ng-src="{{ctrl.profile.image.url}}" class="img-responsive profile-image">  
3 - <i ng-if="!ctrl.profile.image" class="fa {{ctrl.defaultIcon}} fa-5x profile-image"></i> 2 + <img ng-if="ctrl.profile.image" ng-src="{{ctrl.profile.image.url}}" class="">
  3 + <i ng-if="!ctrl.profile.image" class="fa {{ctrl.defaultIcon}} fa-5x profile-image img-avatar"></i>
4 </span> 4 </span>
src/app/profile/info/profile-info.component.ts
@@ -16,17 +16,23 @@ export class ProfileInfoComponent { @@ -16,17 +16,23 @@ export class ProfileInfoComponent {
16 16
17 activities: any; 17 activities: any;
18 profile: noosfero.Profile; 18 profile: noosfero.Profile;
  19 + showInformation: boolean = false;
19 20
20 constructor(private profileService: ProfileService, private amDateFormatFilter: any) { 21 constructor(private profileService: ProfileService, private amDateFormatFilter: any) {
21 this.init(); 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 init() { 33 init() {
25 this.profileService.getCurrentProfile().then((profile: noosfero.Profile) => { 34 this.profileService.getCurrentProfile().then((profile: noosfero.Profile) => {
26 this.profile = profile; 35 this.profile = profile;
27 - return this.profileService.getActivities(<number>this.profile.id);  
28 - }).then((response: restangular.IResponse) => {  
29 - this.activities = response.data.activities;  
30 }); 36 });
31 } 37 }
32 } 38 }
src/app/profile/info/profile-info.html
1 -<div class="profile-wall"> 1 +<!-- <div class="profile-wall mainbox clearfix">
2 2
3 <div class="col-lg-3 col-md-4 col-sm-4"> 3 <div class="col-lg-3 col-md-4 col-sm-4">
4 <div class="main-box clearfix"> 4 <div class="main-box clearfix">
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
8 <div id="profile-left" class="main-box-body clearfix"> 8 <div id="profile-left" class="main-box-body clearfix">
9 <noosfero-profile-image [profile]="vm.profile" class="img-responsive center-block"></noosfero-profile-image> 9 <noosfero-profile-image [profile]="vm.profile" class="img-responsive center-block"></noosfero-profile-image>
10 <span class="label" ng-class="{'label-danger': vm.profile.type == 'Community', 'label-info': vm.profile.type == 'Person'}">{{vm.profile | translateProfile}}</span> 10 <span class="label" ng-class="{'label-danger': vm.profile.type == 'Community', 'label-info': vm.profile.type == 'Person'}">{{vm.profile | translateProfile}}</span>
  11 +
11 <div class="profile-since"> 12 <div class="profile-since">
12 {{"profile.member_since" | translate}}: {{vm.profile.created_at | amDateFormat:'MMMM YYYY'}} 13 {{"profile.member_since" | translate}}: {{vm.profile.created_at | amDateFormat:'MMMM YYYY'}}
13 </div> 14 </div>
@@ -27,4 +28,38 @@ @@ -27,4 +28,38 @@
27 </uib-tabset> 28 </uib-tabset>
28 </div> 29 </div>
29 </div> 30 </div>
  31 +</div> -->
  32 +
  33 +<div class="bg-image"></div>
  34 +
  35 +<div class="container" id="noosfero-profile">
  36 + <div class="col-sm-2">
  37 + <noosfero-profile-image [profile]="vm.profile" class="img-responsive center-block" data-pin-nopin="true"></noosfero-profile-image>
  38 + <div class="social-links">
  39 + <ul>
  40 + <li>Facebook</li>
  41 + <li>Linkdin</li>
  42 + </ul>
  43 + </div>
  44 + </div>
  45 + <div class="col-sm-10">
  46 + <h3>{{ vm.profile.name }}</h3>
  47 + <div ng-switch="description">
  48 + <p ng-if="vm.profile.additional_data['description']">
  49 + {{ 'profile.person.description' | translate }}: {{ vm.profile.additional_data['description'] }}
  50 + </p>
  51 + <p class="pull-left">www.noosfero.gov.br/<strong>{{ vm.profile.identifier }}</strong></p>
  52 + <div class="pull-right info-contato">
  53 + <button ng-click="vm.toggleInformation()" class="btn btn-sm">{{ 'profile.person.contact_info' | translate }}</button>
  54 + <div clas="profile-contact" ng-show="vm.showInformation">
  55 + <p class="email" ng-if="vm.profile.additional_data['contact_email']">Email: {{ vm.profile.additional_data['contact_email'] }}</p>
  56 + <p class="phone" ng-if="vm.profile.additional_data['contact_phone']">
  57 + {{ 'profile.person.contact_phone' | translate }}: {{ vm.profile.additional_data['contact_phone'] }}
  58 + </p>
  59 + <p class="phone" ng-if="(!vm.profile.additional_data['contact_phone'] && !vm.profile.additional_data['contact_email'])">
  60 + {{ 'profile.person.no_contact_info' | translate }}
  61 + </p>
  62 + </div>
  63 + </div>
  64 + </div>
30 </div> 65 </div>
src/app/profile/info/profile-info.scss 0 → 100644
src/app/profile/profile.component.ts
@@ -6,6 +6,7 @@ import {CmsComponent} from &#39;../article/cms/cms.component&#39;; @@ -6,6 +6,7 @@ import {CmsComponent} from &#39;../article/cms/cms.component&#39;;
6 import {ContentViewerComponent} from "../article/content-viewer/content-viewer.component"; 6 import {ContentViewerComponent} from "../article/content-viewer/content-viewer.component";
7 import {ContentViewerActionsComponent} from "../article/content-viewer/content-viewer-actions.component"; 7 import {ContentViewerActionsComponent} from "../article/content-viewer/content-viewer-actions.component";
8 import {ActivitiesComponent} from "./activities/activities.component"; 8 import {ActivitiesComponent} from "./activities/activities.component";
  9 +import {ActivityComponent} from "./activities/activity/activity.component";
9 import {ProfileService} from "../../lib/ng-noosfero-api/http/profile.service"; 10 import {ProfileService} from "../../lib/ng-noosfero-api/http/profile.service";
10 import {NotificationService} from "../shared/services/notification.service"; 11 import {NotificationService} from "../shared/services/notification.service";
11 import {MyProfileComponent} from "./myprofile.component"; 12 import {MyProfileComponent} from "./myprofile.component";
@@ -13,15 +14,14 @@ import {ProfileActionsComponent} from &quot;./profile-actions.component&quot;; @@ -13,15 +14,14 @@ import {ProfileActionsComponent} from &quot;./profile-actions.component&quot;;
13 import {ProfileToolbarComponent} from "./profile-toolbar.component"; 14 import {ProfileToolbarComponent} from "./profile-toolbar.component";
14 /** 15 /**
15 * @ngdoc controller 16 * @ngdoc controller
16 - * @name profile.Profile  
17 - * @description 17 + * @name profile.Profile * @description
18 * This is the profile controller. It provide routes to supported Noosfero Profiles. 18 * This is the profile controller. It provide routes to supported Noosfero Profiles.
19 */ 19 */
20 20
21 @Component({ 21 @Component({
22 selector: 'profile', 22 selector: 'profile',
23 templateUrl: "app/profile/profile.html", 23 templateUrl: "app/profile/profile.html",
24 - directives: [ActivitiesComponent], 24 + directives: [ActivityComponent],
25 providers: [ 25 providers: [
26 provide('profileService', { useClass: ProfileService }), 26 provide('profileService', { useClass: ProfileService }),
27 provide('notificationService', { useClass: NotificationService }) 27 provide('notificationService', { useClass: NotificationService })
@@ -33,7 +33,7 @@ import {ProfileToolbarComponent} from &quot;./profile-toolbar.component&quot;; @@ -33,7 +33,7 @@ import {ProfileToolbarComponent} from &quot;./profile-toolbar.component&quot;;
33 url: "^/profile/:profile", 33 url: "^/profile/:profile",
34 component: ProfileInfoComponent, 34 component: ProfileInfoComponent,
35 views: { 35 views: {
36 - "mainBlockContent": { 36 + "profile-info": {
37 templateUrl: "app/profile/info/profile-info.html", 37 templateUrl: "app/profile/info/profile-info.html",
38 controller: ProfileInfoComponent, 38 controller: ProfileInfoComponent,
39 controllerAs: "vm" 39 controllerAs: "vm"
@@ -46,7 +46,6 @@ import {ProfileToolbarComponent} from &quot;./profile-toolbar.component&quot;; @@ -46,7 +46,6 @@ import {ProfileToolbarComponent} from &quot;./profile-toolbar.component&quot;;
46 "toolbar@main": { 46 "toolbar@main": {
47 templateUrl: "app/profile/toolbar.html", 47 templateUrl: "app/profile/toolbar.html",
48 controller: ProfileToolbarComponent, 48 controller: ProfileToolbarComponent,
49 - controllerAs: "vm"  
50 } 49 }
51 } 50 }
52 }, 51 },
@@ -142,4 +141,6 @@ export class ProfileComponent { @@ -142,4 +141,6 @@ export class ProfileComponent {
142 notificationService.error({ message: "notification.profile.not_found" }); 141 notificationService.error({ message: "notification.profile.not_found" });
143 }); 142 });
144 } 143 }
  144 +
  145 +
145 } 146 }
src/app/profile/profile.html
@@ -4,10 +4,14 @@ @@ -4,10 +4,14 @@
4 [attribute]="'custom_header'" 4 [attribute]="'custom_header'"
5 [profile]="vm.profile"> 5 [profile]="vm.profile">
6 </custom-content> 6 </custom-content>
7 - <noosfero-boxes ng-if="vm.boxes"  
8 - [layout]="vm.profile.layout_template"  
9 - [boxes]="vm.boxes"  
10 - [owner]="vm.profile" class="row">  
11 - </noosfero-boxes> 7 + <div class="row" ui-view="profile-info"></div>
  8 +
  9 + <div class="wrapper-container">
  10 + <noosfero-boxes ng-if="vm.boxes"
  11 + [layout]="vm.profile.layout_template"
  12 + [boxes]="vm.boxes"
  13 + [owner]="vm.profile" class="row">
  14 + </noosfero-boxes>
  15 + </div>
12 <custom-content class="profile-footer" [label]="'profile.custom_footer.label'" [attribute]="'custom_footer'" [profile]="vm.profile"></custom-content> 16 <custom-content class="profile-footer" [label]="'profile.custom_footer.label'" [attribute]="'custom_footer'" [profile]="vm.profile"></custom-content>
13 </div> 17 </div>
src/app/profile/profile.scss
  1 +
  2 +@mixin padding-sides {
  3 + padding-right: 15px;
  4 + padding-left: 15px;
  5 +}
  6 +
  7 +@mixin profile-img {
  8 + text-align: center;
  9 + margin: 10px;
  10 + border: 1px solid #eee;
  11 +}
  12 +
  13 +@media (min-width: 768px) {
  14 + .container {max-width: 980px;}
  15 +}
  16 +
1 .profile-container { 17 .profile-container {
2 @extend .container-fluid; 18 @extend .container-fluid;
3 - padding: 0 1%;  
4 - @media (max-width: 978px) {  
5 - padding: 0 2%; 19 + margin-top: -$wrapper-padding-top;
  20 + margin-left: -$wrapper-padding-left;
  21 + margin-bottom: -$wrapper-padding-bottom;
  22 + margin-right: -$wrapper-padding-right;
  23 + @media (max-width: 978px) {padding: 0 2%;}
  24 +}
  25 +
  26 +.wrapper-container {
  27 + margin: auto;
  28 + max-width: 980px;
  29 +}
  30 +
  31 +.dropdown-menu {
  32 + >li {
  33 + margin:5px 0;
  34 + >a {
  35 + padding:3px 10px 3px 0 !important;
  36 + &:hover {background-color:transparent !important;}
  37 + }
6 } 38 }
7 } 39 }
8 40
9 -#profile-left {  
10 - text-align: center;  
11 - margin-top: 15px; 41 +.bg-image {
  42 + background-color:#eee;
  43 + height: 260px;
  44 +}
  45 +
  46 +.social-links {
  47 + ul {
  48 + list-style:none;
  49 + text-align:center;
  50 + padding:0;
  51 + margin:0;
  52 + }
  53 +}
  54 +
  55 +#noosfero-profile {
  56 + background:#fff;
  57 + margin: -200px auto auto;
  58 + z-index:9999;
  59 + left:0;
  60 + right:0;
  61 + border:1px solid #eee;
  62 + padding:20px 0;
  63 + font-size: 14px;
  64 +
  65 + img,
  66 + i {@include profile-img;}
  67 +
  68 + .col-sm-2 {text-align: center;}
  69 +
  70 + h3 {margin-top: 16px;}
  71 +
  72 + .btn {
  73 + font-size: 12px;
  74 + padding: 5px 10px;
  75 + }
  76 +
  77 + .profile-contact {
  78 + padding-top: 10px;
  79 + p {margin: 0px;}
  80 + }
12 } 81 }
src/languages/en.json
@@ -17,6 +17,10 @@ @@ -17,6 +17,10 @@
17 "profile.others_info": "Others", 17 "profile.others_info": "Others",
18 "profile.community.title": "Community", 18 "profile.community.title": "Community",
19 "profile.person.title": "Person", 19 "profile.person.title": "Person",
  20 + "profile.person.description": "Description",
  21 + "profile.person.contact_info": "Contact Informations",
  22 + "profile.person.contact_phone": "Phone",
  23 + "profile.person.no_contact_info": "No contact informations",
20 "activities.title": "Activities", 24 "activities.title": "Activities",
21 "activities.create_article.description": "has published on", 25 "activities.create_article.description": "has published on",
22 "activities.add_member_in_community.description": "has joined the community", 26 "activities.add_member_in_community.description": "has joined the community",
src/languages/pt.json
@@ -17,6 +17,10 @@ @@ -17,6 +17,10 @@
17 "profile.others_info": "Outras informações", 17 "profile.others_info": "Outras informações",
18 "profile.community.title": "Comunidade", 18 "profile.community.title": "Comunidade",
19 "profile.person.title": "Pessoa", 19 "profile.person.title": "Pessoa",
  20 + "profile.person.description": "Descrição",
  21 + "profile.person.contact_info": "Informações de Contato",
  22 + "profile.person.contact_phone": "Telefone",
  23 + "profile.person.no_contact_info": "Sem informações de contato",
20 "activities.title": "Atividades", 24 "activities.title": "Atividades",
21 "activities.create_article.description": "publicou em", 25 "activities.create_article.description": "publicou em",
22 "activities.add_member_in_community.description": "entrou na comunidade", 26 "activities.add_member_in_community.description": "entrou na comunidade",