Minor - fix lang vars, add actions bar

pull/3418/head
Julio Montoya 5 years ago
parent e936e64c88
commit 853424b185
  1. 2
      plugin/zoom/admin.php
  2. 10
      plugin/zoom/join_meeting.php
  3. 5
      plugin/zoom/lang/english.php
  4. 3
      plugin/zoom/lib/MeetingEntityRepository.php
  5. 23
      plugin/zoom/lib/zoom_plugin.class.php
  6. 1
      plugin/zoom/user.php
  7. 52
      plugin/zoom/view/meeting.tpl

@ -18,10 +18,12 @@ $startDate = new DateTime($form->getSubmitValue('start'));
$endDate = new DateTime($form->getSubmitValue('end')); $endDate = new DateTime($form->getSubmitValue('end'));
$tpl = new Template($tool_name); $tpl = new Template($tool_name);
$tpl->assign('meetings', $plugin->getMeetingRepository()->periodMeetings($startDate, $endDate)); $tpl->assign('meetings', $plugin->getMeetingRepository()->periodMeetings($startDate, $endDate));
if ('true' === $plugin->get('enableCloudRecording')) { if ('true' === $plugin->get('enableCloudRecording')) {
$tpl->assign('recordings', $plugin->getRecordingRepository()->getPeriodRecordings($startDate, $endDate)); $tpl->assign('recordings', $plugin->getRecordingRepository()->getPeriodRecordings($startDate, $endDate));
} }
$tpl->assign('actions', $plugin->getToolbar());
$tpl->assign('search_form', $form->returnForm()); $tpl->assign('search_form', $form->returnForm());
$tpl->assign('content', $tpl->fetch('zoom/view/admin.tpl')); $tpl->assign('content', $tpl->fetch('zoom/view/admin.tpl'));
$tpl->display_one_col_template(); $tpl->display_one_col_template();

