diff --git a/app/app/components/section/github/type-editor.js b/app/app/components/section/github/type-editor.js
index ec7ceac2..5db483c7 100644
--- a/app/app/components/section/github/type-editor.js
+++ b/app/app/components/section/github/type-editor.js
@@ -182,8 +182,11 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
renderSwitch(thisReport) {
- $.datetimepicker.setLocale('en');
- $('#branch-since').datetimepicker();
+ if (is.undefined(this.get('initDateTimePicker'))) {
+ $.datetimepicker.setLocale('en');
+ $('#branch-since').datetimepicker();
+ this.set('initDateTimePicker', "Done");
+ }
let bl = this.get('config.branchLines');
if (is.undefined(bl) || bl === "" || bl <= 0) {
diff --git a/documize/section/github/github.go b/documize/section/github/github.go
index 4a17755e..0625d4a4 100644
--- a/documize/section/github/github.go
+++ b/documize/section/github/github.go
@@ -578,7 +578,7 @@ func (t *Provider) Refresh(configJSON, data string) string {
if err != nil {
log.Error("unable to unmarshall github config", err)
- return data
+ return "internal configuration error '" + err.Error() + "'"
}
c.Clean()
@@ -637,7 +637,7 @@ func (p *Provider) Render(config, data string) string {
if err != nil {
log.Error("unable to unmarshall github config", err)
- return "Documize internal github json umarshall config error: " + err.Error()
+ return "Please delete and recreate this Github section."
}
c.Clean()
@@ -682,18 +682,23 @@ func (p *Provider) Render(config, data string) string {
err = json.Unmarshal([]byte(data), &raw)
if err != nil {
log.Error("unable to unmarshall github issue data", err)
- return "Documize internal github json umarshall open data error: " + err.Error()
+ return "Documize internal github json umarshall open data error: " + err.Error() + "
" + data
}
}
payload.Issues = raw
- if len(c.Lists) > 0 {
- for _, v := range c.Lists {
- if v.Included {
- payload.ShowList = true
- break
+ if strings.TrimSpace(c.IssuesText) != "" {
+ payload.ShowIssueNumbers = true
+ payload.DateMessage = c.IssuesText
+ } else {
+ if len(c.Lists) > 0 {
+ for _, v := range c.Lists {
+ if v.Included {
+ payload.ShowList = true
+ break
+ }
}
+ payload.List = c.Lists
}
- payload.List = c.Lists
}
default: // to handle legacy data, this handles commits
@@ -702,7 +707,7 @@ func (p *Provider) Render(config, data string) string {
if err != nil {
log.Error("unable to unmarshall github commit data", err)
- return "Documize internal github json umarshall data error: " + err.Error()
+ return "Documize internal github json umarshall data error: " + err.Error() + "
" + data
}
c.ReportInfo.ID = "commits_data"
payload.BranchCommits = raw
diff --git a/documize/section/github/model.go b/documize/section/github/model.go
index a60f3756..2c9aa34a 100644
--- a/documize/section/github/model.go
+++ b/documize/section/github/model.go
@@ -20,13 +20,14 @@ import (
)
type githubRender struct {
- Config githubConfig
- Repo githubRepo
- List []githubBranch
- ShowList bool
- BranchCommits []githubBranchCommits
- CommitCount int
- Issues []githubIssue
+ Config githubConfig
+ Repo githubRepo
+ List []githubBranch
+ ShowList bool
+ ShowIssueNumbers bool
+ BranchCommits []githubBranchCommits
+ CommitCount int
+ Issues []githubIssue
//IssueNum int
//IssueNumActivity []githubIssueActivity
Limit int
@@ -76,9 +77,12 @@ var renderTemplates = map[string]string{
{{$label.Name}}
{{end}}
{{end}}
+ {{end}};
+ {{if .ShowIssueNumbers}}
+ issue(s) {{ .DateMessage }}.
+ {{else}}
+ up to {{ .Limit }} items are shown{{ .DateMessage }}.
{{end}}
- .
- Up to {{ .Limit }} items are shown{{ .DateMessage }}.