MDL-57445 block_myoverview: Add courses view to myoverview block
authorCameron Ball <cameron@moodle.com>
Sun, 1 Jan 2017 17:22:10 +0000 (01:22 +0800)
committerDamyon Wiese <damyon@moodle.com>
Mon, 3 Apr 2017 03:35:37 +0000 (11:35 +0800)
Part of MDL-55611 epic.

blocks/myoverview/amd/build/calendar_events_repository.min.js [new file with mode: 0644]
blocks/myoverview/amd/build/event_list.min.js [new file with mode: 0644]
blocks/myoverview/amd/build/events.min.js [new file with mode: 0644]
blocks/myoverview/amd/build/timeline_view_dates.min.js [new file with mode: 0644]
blocks/myoverview/lang/en/block_myoverview.php
blocks/myoverview/templates/courses-view.mustache [new file with mode: 0644]

diff --git a/blocks/myoverview/amd/build/calendar_events_repository.min.js b/blocks/myoverview/amd/build/calendar_events_repository.min.js
new file mode 100644 (file)
index 0000000..cdc6b45
Binary files /dev/null and b/blocks/myoverview/amd/build/calendar_events_repository.min.js differ
diff --git a/blocks/myoverview/amd/build/event_list.min.js b/blocks/myoverview/amd/build/event_list.min.js
new file mode 100644 (file)
index 0000000..6624d85
Binary files /dev/null and b/blocks/myoverview/amd/build/event_list.min.js differ
diff --git a/blocks/myoverview/amd/build/events.min.js b/blocks/myoverview/amd/build/events.min.js
new file mode 100644 (file)
index 0000000..4c6a92e
Binary files /dev/null and b/blocks/myoverview/amd/build/events.min.js differ
diff --git a/blocks/myoverview/amd/build/timeline_view_dates.min.js b/blocks/myoverview/amd/build/timeline_view_dates.min.js
new file mode 100644 (file)
index 0000000..86fb5e6
Binary files /dev/null and b/blocks/myoverview/amd/build/timeline_view_dates.min.js differ
index a9bba66..50e4d4e 100644 (file)
  * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  */
 
+$string['future'] = 'Future';
+$string['inprogress'] = 'In progress';
 $string['myoverview:addinstance'] = 'Add a new my overview block';
 $string['myoverview:myaddinstance'] = 'Add a new my overview block to Dashboard';
-$string['next7days'] = 'Next 7 days';
 $string['next30days'] = 'Next 30 days';
+$string['next7days'] = 'Next 7 days';
+$string['past'] = 'Past';
 $string['pluginname'] = 'My overview';
 $string['sortbycourses'] = 'Sort by courses';
 $string['sortbydates'] = 'Sort by dates';
diff --git a/blocks/myoverview/templates/courses-view.mustache b/blocks/myoverview/templates/courses-view.mustache
new file mode 100644 (file)
index 0000000..261696e
--- /dev/null
@@ -0,0 +1,38 @@
+{{!
+    This file is part of Moodle - http://moodle.org/
+
+    Moodle is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    Moodle is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
+}}
+{{!
+    @template block_myoverview/courses-view
+
+    This template renders the courses view for the myoverview block.
+}}
+<div id="courses-view-{{uniqid}}" data-region="courses-view">
+    <div class="row text-xs-center">
+        <div class="btn-group m-y-2" role="group">
+            <button type="button" class="btn btn-secondary active" data-action="view-in-progress">
+                {{#str}} inprogress, block_myoverview {{/str}}
+            </button>
+            <button type="button" class="btn btn-secondary" data-action="view-future">
+                {{#str}} future, block_myoverview {{/str}}
+            </button>
+            <button type="button" class="btn btn-secondary" data-action="view-past">
+                {{#str}} past, block_myoverview {{/str}}
+            </button>
+        </div>
+    </div>
+    <div class="row">
+    </div>
+</div>