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. 10
      plugin/zoom/view/meeting.tpl

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

@ -21,7 +21,7 @@ if (array_key_exists('meetingId', $_REQUEST)) {
$meeting = $plugin->getMeetingRepository()->find($_REQUEST['meetingId']);
try {
if (is_null($meeting)) {
throw new Exception('Meeting not found');
throw new Exception($plugin->get_lang('Meeting not found'));
}
$startJoinURL = $plugin->getStartOrJoinMeetingURL($meeting);
@ -31,6 +31,14 @@ if (array_key_exists('meetingId', $_REQUEST)) {
} else {
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) {
Display::addFlash(
Display::return_message($exception->getMessage(), 'error')

@ -70,7 +70,7 @@ $strings['CouldNotCopyJoinURL'] = "Could not copy join URL";
$strings['Course'] = "Cours";
$strings['CreatedAt'] = "Created at";
$strings['CreateLinkInCourse'] = "Create link(s) in course";
$strings['CreateUserVideoConference'] = "Create user conferences";
$strings['CreateUserVideoConference'] = "Create user conference";
$strings['DateMeetingTitle'] = "%s: %s";
$strings['DeleteMeeting'] = "Delete meeting";
$strings['DeleteFile'] = "Delete file(s)";
@ -86,7 +86,8 @@ $strings['Files'] = "Files";
$strings['Finished'] = "finished";
$strings['FileWasCopiedToCourse'] = "The file was copied to the course";
$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['InstantMeeting'] = "Instant meeting";
$strings['Join'] = "Join";

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

@ -915,7 +915,28 @@ class ZoomPlugin extends Plugin
if (!api_is_platform_admin()) {
return '';
}
$actionsLeft = '';
$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)) {
$back = Display::url(
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::return_icon('settings.png', get_lang('Settings'), null, ICON_SIZE_MEDIUM),
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->assign('meetings', $plugin->getMeetingRepository()->periodUserMeetings($startDate, $endDate, $user));
if ('true' === $plugin->get('enableCloudRecording')) {
$tpl->assign(
'recordings',

@ -44,7 +44,7 @@
{{ fileForm }}
{# {% if registrants and meeting.meetingInfoGet.settings.approval_type != 2 %}#}
{% if registrants %}
{% if registrants.count > 0 %}
<script>
function copyJoinURL(event, url) {
event.target.textContent = '{{ 'CopyingJoinURL'|get_plugin_lang('ZoomPlugin')|escape }}';
@ -57,9 +57,8 @@
);
}
</script>
{% if registrants.count > 0 %}
<h4>{{ 'Users' | get_lang }}</h4>
<h3>{{ 'Users' | get_lang }}</h3>
<br />
<table class="table">
{% for registrant in registrants %}
<tr>
@ -81,9 +80,7 @@
{% endfor %}
</table>
{% endif %}
{% endif %}
{% else %}
<h2>{{ meeting.meetingInfoGet.topic }}</h2>
{% if meeting.meetingInfoGet.agenda %}
<blockquote>{{ meeting.meetingInfoGet.agenda| nl2br }}</blockquote>
@ -98,5 +95,4 @@
<dd>{{ meeting.formattedDuration }}</dd>
</dl>
{% endif %}
{% endif %}

Loading…
Cancel
Save