mirror of
https://github.com/status-im/burnchart.git
synced 2025-01-27 10:54:59 +00:00
format milestone titles
This commit is contained in:
parent
5cef4596be
commit
5040501d34
@ -26,6 +26,7 @@ GitHub Burndown Chart as a service. Public repos are free, for private access au
|
|||||||
- [ ] Check that we have not run out of requests to make
|
- [ ] Check that we have not run out of requests to make
|
||||||
- [ ] Show loading sign on top of [browser window](https://github.com/buunguyen/topbar) which is unobtrusive enough we can show it immediately.
|
- [ ] Show loading sign on top of [browser window](https://github.com/buunguyen/topbar) which is unobtrusive enough we can show it immediately.
|
||||||
- [ ] show a countdown clock towards the end of the milestone or show overdue
|
- [ ] show a countdown clock towards the end of the milestone or show overdue
|
||||||
|
- [x] format milestone titles prepending "Milestone" word if appropriate
|
||||||
- [x] Variable document.title on different pages
|
- [x] Variable document.title on different pages
|
||||||
- [x] be able to go back to homepage
|
- [x] be able to go back to homepage
|
||||||
- [x] deal with no due date milestones - always on track
|
- [x] deal with no due date milestones - always on track
|
||||||
|
@ -40755,7 +40755,7 @@ if (typeof exports === 'object') {
|
|||||||
// showChart.mustache
|
// showChart.mustache
|
||||||
root.require.register('burnchart/src/templates/pages/showChart.js', function(exports, require, module) {
|
root.require.register('burnchart/src/templates/pages/showChart.js', function(exports, require, module) {
|
||||||
|
|
||||||
module.exports = ["<div id=\"title\">"," <div class=\"wrap\">"," <h2 class=\"title\">{{ milestone.title }}</h2>"," <span class=\"sub\">{{{ format.due(milestone.due_on) }}}</span>"," <p class=\"description\">{{{ format.markdown(milestone.description) }}}</p>"," </div>","</div>","","<div id=\"content\" class=\"wrap\">"," <div id=\"chart\">"," <div id=\"svg\"></div>"," </div>","</div>"].join("\n");
|
module.exports = ["<div id=\"title\">"," <div class=\"wrap\">"," <h2 class=\"title\">{{ format.title(milestone.title) }}</h2>"," <span class=\"sub\">{{{ format.due(milestone.due_on) }}}</span>"," <p class=\"description\">{{{ format.markdown(milestone.description) }}}</p>"," </div>","</div>","","<div id=\"content\" class=\"wrap\">"," <div id=\"chart\">"," <div id=\"svg\"></div>"," </div>","</div>"].join("\n");
|
||||||
});
|
});
|
||||||
|
|
||||||
// projects.mustache
|
// projects.mustache
|
||||||
@ -40811,6 +40811,13 @@ if (typeof exports === 'object') {
|
|||||||
},
|
},
|
||||||
'markdown': function(markup) {
|
'markdown': function(markup) {
|
||||||
return marked(markup);
|
return marked(markup);
|
||||||
|
},
|
||||||
|
'title': function(text) {
|
||||||
|
if (text.toLowerCase().indexOf('milestone') > -1) {
|
||||||
|
return text;
|
||||||
|
} else {
|
||||||
|
return ['Milestone', text].join(' ');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -789,7 +789,7 @@
|
|||||||
// showChart.mustache
|
// showChart.mustache
|
||||||
root.require.register('burnchart/src/templates/pages/showChart.js', function(exports, require, module) {
|
root.require.register('burnchart/src/templates/pages/showChart.js', function(exports, require, module) {
|
||||||
|
|
||||||
module.exports = ["<div id=\"title\">"," <div class=\"wrap\">"," <h2 class=\"title\">{{ milestone.title }}</h2>"," <span class=\"sub\">{{{ format.due(milestone.due_on) }}}</span>"," <p class=\"description\">{{{ format.markdown(milestone.description) }}}</p>"," </div>","</div>","","<div id=\"content\" class=\"wrap\">"," <div id=\"chart\">"," <div id=\"svg\"></div>"," </div>","</div>"].join("\n");
|
module.exports = ["<div id=\"title\">"," <div class=\"wrap\">"," <h2 class=\"title\">{{ format.title(milestone.title) }}</h2>"," <span class=\"sub\">{{{ format.due(milestone.due_on) }}}</span>"," <p class=\"description\">{{{ format.markdown(milestone.description) }}}</p>"," </div>","</div>","","<div id=\"content\" class=\"wrap\">"," <div id=\"chart\">"," <div id=\"svg\"></div>"," </div>","</div>"].join("\n");
|
||||||
});
|
});
|
||||||
|
|
||||||
// projects.mustache
|
// projects.mustache
|
||||||
@ -845,6 +845,13 @@
|
|||||||
},
|
},
|
||||||
'markdown': function(markup) {
|
'markdown': function(markup) {
|
||||||
return marked(markup);
|
return marked(markup);
|
||||||
|
},
|
||||||
|
'title': function(text) {
|
||||||
|
if (text.toLowerCase().indexOf('milestone') > -1) {
|
||||||
|
return text;
|
||||||
|
} else {
|
||||||
|
return ['Milestone', text].join(' ');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div id="title">
|
<div id="title">
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h2 class="title">{{ milestone.title }}</h2>
|
<h2 class="title">{{ format.title(milestone.title) }}</h2>
|
||||||
<span class="sub">{{{ format.due(milestone.due_on) }}}</span>
|
<span class="sub">{{{ format.due(milestone.due_on) }}}</span>
|
||||||
<p class="description">{{{ format.markdown(milestone.description) }}}</p>
|
<p class="description">{{{ format.markdown(milestone.description) }}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -37,4 +37,11 @@ module.exports =
|
|||||||
|
|
||||||
# Markdown formatting.
|
# Markdown formatting.
|
||||||
'markdown': (markup) ->
|
'markdown': (markup) ->
|
||||||
marked markup
|
marked markup
|
||||||
|
|
||||||
|
# Format milestone title.
|
||||||
|
'title': (text) ->
|
||||||
|
if text.toLowerCase().indexOf('milestone') > -1
|
||||||
|
text
|
||||||
|
else
|
||||||
|
[ 'Milestone', text ].join(' ')
|
Loading…
x
Reference in New Issue
Block a user