@ -21,7 +21,7 @@ if (array_key_exists('meetingId', $_REQUEST)) {
$meeting = $plugin->getMeetingRepository()->find($_REQUEST['meetingId']); $meeting = $plugin->getMeetingRepository()->find($_REQUEST['meetingId']);
try { try {
if (is_null($meeting)) { if (is_null($meeting)) {
throw new Exception('Meeting not found'); throw new Exception($plugin->get_lang('Meeting not found'));
} }
$startJoinURL = $plugin->getStartOrJoinMeetingURL($meeting); $startJoinURL = $plugin->getStartOrJoinMeetingURL($meeting);
@ -31,6 +31,14 @@ if (array_key_exists('meetingId', $_REQUEST)) {
} else { } else {
echo Display::return_message($plugin->get_lang('ConferenceNotStarted'), 'warning'); echo Display::return_message($plugin->get_lang('ConferenceNotStarted'), 'warning');
} }
if ($plugin->userIsConferenceManager($meeting)) {
echo ' '.Display::url(
get_lang('Details'),
api_get_path(WEB_PLUGIN_PATH).'zoom/meeting_from_admin.php?meetingId='.$meeting->getId(),
['class' => 'btn btn-default']
);
}
} catch (Exception $exception) { } catch (Exception $exception) {
Display::addFlash( Display::addFlash(
Display::return_message($exception->getMessage(), 'error') Display::return_message($exception->getMessage(), 'error')

@ -70,7 +70,7 @@ $strings['CouldNotCopyJoinURL'] = "Could not copy join URL";
$strings['Course'] = "Cours"; $strings['Course'] = "Cours";
$strings['CreatedAt'] = "Created at"; $strings['CreatedAt'] = "Created at";
$strings['CreateLinkInCourse'] = "Create link(s) in course"; $strings['CreateLinkInCourse'] = "Create link(s) in course";
$strings['CreateUserVideoConference'] = "Create user conferences"; $strings['CreateUserVideoConference'] = "Create user conference";
$strings['DateMeetingTitle'] = "%s: %s"; $strings['DateMeetingTitle'] = "%s: %s";
$strings['DeleteMeeting'] = "Delete meeting"; $strings['DeleteMeeting'] = "Delete meeting";
$strings['DeleteFile'] = "Delete file(s)"; $strings['DeleteFile'] = "Delete file(s)";
@ -86,7 +86,8 @@ $strings['Files'] = "Files";
$strings['Finished'] = "finished"; $strings['Finished'] = "finished";
$strings['FileWasCopiedToCourse'] = "The file was copied to the course"; $strings['FileWasCopiedToCourse'] = "The file was copied to the course";
$strings['FileWasDeleted'] = "The file was deleted"; $strings['FileWasDeleted'] = "The file was deleted";
$strings['GlobalMeeting'] = "Global meeting"; $strings['GlobalMeeting'] = "Global conference";
$strings['GlobalMeetingPerUser'] = "Global conference per user";
$strings['GroupUsersWereRegistered'] = "Group members were registered"; $strings['GroupUsersWereRegistered'] = "Group members were registered";
$strings['InstantMeeting'] = "Instant meeting"; $strings['InstantMeeting'] = "Instant meeting";
$strings['Join'] = "Join"; $strings['Join'] = "Join";

@ -28,7 +28,8 @@ class MeetingEntityRepository extends EntityRepository
public function periodMeetings($startDate, $endDate) public function periodMeetings($startDate, $endDate)
{ {
$matching = []; $matching = [];
foreach ($this->findAll() as $candidate) { $all = $this->findAll();
foreach ($all as $candidate) {
if ($candidate->startDateTime >= $startDate if ($candidate->startDateTime >= $startDate
&& $candidate->startDateTime <= $endDate && $candidate->startDateTime <= $endDate
) { ) {

@ -915,7 +915,28 @@ class ZoomPlugin extends Plugin
if (!api_is_platform_admin()) { if (!api_is_platform_admin()) {
return ''; return '';
} }
$actionsLeft = '';
$back = ''; $back = '';
if ('true' === api_get_plugin_setting('zoom', 'enableGlobalConference')) {
$actionsLeft .=
Display::url(
Display::return_icon('links.png', $this->get_lang('GlobalMeeting'), null, ICON_SIZE_MEDIUM),
api_get_path(WEB_PLUGIN_PATH).'zoom/admin.php'
)
;
}
if ('true' === api_get_plugin_setting('zoom', 'enableGlobalConferencePerUser')) {
$actionsLeft .=
Display::url(
Display::return_icon('user.png', $this->get_lang('GlobalMeetingPerUser'), null, ICON_SIZE_MEDIUM),
api_get_path(WEB_PLUGIN_PATH).'zoom/user.php'
)
;
}
if (!empty($returnUrl)) { if (!empty($returnUrl)) {
$back = Display::url( $back = Display::url(
Display::return_icon('back.png', get_lang('Back'), null, ICON_SIZE_MEDIUM), Display::return_icon('back.png', get_lang('Back'), null, ICON_SIZE_MEDIUM),
@ -923,7 +944,7 @@ class ZoomPlugin extends Plugin
); );
} }
$actionsLeft = $actionsLeft .=
Display::url( Display::url(
Display::return_icon('settings.png', get_lang('Settings'), null, ICON_SIZE_MEDIUM), Display::return_icon('settings.png', get_lang('Settings'), null, ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'admin/configure_plugin.php?name=zoom' api_get_path(WEB_CODE_PATH).'admin/configure_plugin.php?name=zoom'

@ -21,7 +21,6 @@ $endDate = new DateTime($form->getElement('end')->getValue());
$tpl = new Template(); $tpl = new Template();
$tpl->assign('meetings', $plugin->getMeetingRepository()->periodUserMeetings($startDate, $endDate, $user)); $tpl->assign('meetings', $plugin->getMeetingRepository()->periodUserMeetings($startDate, $endDate, $user));
if ('true' === $plugin->get('enableCloudRecording')) { if ('true' === $plugin->get('enableCloudRecording')) {
$tpl->assign( $tpl->assign(
'recordings', 'recordings',

@ -43,8 +43,8 @@
{{ registerParticipantForm }} {{ registerParticipantForm }}
{{ fileForm }} {{ fileForm }}
{# {% if registrants and meeting.meetingInfoGet.settings.approval_type != 2 %}#} {# {% if registrants and meeting.meetingInfoGet.settings.approval_type != 2 %}#}
{% if registrants %} {% if registrants.count > 0 %}
<script> <script>
function copyJoinURL(event, url) { function copyJoinURL(event, url) {
event.target.textContent = '{{ 'CopyingJoinURL'|get_plugin_lang('ZoomPlugin')|escape }}'; event.target.textContent = '{{ 'CopyingJoinURL'|get_plugin_lang('ZoomPlugin')|escape }}';
@ -57,33 +57,30 @@
); );
} }
</script> </script>
<h3>{{ 'Users' | get_lang }}</h3>
{% if registrants.count > 0 %} <br />
<h4>{{ 'Users' | get_lang }}</h4> <table class="table">
<table class="table"> {% for registrant in registrants %}
{% for registrant in registrants %} <tr>
<tr> <td>
<td> {{ registrant.fullName }}
{{ registrant.fullName }} </td>
</td> <td>
<td> {% if registrant.join_url %}
{% if registrant.join_url %} <a class="btn btn-primary" onclick="copyJoinURL(event, '{{ registrant.join_url }}')">
<a class="btn btn-primary" onclick="copyJoinURL(event, '{{ registrant.join_url }}')"> {{ 'CopyJoinAsURL'|get_plugin_lang('ZoomPlugin') }}
{{ 'CopyJoinAsURL'|get_plugin_lang('ZoomPlugin') }} </a>
</a> {% else %}
{% else %} <a class="btn btn-primary disabled" >
<a class="btn btn-primary disabled" > {{ 'JoinURLNotAvailable'|get_plugin_lang('ZoomPlugin') }}
{{ 'JoinURLNotAvailable'|get_plugin_lang('ZoomPlugin') }} </a>
</a> {% endif %}
{% endif %} </td>
</td> </tr>
</tr> {% endfor %}
{% endfor %} </table>
</table>
{% endif %}
{% endif %} {% endif %}
{% else %} {% else %}
<h2>{{ meeting.meetingInfoGet.topic }}</h2> <h2>{{ meeting.meetingInfoGet.topic }}</h2>
{% if meeting.meetingInfoGet.agenda %} {% if meeting.meetingInfoGet.agenda %}
<blockquote>{{ meeting.meetingInfoGet.agenda| nl2br }}</blockquote> <blockquote>{{ meeting.meetingInfoGet.agenda| nl2br }}</blockquote>
@ -98,5 +95,4 @@
<dd>{{ meeting.formattedDuration }}</dd> <dd>{{ meeting.formattedDuration }}</dd>
</dl> </dl>
{% endif %} {% endif %}
{% endif %} {% endif %}

Loading…
Cancel
Save