Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Commit

Permalink
Merge pull request #274 from RandyInVictoria/activities
Browse files Browse the repository at this point in the history
EPIC-1245 Activities and Updates: added blank, 4 priorities
  • Loading branch information
marklise authored Oct 4, 2017
2 parents 6a1bd77 + 632e336 commit cd0df7c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
20 changes: 13 additions & 7 deletions modules/recent-activity/client/views/recent-activity-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ <h1>Create/Edit Activity & Update</h1>
</div>
<div class="col-md-3">
<label class="control-label">Date Added</label>
<div class="form-control pcp-date date-picker"
x-modal-date-picker
<div class="form-control pcp-date date-picker"
x-modal-date-picker
x-selected-date="recentActivity.dateAdded">
{{ recentActivity.dateAdded | amDateFormat:'MMMM DD, YYYY' }}
<span class="glyphicon glyphicon-calendar"></span>
Expand All @@ -94,18 +94,24 @@ <h1>Create/Edit Activity & Update</h1>
<section>
<div class="row">
<div class="col-sm-2">
<div class="form-group">
<div class="form-group" x-show-errors>
<label for="priority" class="control-label">Set Priority Order</label>
<select
class="form-control"
id="priority"
<select id="priority"
name="priority"
class="form-control"
ng-model="recentActivity.priority"
ng-init="recentActivity.priority = recentActivity.priority" convert-to-number>
ng-init="recentActivity.priority = recentActivity.priority"
convert-to-number
required>
<option value=""></option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<div ng-messages="recentActivityForm.priority.$error" role="alert">
<p class="help-block error-text" ng-message="required">Priority is required.</p>
</div>
</div>
</div>
</div>
Expand Down
20 changes: 10 additions & 10 deletions modules/recent-activity/server/models/recent-activity.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
// =========================================================================
module.exports = require ('../../../core/server/controllers/core.schema.controller')
('RecentActivity', {
__audit : true,
headline : { type: String, default:'' },
content : { type: String, default:'' },
project : { type: 'ObjectId', ref:'Project', index:true, default:null },
active : { type: Boolean, default: false },
priority : { type: Number, default: 2, index:true },
type : { type: String, default:'' }, // news | public comment period
contentUrl : {type: String, default:''},
documentUrl : {type: String, default:''},
pinned : {type: Boolean, default:false},
__audit : true,
headline : { type: String, default: '' },
content : { type: String, default: '' },
project : { type: 'ObjectId', ref: 'Project', index: true, default: null },
active : { type: Boolean, default: false },
priority : { type: Number, default: null, index: true },
type : { type: String, default: '' }, // news | public comment period
contentUrl : { type: String, default: '' },
documentUrl : { type: String, default: '' },
pinned : { type: Boolean, default: false },
});

0 comments on commit cd0df7c

Please sign in to comment.