Skip to content

Commit

Permalink
add icons conference type - refs BT#14664
Browse files Browse the repository at this point in the history
  • Loading branch information
aragonc committed Jul 30, 2018
1 parent 6509cc5 commit be82d6a
Show file tree
Hide file tree
Showing 11 changed files with 849 additions and 14 deletions.
2 changes: 1 addition & 1 deletion plugin/bbb/admin.php
Expand Up @@ -105,7 +105,7 @@
$tpl->assign('meetings', $meetings);
$tpl->assign('search_form', $form->returnForm());

$content = $tpl->fetch('bbb/admin.tpl');
$content = $tpl->fetch('bbb/view/admin.tpl');

if ($meetings) {
$actions = Display::toolbarButton(
Expand Down
26 changes: 14 additions & 12 deletions plugin/bbb/lib/bbb_plugin.class.php
Expand Up @@ -270,28 +270,30 @@ public function getUrlInterfaceLinks($conferenceUrl)
/**
* @param string $conferenceUrl
*
* @return string
* @return array
*/
public function getFlashUrl($conferenceUrl)
{
return Display::url(
$this->get_lang('EnterConferenceFlash'),
$conferenceUrl.'&interface='.self::INTERFACE_FLASH,
['target' => '_blank', 'class' => 'btn btn-primary btn-large']
);
$data = [
'text' => $this->get_lang('EnterConferenceFlash'),
'url' => $conferenceUrl . '&interface=' . self::INTERFACE_FLASH,
'icon' => 'resources/img/64/videoconference_flash.png'
];
return $data;
}

/**
* @param string $conferenceUrl
*
* @return string
* @return array
*/
public function getHtmlUrl($conferenceUrl)
{
return Display::url(
$this->get_lang('EnterConferenceHTML5'),
$conferenceUrl.'&interface='.self::INTERFACE_HTML5,
['target' => '_blank', 'class' => 'btn btn-primary btn-large']
);
$data = [
'text' => $this->get_lang('EnterConferenceHTML5'),
'url' => $conferenceUrl . '&interface=' . self::INTERFACE_HTML5,
'icon' => 'resources/img/64/videoconference_html5.png'
];
return $data;
}
}
2 changes: 1 addition & 1 deletion plugin/bbb/listing.php
Expand Up @@ -262,7 +262,7 @@
$tpl->assign('warning_inteface_msg', $warningIntefaceMessage);
$tpl->assign('show_client_options', $showClientOptions);

$listing_tpl = 'bbb/listing.tpl';
$listing_tpl = 'bbb/view/listing.tpl';
$content = $tpl->fetch($listing_tpl);
$actionLinks = '';
if (api_is_platform_admin()) {
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
282 changes: 282 additions & 0 deletions plugin/bbb/resources/img/svg/videoconference_flash.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
327 changes: 327 additions & 0 deletions plugin/bbb/resources/img/svg/videoconference_html5.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions plugin/bbb/view/admin.tpl
@@ -0,0 +1,48 @@
{{ search_form }}
<table class="table table-hover table-striped">
<thead>
<tr>
<th>{{ 'CreatedAt'|get_lang }}</th>
<th>{{ 'Status'|get_lang }}</th>
<th>{{ 'Records'|get_plugin_lang('BBBPlugin') }}</th>
<th>{{ 'Course'|get_lang }}</th>
<th>{{ 'Session'|get_lang }}</th>
<th>{{ 'Participants'|get_lang }}</th>
<th>{{ 'Actions'|get_lang }}</th>
</tr>
</thead>
<tbody>
{% for meeting in meetings %}
<tr id="meeting-{{ meeting.id }}">
{% if meeting.visibility == 0 %}
<td class="muted">{{ meeting.created_at }}</td>
{% else %}
<td>{{ meeting.created_at }}</td>
{% endif %}
<td>
{% if meeting.status == 1 %}
<span class="label label-success">{{ 'MeetingOpened'|get_plugin_lang('BBBPlugin') }}</span>
{% else %}
<span class="label label-info">{{ 'MeetingClosed'|get_plugin_lang('BBBPlugin') }}</span>
{% endif %}
</td>
<td>
{% if meeting.record == 1 %}
{# Record list #}
{{ meeting.show_links }}
{% else %}
{{ 'NoRecording'|get_plugin_lang('BBBPlugin') }}
{% endif %}
</td>
<td>{{ meeting.course ?: '-' }}</td>
<td>{{ meeting.session ?: '-' }}</td>
<td>
{{ meeting.participants ? meeting.participants|join('<br>') : '-' }}
</td>
<td>
{{ meeting.action_links }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
176 changes: 176 additions & 0 deletions plugin/bbb/view/listing.tpl
@@ -0,0 +1,176 @@
<style type="text/css">
.conference .url{
padding: 5px;
margin-bottom: 5px;
}
.conference .share{
padding: 10px;
margin-top: 5px;
margin-bottom: 5px;
font-weight: bold;
}
</style>
<div class ="row">
{% if bbb_status == true %}
<div class ="col-md-12" style="text-align:center">
{{ form }}
{% if show_join_button == true %}
{% if show_client_options %}
<div class="row">
<div class="col-md-6">
<div class="panel panel-default conference">
<div class="panel-body">
<div class="url">
<a class="btn btn-default" href="{{ enter_conference_links.0.url }}">
<img src="{{ enter_conference_links.0.icon }}" /><br>
{{ enter_conference_links.0.text }}
</a>
</div>
<div class="share">
{{ 'UrlMeetingToShare'| get_plugin_lang('BBBPlugin') }}
</div>
<div class="form-inline">
<div class="form-group">
<input id="share_button_flash" type="text"
style="width:300px"
class="form-control" readonly value="{{ conference_url }}&inteface=0">
<button onclick="copyTextToClipBoard('share_button_flash');" class="btn btn-default">
<span class="fa fa-copy"></span> {{ 'CopyTextToClipboard' | get_lang }}
</button>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="panel panel-default conference">
<div class="panel-body">
<div class="url">
<a class="btn btn-default" href="{{ enter_conference_links.1.url }}">
<img src="{{ enter_conference_links.1.icon }}" /><br>
{{ enter_conference_links.1.text }}
</a>
</div>
<div class="share">
{{ 'UrlMeetingToShare'| get_plugin_lang('BBBPlugin') }}
</div>
<div class="form-inline">
<div class="form-group">
<input id="share_button_html" type="text"
style="width:300px"
class="form-control" readonly value="{{ conference_url }}&inteface=1">
<button onclick="copyTextToClipBoard('share_button_html');" class="btn btn-default">
<span class="fa fa-copy"></span> {{ 'CopyTextToClipboard' | get_lang }}
</button>
</div>
</div>
</div>
</div>
</div>
</div>
{% else %}
{{ enter_conference_links.0 }}
<br />
<strong>{{ 'UrlMeetingToShare'| get_plugin_lang('BBBPlugin') }}</strong>
<div class="well">
<div class="form-inline">
<div class="form-group">
<input id="share_button"
type="text"
style="width:600px"
class="form-control" readonly value="{{ conference_url }}">
<button onclick="copyTextToClipBoard('share_button');" class="btn btn-default">
<span class="fa fa-copy"></span> {{ 'CopyTextToClipboard' | get_lang }}
</button>
</div>
</div>
</div>
{% endif %}
<p>
<span id="users_online" class="label label-warning">
{{ 'XUsersOnLine'| get_plugin_lang('BBBPlugin') | format(users_online) }}
</span>
</p>
{{ warning_inteface_msg }}
{% if max_users_limit > 0 %}
{% if conference_manager == true %}
<p>{{ 'MaxXUsersWarning' | get_plugin_lang('BBBPlugin') | format(max_users_limit) }}</p>
{% elseif users_online >= max_users_limit/2 %}
<p>{{ 'MaxXUsersWarning' | get_plugin_lang('BBBPlugin') | format(max_users_limit) }}</p>
{% endif %}
{% endif %}
</div>
{% elseif max_users_limit > 0 %}
{% if conference_manager == true %}
<p>{{ 'MaxXUsersReachedManager' | get_plugin_lang('BBBPlugin') | format(max_users_limit) }}</p>
{% elseif users_online > 0 %}
<p>{{ 'MaxXUsersReached' | get_plugin_lang('BBBPlugin') | format(max_users_limit) }}</p>
{% endif %}
{% endif %}
</div>
<div class ="col-md-12">
<div class="page-header">
<h2>{{ 'RecordList'| get_plugin_lang('BBBPlugin') }}</h2>
</div>
<table class="table">
<tr>
<!-- th>#</th -->
<th>{{ 'CreatedAt'| get_plugin_lang('BBBPlugin') }}</th>
<th>{{ 'Status'| get_lang }}</th>
<th>{{ 'Records'| get_plugin_lang('BBBPlugin') }}</th>
{% if allow_to_edit %}
<th>{{ 'Actions'| get_lang }}</th>
{% endif %}
</tr>
{% for meeting in meetings %}
<tr>
<!-- td>{{ meeting.id }}</td -->
{% if meeting.visibility == 0 %}
<td class="muted">{{ meeting.created_at }}</td>
{% else %}
<td>{{ meeting.created_at }}</td>
{% endif %}
<td>
{% if meeting.status == 1 %}
<span class="label label-success">{{ 'MeetingOpened'|get_plugin_lang('BBBPlugin') }}</span>
{% else %}
<span class="label label-info">{{ 'MeetingClosed'|get_plugin_lang('BBBPlugin') }}</span>
{% endif %}
</td>
<td>
{% if meeting.record == 1 %}
{# Record list #}
{{ meeting.show_links }}
{% else %}
{{ 'NoRecording'|get_plugin_lang('BBBPlugin') }}
{% endif %}
</td>
{% if allow_to_edit %}
<td>
{% if meeting.status == 1 %}
<a class="btn btn-default" href="{{ meeting.end_url }} ">
{{ 'CloseMeeting'|get_plugin_lang('BBBPlugin') }}
</a>
{% else %}
{{ meeting.action_links }}
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</table>
</div>
{% else %}
<div class ="col-md-12" style="text-align:center">
{{ 'ServerIsNotRunning' | get_plugin_lang('BBBPlugin') | return_message('warning') }}
</div>
{% endif %}
</div>

0 comments on commit be82d6a

Please sign in to comment.