Commit c046c510dd0df43719d26e55b36d076c2bfee021

Authored by Victor Costa
1 parent a68fcd7a

Display period for discussions in comment paragraph plugin

src/plugins/comment_paragraph/hotspot/article-content/article-content.component.ts 0 → 100644
... ... @@ -0,0 +1,12 @@
  1 +import { Input, Inject, Component } from "ng-forward";
  2 +import {Hotspot} from "../../../../app/hotspot/hotspot.decorator";
  3 +
  4 +@Component({
  5 + selector: "comment-paragraph-article-content-hotspot",
  6 + templateUrl: "plugins/comment_paragraph/hotspot/article-content/article-content.html",
  7 +})
  8 +@Hotspot("article_extra_content")
  9 +export class CommentParagraphArticleContentHotspotComponent {
  10 +
  11 + @Input() article: noosfero.Article;
  12 +}
... ...
src/plugins/comment_paragraph/hotspot/article-content/article-content.html 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +<div class="discussion-header">
  2 + <span class="description">{{"comment-paragraph-plugin.discussion.header" | translate}}</span>
  3 + <span class="start-date date" ng-if="ctrl.article.start_date">
  4 + <span class="description">{{"comment-paragraph-plugin.discussion.editor.start_date.label" | translate}}</span>
  5 + <span class="value">{{ctrl.article.start_date | amDateFormat:'DD/MM/YYYY'}}</span>
  6 + </span>
  7 + <span class="end-date date" ng-if="ctrl.article.end_date">
  8 + <span class="description">{{"comment-paragraph-plugin.discussion.editor.end_date.label" | translate}}</span>
  9 + <span class="value">{{ctrl.article.end_date | amDateFormat:'DD/MM/YYYY'}}</span>
  10 + </span>
  11 +</div>
... ...
src/plugins/comment_paragraph/hotspot/article-content/article-content.scss 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +.discussion-header {
  2 + @extend .pull-right;
  3 + margin-bottom: 20px;
  4 + .date {
  5 + text-transform: lowercase;
  6 + font-size: 16px;
  7 + .description {
  8 + font-weight: bold;
  9 + color: #BFBFBF;
  10 + }
  11 + .value {
  12 + font-size: 15px;
  13 + color: #969696;
  14 + }
  15 + }
  16 + .description {
  17 + font-weight: bold;
  18 + color: #BFBFBF;
  19 + }
  20 +}
... ...
src/plugins/comment_paragraph/index.ts
... ... @@ -2,6 +2,7 @@ import {AllowCommentComponent} from &quot;./allow-comment/allow-comment.component&quot;;
2 2 import {CommentParagraphArticleButtonHotspotComponent} from "./hotspot/comment-paragraph-article-button.component";
3 3 import {CommentParagraphFormHotspotComponent} from "./hotspot/comment-paragraph-form.component";
4 4 import {DiscussionEditorComponent} from "./article/cms/discussion-editor/discussion-editor.component";
  5 +import {CommentParagraphArticleContentHotspotComponent} from "./hotspot/article-content/article-content.component";
5 6  
6 7 export let mainComponents: any = [AllowCommentComponent, DiscussionEditorComponent];
7   -export let hotspots: any = [CommentParagraphArticleButtonHotspotComponent, CommentParagraphFormHotspotComponent];
  8 +export let hotspots: any = [CommentParagraphArticleButtonHotspotComponent, CommentParagraphFormHotspotComponent, CommentParagraphArticleContentHotspotComponent];
... ...
src/plugins/comment_paragraph/languages/en.json
1 1 {
2 2 "comment-paragraph-plugin.title": "Paragraph Comments",
3 3 "comment-paragraph-plugin.discussion.editor.start_date.label": "From",
4   - "comment-paragraph-plugin.discussion.editor.end_date.label": "To"
  4 + "comment-paragraph-plugin.discussion.editor.end_date.label": "To",
  5 + "comment-paragraph-plugin.discussion.header": "Open for comments"
5 6 }
... ...
src/plugins/comment_paragraph/languages/pt.json
1 1 {
2 2 "comment-paragraph-plugin.title": "Comentários por Parágrafo",
3 3 "comment-paragraph-plugin.discussion.editor.start_date.label": "De",
4   - "comment-paragraph-plugin.discussion.editor.end_date.label": "Até"
  4 + "comment-paragraph-plugin.discussion.editor.end_date.label": "Até",
  5 + "comment-paragraph-plugin.discussion.header": "Aberto para comentários"
5 6 }
... ...