Skip to content

Commit

Permalink
SAK-32187 Add new event types to the calendar tool. (sakaiproject#3916)
Browse files Browse the repository at this point in the history
* SAK-32187 Add new event types to the calendar tool.

* SAK-32187 Change italic tags to span tags.
  • Loading branch information
RebeccaMiller-Which authored and ottenhoff committed Feb 17, 2017
1 parent 395b518 commit 2917bf0
Show file tree
Hide file tree
Showing 11 changed files with 146 additions and 45 deletions.
6 changes: 5 additions & 1 deletion calendar/calendar-bundles/resources/calendar.properties
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ legend.key12 = Meeting
legend.key13 = Multidisciplinary Conference
legend.key14 = Quiz
legend.key15 = Special event
legend.key16 = Web Assignment
legend.key16 = Web Assignment
legend.key17 = Formative Assessment
legend.key18 = Submission Date
legend.key19 = Tutorial
legend.key20 = Workshop

del.deleteall = Delete all occurrences
del.deleteonly = Delete only this occurrence
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6525,15 +6525,20 @@ else if (type.equals("Special event"))
return rl.getString("legend.key15");
else if (type.equals("Web Assignment"))
return rl.getString("legend.key16");
else if (type.equals("Teletutoria"))
else if (type.equals("Formative Assessment"))
return rl.getString("legend.key17");
else if (type.equals("Submission Date"))
return rl.getString("legend.key18");
else if (type.equals("Tutorial"))
return rl.getString("legend.key19");
else if (type.equals("Workshop"))
return rl.getString("legend.key20");
else
return rl.getString("legend.key2");
}else{
return rl.getString("legend.key2");
}
}

