Commit a92499c6f7282cef2d005c8532746dd30f30f853

Authored by Victor Costa
1 parent e7ede5b4
Exists in master and in 1 other branch dev-fixes

Include rawhtml block in main components

src/app/components/noosfero-blocks/raw-html/raw-html.component.spec.ts
1 1 import {TestComponentBuilder} from 'ng-forward/cjs/testing/test-component-builder';
2 2 import {Component} from 'ng-forward';
3 3  
4   -import {RawHtmlBlock} from './raw-html.component';
  4 +import {RawHTMLBlock} from './raw-html.component';
5 5  
6 6 const tcb = new TestComponentBuilder();
7 7  
... ... @@ -21,10 +21,10 @@ describe("Components", () => {
21 21 @Component({
22 22 selector: 'test-container-component',
23 23 template: htmlTemplate,
24   - directives: [RawHtmlBlock],
  24 + directives: [RawHTMLBlock],
25 25 })
26 26 class CustomBlockType {
27   - block: any = { settings: { html: '<em>block content</em>' } };
  27 + block: any = { settings: { html: '<em>block content</em>' } };
28 28 owner: any = { name: 'profile-name' };
29 29 }
30 30 tcb.createAsync(CustomBlockType).then(fixture => {
... ...
src/app/components/noosfero-blocks/raw-html/raw-html.component.ts
1 1 import {Component, Input} from "ng-forward";
2 2  
3 3 @Component({
4   - selector: "noosfero-raw-html-block",
  4 + selector: "noosfero-raw-htmlblock",
5 5 templateUrl: 'app/components/noosfero-blocks/raw-html/raw-html.html'
6 6 })
7 7  
8   -export class RawHtmlBlock {
  8 +export class RawHTMLBlock {
9 9  
10 10 @Input() block: any;
11 11 @Input() owner: any;
... ...
src/app/main/main.component.ts
... ... @@ -9,6 +9,7 @@ import {Block} from &quot;../components/noosfero-blocks/block.component&quot;;
9 9 import {LinkListBlock} from "../components/noosfero-blocks/link-list/link-list.component";
10 10 import {RecentDocumentsBlock} from "../components/noosfero-blocks/recent-documents/recent-documents.component";
11 11 import {ProfileImageBlock} from "../components/noosfero-blocks/profile-image-block/profile-image-block.component";
  12 +import {RawHTMLBlock} from "../components/noosfero-blocks/raw-html/raw-html.component";
12 13  
13 14 import {MembersBlock} from "../components/noosfero-blocks/members-block/members-block.component";
14 15 import {NoosferoTemplate} from "../components/noosfero/noosfero-template.filter";
... ... @@ -38,7 +39,7 @@ export class MainContent {
38 39 directives: [
39 40 ArticleBlog, ArticleView, Boxes, Block, LinkListBlock,
40 41 MainBlock, RecentDocumentsBlock, Navbar, ProfileImageBlock,
41   - MembersBlock, NoosferoTemplate, DateFormat
  42 + MembersBlock, NoosferoTemplate, DateFormat, RawHTMLBlock
42 43 ],
43 44 providers: [AuthService, Session]
44 45 })
... ...