{{=<% %>=}}
<%!
    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 mod_plenum/mobile_motion_list

    This template will render the Plenary meeting main page motion list

    Variables required for this template:

    Variables optional for this template:

    Example context (json):
    {
        "contextid": 3,
        "motion": [
            {
                "id": 7,
                "type": "open",
                "typename": "open"
            }
        ]
    }
}}
%>
<ion-content>
     <ion-list lines="full">
        <%# motions %>
              <ion-item color="secondary" data-motion="<% motion.id %>" class="plenum_motion_<% motion.type %>">
                  <ion-card expand="block" style="width: 100%;" class="">
                      <ion-card-header>
                          <ion-card-title class="">
                              <% motion.typename%><%# motion.data.name %>: <% motion.data.name %> <%/ motion.data.name %>
                              <ion-button 
                                  color="secondary"
                                  core-site-plugins-call-ws
                                  expand="full"
                                  name="mod_plenum_get_fragment"
                                  [params]="{
                                      fragment: 'motion',
                                      contextid: <% contextid %>,
                                      id: <% motion.id %>
                                  }"
                                  (onSuccess)="Plenum.viewMotion($event, '<%# str %> viewmotion, mod_plenum <%/ str %>')">
                                      fragment: 'motion',
                                      contextid: <% contextid %>,
                                      id: <% motion.id %>
                              {{ 'plugin.mod_plenum.view' | translate }}<i class="fa fa-eye"></i></ion-button>
                          </ion-card-title>
                          <ion-card-subtitle class="">
                              <ion-list>
                                  <ion-item>
                                  </ion-item>
                              </ion-list>
                          </ion-card-subtitle>
                      </ion-card-header>
                  </ion-card>
              </ion-item>
        <%/ motions %>
     </ion-list>
</ion-content>