/*
* Gets the daily start time parameter from a Properties object filled from URL parameters.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -935,15 +935,23 @@ else if (ITEM_TYPE_PROPERTY_NAME.equals(column.getColumnHeader())){
}else if (cellValue.equals("event.computer")){
mapCellValue="Computer Session";
}else if (cellValue.equals("event.deadline")){
mapCellValue="Deadline";
mapCellValue="Deadline";
}else if (cellValue.equals("event.formative")){
mapCellValue="Formative Assessment";
}else if (cellValue.equals("event.conference")){
mapCellValue="Multidisciplinary Conference";
}else if (cellValue.equals("event.quiz")){
mapCellValue="Quiz";
}else if (cellValue.equals("event.special")){
mapCellValue="Special event";
mapCellValue="Special event";
}else if (cellValue.equals("event.submission")){
mapCellValue="Submission Date";
}else if (cellValue.equals("event.tutorial")){
mapCellValue="Tutorial";
}else if (cellValue.equals("event.assignment")){
mapCellValue="Web Assignment";
mapCellValue="Web Assignment";
}else if (cellValue.equals("event.workshop")){
mapCellValue="Workshop";
}else{
mapCellValue = cellValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -873,11 +873,15 @@ public synchronized Map<String, String> getEventIconMap() {
eventIconMap.put("Computer Session", "<span class=\"icon icon-calendar-computer-session\"></span>");
eventIconMap.put("Deadline", "<span class=\"icon icon-calendar-deadline\"></span>");
eventIconMap.put("Exam", "<span class=\"icon icon-calendar-exam\"></span>");
eventIconMap.put("Formative Assessment", "<span class=\"icon icon-calendar-formative-assessment\"></span>");
eventIconMap.put("Meeting", "<span class=\"icon icon-calendar-meeting\"></span>");
eventIconMap.put("Multidisciplinary Conference", "<span class=\"icon icon-calendar-multidisciplinary-conference\"></span>");
eventIconMap.put("Quiz", "<span class=\"icon icon-calendar-quiz\"></span>");
eventIconMap.put("Special event", "<span class=\"icon icon-calendar-special-event\"></span>");
eventIconMap.put("Submission Date", "<span class=\"icon icon-calendar-submission-date\"></span>");
eventIconMap.put("Tutorial", "<span class=\"icon icon-calendar-tutorial\"></span>");
eventIconMap.put("Web Assignment", "<span class=\"icon icon-calendar-web-assignment\"></span>");
eventIconMap.put("Workshop", "<span class=\"icon icon-calendar-workshop\"></span>");
}
return eventIconMap;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,15 @@ public class EventTypes {
eventTypes.add("Computer Session");
eventTypes.add("Deadline");
eventTypes.add("Exam");
eventTypes.add("Formative Assessment");
eventTypes.add("Meeting");
eventTypes.add("Multidisciplinary Conference");
eventTypes.add("Quiz");
eventTypes.add("Special event");
eventTypes.add("Submission Date");
eventTypes.add("Tutorial");
eventTypes.add("Web Assignment");
eventTypes.add("Workshop");
}

private static Map<String, String> eventTypesToLocalized = new HashMap<String, String>();
Expand Down Expand Up @@ -101,11 +105,15 @@ public static void reloadLocalization() {
eventTypesToLocalized.put("Computer Session", msgs.getString("legend.key9"));
eventTypesToLocalized.put("Deadline", msgs.getString("legend.key10"));
eventTypesToLocalized.put("Exam", msgs.getString("legend.key11"));
eventTypesToLocalized.put("Formative Assessment", msgs.getString("legend.key17"));
eventTypesToLocalized.put("Meeting", msgs.getString("legend.key12"));
eventTypesToLocalized.put("Multidisciplinary Conference", msgs.getString("legend.key13"));
eventTypesToLocalized.put("Quiz", msgs.getString("legend.key14"));
eventTypesToLocalized.put("Special event", msgs.getString("legend.key15"));
eventTypesToLocalized.put("Submission Date", msgs.getString("legend.key18"));
eventTypesToLocalized.put("Tutorial", msgs.getString("legend.key19"));
eventTypesToLocalized.put("Web Assignment", msgs.getString("legend.key16"));
eventTypesToLocalized.put("Workshop", msgs.getString("legend.key20"));
}

}
76 changes: 44 additions & 32 deletions calendar/calendar-tool/tool/src/webapp/vm/calendar/chef_calendar.vm
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,26 @@ calendar Portlet
#macro (eventLegend $tlang)
<h4>$tlang.getString('view.legend')</h4>
<ul class="calendarLegend">
<li><i class="icon icon-calendar-academic-calendar"></i> $tlang.getString('legend.key1')</li>
<li><i class="icon icon-calendar-activity"></i> $tlang.getString('legend.key2')</li>
<li><i class="icon icon-calendar-cancellation"></i> $tlang.getString('legend.key3')</li>
<li><i class="icon icon-calendar-class-section-discussion"></i> $tlang.getString('legend.key4')</li>
<li><i class="icon icon-calendar-class-section-lab"></i> $tlang.getString('legend.key5')</li>
<li><i class="icon icon-calendar-class-section-lecture"></i> $tlang.getString('legend.key6')</li>
<li><i class="icon icon-calendar-class-section-small-group"></i> $tlang.getString('legend.key7')</li>
<li><i class="icon icon-calendar-class-session"></i> $tlang.getString('legend.key8')</li>
<li><i class="icon icon-calendar-computer-session"></i> $tlang.getString('legend.key9')</li>
<li><i class="icon icon-calendar-deadline"></i> $tlang.getString('legend.key10')</li>
<li><i class="icon icon-calendar-exam"></i> $tlang.getString('legend.key11')</li>
<li><i class="icon icon-calendar-meeting"></i> $tlang.getString('legend.key12')</li>
<li><i class="icon icon-calendar-multidisciplinary-conference"></i> $tlang.getString('legend.key13')</li>
<li><i class="icon icon-calendar-quiz"></i> $tlang.getString('legend.key14')</li>
<li><i class="icon icon-calendar-special-event"></i> $tlang.getString('legend.key15')</li>
<li><i class="icon icon-calendar-web-assignment"></i> $tlang.getString('legend.key16')</li>
<li><span class="icon icon-calendar-academic-calendar"></span> $tlang.getString('legend.key1')</li>
<li><span class="icon icon-calendar-activity"></span> $tlang.getString('legend.key2')</li>
<li><span class="icon icon-calendar-cancellation"></span> $tlang.getString('legend.key3')</li>
<li><span class="icon icon-calendar-class-section-discussion"></span> $tlang.getString('legend.key4')</li>
<li><span class="icon icon-calendar-class-section-lab"></span> $tlang.getString('legend.key5')</li>
<li><span class="icon icon-calendar-class-section-lecture"></span> $tlang.getString('legend.key6')</li>
<li><span class="icon icon-calendar-class-section-small-group"></span> $tlang.getString('legend.key7')</li>
<li><span class="icon icon-calendar-class-session"></span> $tlang.getString('legend.key8')</li>
<li><span class="icon icon-calendar-computer-session"></span> $tlang.getString('legend.key9')</li>
<li><span class="icon icon-calendar-deadline"></span> $tlang.getString('legend.key10')</li>
<li><span class="icon icon-calendar-exam"></span> $tlang.getString('legend.key11')</li>
<li><span class="icon icon-calendar-formative-assessment"></span> $tlang.getString('legend.key17')</li>
<li><span class="icon icon-calendar-meeting"></span> $tlang.getString('legend.key12')</li>
<li><span class="icon icon-calendar-multidisciplinary-conference"></span> $tlang.getString('legend.key13')</li>
<li><span class="icon icon-calendar-quiz"></span> $tlang.getString('legend.key14')</li>
<li><span class="icon icon-calendar-special-event"></span> $tlang.getString('legend.key15')</li>
<li><span class="icon icon-calendar-submission-date"></span> $tlang.getString('legend.key18')</li>
<li><span class="icon icon-calendar-tutorial"></span> $tlang.getString('legend.key19')</li>
<li><span class="icon icon-calendar-web-assignment"></span> $tlang.getString('legend.key16')</li>
<li><span class="icon icon-calendar-workshop"></span> $tlang.getString('legend.key20')</li>
</ul>
<div class="clear"></div>
#end
Expand All @@ -36,37 +40,45 @@ calendar Portlet

#macro (iconImage $eventType)
#if ($eventType=="Academic Calendar")
<i class="icon icon-calendar-academic-calendar" title="$tlang.getString('legend.key1')" ></i>
<span class="icon icon-calendar-academic-calendar" title="$tlang.getString('legend.key1')" ></span>
#elseif ($eventType =="Activity")
<i class="icon icon-calendar-activity" title="$tlang.getString('legend.key2')" ></i>
<span class="icon icon-calendar-activity" title="$tlang.getString('legend.key2')" ></span>
#elseif ($eventType =="Cancellation")
<i class="icon icon-calendar-cancellation" title="$tlang.getString('legend.key3')" ></i>
<span class="icon icon-calendar-cancellation" title="$tlang.getString('legend.key3')" ></span>
#elseif ($eventType =="Class section - Discussion")
<i class="icon icon-calendar-class-section-discussion" title="$tlang.getString('legend.key4')" ></i>
<span class="icon icon-calendar-class-section-discussion" title="$tlang.getString('legend.key4')" ></span>
#elseif ($eventType =="Class section - Lab")
<i class="icon icon-calendar-class-section-lab" title="$tlang.getString('legend.key5')" ></i>
<span class="icon icon-calendar-class-section-lab" title="$tlang.getString('legend.key5')" ></span>
#elseif ($eventType =="Class section - Lecture")
<i class="icon icon-calendar-class-section-lecture" title="$tlang.getString('legend.key6')" ></i>
<span class="icon icon-calendar-class-section-lecture" title="$tlang.getString('legend.key6')" ></span>
#elseif ($eventType =="Class section - Small Group")
<i class="icon icon-calendar-class-section-small-group" title="$tlang.getString('legend.key7')" ></i>
<span class="icon icon-calendar-class-section-small-group" title="$tlang.getString('legend.key7')" ></span>
#elseif ($eventType =="Class session")
<i class="icon icon-calendar-class-session" title="$tlang.getString('legend.key8')" ></i>
<span class="icon icon-calendar-class-session" title="$tlang.getString('legend.key8')" ></span>
#elseif ($eventType =="Computer Session")
<i class="icon icon-calendar-computer-session" title="$tlang.getString('legend.key9')" ></i>
<span class="icon icon-calendar-computer-session" title="$tlang.getString('legend.key9')" ></span>
#elseif ($eventType =="Deadline")
<i class="icon icon-calendar-deadline" title="$tlang.getString('legend.key10')" ></i>
<span class="icon icon-calendar-deadline" title="$tlang.getString('legend.key10')" ></span>
#elseif ($eventType =="Exam")
<i class="icon icon-calendar-exam" title="$tlang.getString('legend.key11')" ></i>
<span class="icon icon-calendar-exam" title="$tlang.getString('legend.key11')" ></span>
#elseif ($eventType =="Formative Assessment")
<span class="icon icon-calendar-formative-assessment" title="$tlang.getString('legend.key17')" ></span>
#elseif ($eventType =="Meeting")
<i class="icon icon-calendar-meeting" title="$tlang.getString('legend.key12')" ></i>
<span class="icon icon-calendar-meeting" title="$tlang.getString('legend.key12')" ></span>
#elseif ($eventType =="Multidisciplinary Conference")
<i class="icon icon-calendar-multidisciplinary-conference" title="$tlang.getString('legend.key13')" ></i>
<span class="icon icon-calendar-multidisciplinary-conference" title="$tlang.getString('legend.key13')" ></span>
#elseif ($eventType =="Quiz")
<i class="icon icon-calendar-quiz" title="$tlang.getString('legend.key14')" ></i>
<span class="icon icon-calendar-quiz" title="$tlang.getString('legend.key14')" ></span>
#elseif ($eventType =="Special event")
<i class="icon icon-calendar-special-event" title="$tlang.getString('legend.key15')" ></i>
<span class="icon icon-calendar-special-event" title="$tlang.getString('legend.key15')" ></span>
#elseif ($eventType =="Submission Date")
<span class="icon icon-calendar-submission-date" title="$tlang.getString('legend.key18')" ></span>
#elseif ($eventType =="Tutorial")
<span class="icon icon-calendar-tutorial" title="$tlang.getString('legend.key19')" ></span>
#elseif ($eventType =="Web Assignment")
<i class="icon icon-calendar-web-assignment" title="$tlang.getString('legend.key16')" ></i>
<span class="icon icon-calendar-web-assignment" title="$tlang.getString('legend.key16')" ></span>
#elseif ($eventType =="Workshop")
<span class="icon icon-calendar-workshop" title="$tlang.getString('legend.key20')" ></span>
#end
#end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,12 @@ $(function() {
<option value="Exam">$tlang.getString("legend.key11")</option>
#end

#if ($type =="Formative Assessment")
<option selected="selected" value="Formative Assessment">$tlang.getString("legend.key17")</option>
#else
<option value="Formative Assessment">$tlang.getString("legend.key17")</option>
#end

#if ($type=="Meeting")
<option selected="selected" value="Meeting">$tlang.getString("legend.key12")</option>
#else
Expand All @@ -806,10 +812,28 @@ $(function() {
<option value="Special event">$tlang.getString("legend.key15")</option>
#end

#if ($type =="Web Assignment")
<option selected="selected" value="Web Assignment">$tlang.getString("legend.key16")</option>
#else
<option value="Web Assignment">$tlang.getString("legend.key16")</option>
#if ($type =="Submission Date")
<option selected="selected" value="Submission Date">$tlang.getString("legend.key18")</option>
#else
<option value="Submission Date">$tlang.getString("legend.key18")</option>
#end

#if ($type =="Tutorial")
<option selected="selected" value="Tutorial">$tlang.getString("legend.key19")</option>
#else
<option value="Tutorial">$tlang.getString("legend.key19")</option>
#end

#if ($type =="Web Assignment")
<option selected="selected" value="Web Assignment">$tlang.getString("legend.key16")</option>
#else
<option value="Web Assignment">$tlang.getString("legend.key16")</option>
#end

#if ($type =="Workshop")
<option selected="selected" value="Workshop">$tlang.getString("legend.key20")</option>
#else
<option value="Workshop">$tlang.getString("legend.key20")</option>
#end
</select>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,12 @@ $(function() {
<option value="Exam">$tlang.getString("legend.key11")</option>
#end

#if ($type =="Formative Assessment")
<option selected="selected" value="Formative Assessment">$tlang.getString("legend.key17")</option>
#else
<option value="Formative Assessment">$tlang.getString("legend.key17")</option>
#end

#if ($type=="Meeting")
<option selected="selected" value="Meeting">$tlang.getString("legend.key12")</option>
#else
Expand All @@ -825,18 +831,36 @@ $(function() {
#else
<option value="Quiz">$tlang.getString("legend.key14")</option>
#end

#if ($type =="Special event")
<option selected="selected" value="Special event">$tlang.getString("legend.key15")</option>
#else
<option value="Special event">$tlang.getString("legend.key15")</option>
#end

#if ($type =="Special event")
<option selected="selected" value="Special event">$tlang.getString("legend.key15")</option>
#if ($type =="Submission Date")
<option selected="selected" value="Submission Date">$tlang.getString("legend.key18")</option>
#else
<option value="Special event">$tlang.getString("legend.key15")</option>
<option value="Submission Date">$tlang.getString("legend.key18")</option>
#end

#if ($type =="Tutorial")
<option selected="selected" value="Tutorial">$tlang.getString("legend.key19")</option>
#else
<option value="Tutorial">$tlang.getString("legend.key19")</option>
#end

#if ($type =="Web Assignment")
<option selected="selected" value="Web Assignment">$tlang.getString("legend.key16")</option>
#else
<option value="Web Assignment">$tlang.getString("legend.key16")</option>
#end

#if ($type =="Workshop")
<option selected="selected" value="Workshop">$tlang.getString("legend.key20")</option>
#else
<option value="Workshop">$tlang.getString("legend.key20")</option>
#end
</select>
</p>
<p class="shorttext">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,15 @@
#if ($event.getType()=="Computer Session") $tlang.getString("legend.key9") #end
#if ($event.getType()=="Deadline") $tlang.getString("legend.key10") #end
#if ($event.getType()=="Exam") $tlang.getString("legend.key11") #end
#if ($event.getType()=="Formative Assessment") $tlang.getString("legend.key17") #end
#if ($event.getType()=="Meeting")$tlang.getString("legend.key12") #end
#if ($event.getType()=="Multidisciplinary Conference") $tlang.getString("legend.key13") #end
#if ($event.getType()=="Quiz") $tlang.getString("legend.key14") #end
#if ($event.getType()=="Special event") $tlang.getString("legend.key15") #end
#if ($event.getType()=="Submission Date") $tlang.getString("legend.key18") #end
#if ($event.getType()=="Tutorial") $tlang.getString("legend.key19") #end
#if ($event.getType()=="Web Assignment") $tlang.getString("legend.key16") #end
#if ($event.getType()=="Workshop") $tlang.getString("legend.key20") #end
</td>
</tr>
#if($owner_name && $owner_name !="")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,5 +302,9 @@
&.icon-calendar-quiz { @extend .fa-star}
&.icon-calendar-special-event { @extend .fa-certificate}
&.icon-calendar-web-assignment { @extend .fa-code}
&.icon-calendar-formative-assessment { @extend .fa-pencil-square-o}
&.icon-calendar-submission-date { @extend .fa-hourglass-end}
&.icon-calendar-tutorial { @extend .fa-graduation-cap}
&.icon-calendar-workshop { @extend .fa-group}
}
}
4 changes: 4 additions & 0 deletions reference/library/src/webapp/schedule/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ event.lecture="Class section - Lecture"
event.class="Class session"
event.computer="Computer Session"
event.deadline="Deadline"
event.formative="Formative Assessment"
event.conference="Multidisciplinary Conference"
event.quiz="Quiz"
event.special="Special event"
event.submission="Submission Date"
event.tutorial="Tutorial"
event.assignment="Web Assignment"
event.workshop="Workshop"

Location: This can be anything that you like. You could put building/room numbers,
city, state, or anything that you wish to show up as the location of the event. If
Expand Down

0 comments on commit 2917bf0

Please sign in to comment.