Merge Request #12
Login block
Added the Noosfero basic login-block.
-
Merge remote-tracking branch 'origin/master' into login-block
- 8 of 9 commits displayed. Click here to show all
-
Reassigned to @mfdeveloper
-
Esta alteração não foi deste branch. Também não entendi.
-
O uso de
$scope
para callback de eventos é uma abordagem do Angular 1.x que deve ser evitada. Ao invés disso, utilize a classeEventEmitter
como sugerido pelong-forward
-
Qual a diferença neste mock? Me pareceu que não houve alteração
-
O uso de $emit para executar callbacks de eventos é uma abordagem do Angular 1.x que deve ser evitada. Ao invés disso, utilize o método
EventEmitter.next()
ouEventEmitter.emit()
como sugerido pelong-forward
-
Substituir uso de
$scope
paraEventEmitter
aq tbm! -
A biblioteca
moment
que estamos utilizando como dependência no projeto possui alguns métodos para exibir essas informações de data. Por favor, verifique se não há uma que já faça isso -
identifier
ecreated_at
não são dados específicos dePerson
, mas sim de qualquerProfile
(Comunidades, Organizações...). Não seria melhor mover esses atributos para Profile? -
Added 92 new commits:
- 0fdd5d98 - picture for people block participa-consulta-theme
- 1f4da208 - People block style
- 976e5d62 - Fix state change of sidebar
- 172c82f5 - Add discussion block for comment paragraph
- f9a71d96 - Refactor of article cms
- 7352b22a - Dynamically load article editor component based on specific type
- 6b394e0b - Add component to edit comment paragraph discussions
- d56bc4d4 - Do now show comment form when article doesn't accept comments
- a68fcd7a - Add hotspot to display extra content for articles
- c046c510 - Display period for discussions in comment paragraph plugin
- 34b11fee - Fix warnings in typescript code
- afd487b0 - Merge branch 'comment-paragraph-article' into 'master'
- 8af6d143 - Fix merge with comment-paragraph
- 8362948a - adding participa consulta theme
- e59add5d - Created sidebar component with sass and a service to show/hide using Angular 2 EventEmitter sintax
- 4c39bd75 - Added hamburguer sidebar toggle button to show only after login
- 41cad538 - Refactory into unit tests to use EventEmitter mocks
- f711ee9c - Refactory into ComponentTestHelper and sidebar unit tests enhancements
- dd6a4819 - Added feature to sidebar pushing right content on show/hide
- af427f22 - Created SidebarSectionsComponent with a dinamic menu/submenu
- 7e4cecee - Added @ngdoc documentation and refactor the SidebarSection component
- c0fd7cf6 - Merge branch 'sidebar-menu' into 'master'
- 2cafe5da - Add macro directive for articles
- 4b4877ed - Load components defined in plugins
- 33544a8b - Add plugins in gulp build
- 31b34a75 - Display paragraph comments besides the article
- 1f246d3f - Load comments by paragraph
- 56a44bd2 - Create infra for plugins hotspots
- 5deddf45 - Set parahraph uuid when create comments in paragraphs
- abdfbb35 - Activate/deactivate comment paragraph in articles
- b77b920c - Emit event when toggle comment paragraph in articles
- 8a1cb95c - Display comment counts beside paragraphs
- 65c6a4ac - Merge plugin languages when building with gulp
- 9bf4d461 - Improve layout of comment paragraph plugin
- 7b6978a6 - Fix html path in karma conf
- f98ac330 - Add tests for comment paragraph plugin
- 4840baa9 - Add paragraph uuid in comment form
- 800e2559 - Limit comments identation and display replied comment in tooltip
- 12f1379f - Merge branch 'comment-paragraph' into 'master'
- ed34cf65 - Support ckeditor in article edition
- 28d86107 - Support storage of current object in generic restangular service
- 2259690d - Create article and associate it to parent
- a5984494 - Move basic editor to its own folder
- ecac812c - Add cancel button in basic editor
- ed2107bd - Translate basic editor component
- 33ae65dd - Adapt basic editor to edit an existing article
- 8f0e4db1 - Create component to encapsulate wysiwyg editor
- 6b15acb7 - Add article edit button
- ba389ecc - Edit visibility status of an article
- 00eaab03 - Display basic error message when fail to save an article
- 5f9ef2ae - Refactor tests of content viewer actions to use ComponentTestHelper
- 1894afc0 - Merge branch 'create-article' into 'master'
- 8616dd98 - Add missing type arguments from members and people blocks
- dcc1120f - Fix styles watch from gulp
- 5eeecfe1 - Added header and footer, no tests yet
- 0526d30c - Merge branch 'header_and_footer' into 'master'
- 2f289f34 - Merge branch 'master' of softwarepublico.gov.br:noosfero-themes/angular-theme
- 98521917 - Restore missing code after merge with comment-paragraph
- 12039f0c - Fix warnings in comment-paragraph
- 9cb82c98 - removing warning
- 8c7b12aa - refactoring communities block
- 34d5ef65 - refactoring link list block
- 11081744 - refactoring main block
- 2b6b1400 - refactoring members block
- ea43a611 - refactoring people block
- 56073cfd - refactoring profile image block
- da32e022 - refactoring raw html block
- 9b3a27c9 - refactoring recent documents block
- c73e431e - adding basic information of statisticst block
- 5af8017d - Adding counters to statistics block
- 2efd5865 - adding unit test for statistics block
- 2418a97b - fix merge conflit
- c1b134be - comment style
- 299d40d1 - updated to use statistics array property in statistic block to fill the statistic block content
- a5a76711 - Merge branch 'statistics_block' into 'master'
- e99067c1 - Merge branch 'master' of softwarepublico.gov.br:noosfero-themes/angular-theme
- f0fe6b59 - adding new button to comment paragraph
- 5e8f7a89 - save articles without parent
- 1aa2ffcc - Merge branch 'master' of softwarepublico.gov.br:noosfero-themes/angular-theme
- 2cf099d7 - Fix warning in discussion block
- e6fc72ab - Fix noosfero layout
- dcb9f310 - fix grid configuration degrid
- 5727b1d8 - Fix build of ckeditor
- 4e270e6c - Fix gulp conf
- 246f026b - Do not show discussion header in regular articles
- b4421c0d - Fix warning in body states classes service
- 39a5fc2d - Merge branch 'master' of softwarepublico.gov.br:noosfero-themes/angular-theme
- 58a458df - people block style for participa consulta
- 8dde2ffd - using inheritance of classes for box
- 9cf0c6e6 - statistics block style for participa consulta theme
- ab10b960 - align center header content for participa consulta theme
- 49c1ee26 - Merging with master
-
mentioned in commit 5161636a08ea267906fc341042d3a33afbe22f75
9 | - @Input() comment: noosfero.Comment; | |
10 | + @Input() comment: noosfero.CommentViewModel; | |
10 | 11 | @Input() article: noosfero.Article; |
11 | 12 | |
12 | - showReply: boolean = false; | |
13 | + showReply() { | |
14 | + return this.comment && this.comment.__show_reply === true; | |
15 | + } | |
16 | + | |
17 | + constructor() { | |
18 | + } | |
19 | + | |
13 | 20 | |
14 | 21 | reply() { |
15 | - this.showReply = true; | |
22 | + this.comment.__show_reply = !this.comment.__show_reply; | |
2 |
|
27 | + * @ngdoc property | |
28 | + * @name credentials | |
29 | + * @propertyOf layout.blocks.LoginBlockComponent | |
30 | + * @description | |
31 | + * The credentials of the currentUser | |
32 | + */ | |
33 | + credentials: noosfero.Credentials; | |
34 | + | |
35 | + constructor( | |
36 | + private session: SessionService, | |
37 | + private $state: ng.ui.IStateService, | |
38 | + private authService: AuthService, | |
39 | + private $scope: ng.IScope) { | |
40 | + this.currentUser = this.session.currentUser(); | |
41 | + | |
42 | + this.$scope.$on(AUTH_EVENTS.loginSuccess, () => { | |
1 |
|
41 | 41 | } |
42 | 42 | }, |
43 | 43 | authService: { |
44 | - logout: () => { } | |
44 | + logout: () => { }, | |
1 |
|
89 | + } | |
90 | + | |
91 | + /** | |
92 | + * Simulate the AuthService loginSuccess event | |
93 | + */ | |
94 | + function simulateLogin() { | |
95 | + let localScope: ng.IScope = helper.component["$scope"]; | |
96 | + localScope.$emit(AUTH_EVENTS.loginSuccess); | |
97 | + } | |
98 | + | |
99 | + /** | |
100 | + * Simulate the AuthService logoutSuccess event | |
101 | + */ | |
102 | + function simulateLogout() { | |
103 | + let localScope: ng.IScope = helper.component["$scope"]; | |
104 | + localScope.$emit(AUTH_EVENTS.logoutSuccess); | |
1 |
|
41 | 41 | |
42 | 42 | this.$scope.$on(AUTH_EVENTS.loginSuccess, () => { |
43 | 43 | this.currentUser = this.session.currentUser(); |
44 | + console.debug("User: ", this.currentUser); | |
44 | 45 | }); |
45 | 46 | |
46 | 47 | this.$scope.$on(AUTH_EVENTS.logoutSuccess, () => { |
1 |
|
1 | 1 | <div class="logged-user-info" ng-show="ctrl.currentUser"> |
2 | 2 | <h4>Logged in as {{ctrl.currentUser.person.identifier}}</h4> |
3 | 3 | <ul> |
4 | - <li>User since {{ctrl.currentUser.created_at.month}}/{{ctrl.currentUser.created_at.year}}</li> | |
1 |
|
6 | 6 | * A representation of a Person in Noosfero. |
7 | 7 | */ |
8 | 8 | export interface Person extends Profile { |
9 | - | |
9 | + created_at: string; | |
1 |
|