1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-05 05:25:27 +02:00

github for single repos only, with selectable sub-sections

This commit is contained in:
Elliott Stoneham 2016-09-28 14:42:55 +01:00
parent 7bf9901c9a
commit 6e362c0eac
10 changed files with 104 additions and 28 deletions

View file

@ -41,6 +41,9 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
branchLines: "100",
userId: "",
pageId: page.get('id'),
showMilestones: false,
showIssues: false,
showCommits: false,
};
try {
@ -50,6 +53,9 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
config.branchSince = metaConfig.branchSince;
config.userId = metaConfig.userId;
config.pageId = metaConfig.pageId;
config.showMilestones = metaConfig.showMilestones;
config.showIssues = metaConfig.showIssues;
config.showCommits = metaConfig.showCommits;
} catch (e) {}
self.set('config', config);
@ -168,12 +174,16 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
return this.get('isDirty');
},
onListCheckbox(id) {
onListCheckbox(id) { // select one repository only
let lists = this.get('config.lists');
let list = lists.findBy('id', id);
lists.forEach(function (entry) {
Ember.set(entry, 'included', false);
});
if (list !== null) {
Ember.set(list, 'included', !list.included);
Ember.set(list, 'included', true);
}
},

View file

@ -7,18 +7,30 @@
<div class="pull-left width-45">
<div class="input-form">
<div class="heading">
<div class="title">Select Repositories</div>
<div class="title">Select Repository</div>
<div class="tip">Choose source of code information to be displayed</div>
</div>
<div class="input-control">
<label>Organization or User</label>
<div class="tip">Select organization or username whose repositories you want to show</div>
<div class="tip">Select organization or username whose repository you want to show</div>
{{ui-select id="owners-dropdown" content=owners action=(action 'onOwnerChange') optionValuePath="id" optionLabelPath="name" selection=config.owner}}
</div>
<div class="input-control">
<label>Show items since (default 7 days ago)</label>
{{input id="branch-since" value=config.branchSince type="text" }}<br>
</div>
<div class="input-control">
<label>Show Milestones</label>
{{input id="show-milestone" checked=config.showMilestones type="checkbox"}}<br>
</div>
<div class="input-control">
<label>Show Issues</label>
{{input id="show-issues" checked=config.showIssues type="checkbox"}}<br>
</div>
<div class="input-control">
<label>Show Commits</label>
{{input id="show-commits" checked=config.showCommits type="checkbox" }}<br>
</div>
</div>
</div>
@ -28,7 +40,7 @@
<div class="input-form">
<div class="input-control">
<label>Repositories</label>
<div class="tip">Select the repositories to show</div>
<div class="tip">Select the repository to show</div>
<div class="github-board">
{{#each config.lists as |list|}}
<div class="github-list" {{action 'onListCheckbox' list.id}}>