diff --git a/src/components/com_tjcertificate/media/css/tjCertificate.css b/src/components/com_tjcertificate/media/css/tjCertificate.css new file mode 100644 index 00000000..58257b16 --- /dev/null +++ b/src/components/com_tjcertificate/media/css/tjCertificate.css @@ -0,0 +1,144 @@ +.course-info-pin .thumbnail { + width: 200px; + padding: 0; + border-radius: 0; +} +.course-info-pin .thumbnail .tj-certificate-item-title { + font-weight: 600; + height: 42px; + overflow: hidden; + line-height: 20px; + font-size: 15px; + margin: 0; +} +.tj-certificate-sharing ul li { + display: inline-block; + padding: 20px 15px 0px 0; +} +.tj-certificate-blocks { + margin-bottom: 25px; +} +.tj-certificate-blocks h3 { + margin: 0 0 10px 0; + padding: 0; + font-size: 16px; +} +.btn-print { + background: transparent; + border: 0; + color: #337ab7; +} +.btn-print:before { + content: "\f02f"; + font-family: "FontAwesome"; + float: left; +} +.tj-certificate-action-btn .btn { + background-color: transparent !important; + color: #337ab7; + text-transform: uppercase; + font-weight: 600; + border-radius: 0; +} +.tj-certificate-action-btn .btn:hover, +.tj-certificate-action-btn .btn:focus { + background-color: #337ab7 !important; + color: #fff !important; + border: 1px solid #337ab7; + text-decoration: none; +} +.icon-search:before { + content: "\f002"; + font-family: "FontAwesome"; +} +.tj-search-filters .input-append { + display: inline-flex; +} +.br-1 { + border: 1px solid #e3e4e5; +} +.bg-lightblue { + background-color: #d6edf6; +} +.bg-white { + background-color: white; +} +.font-600 { + font-weight: 600; +} +.mt-0 { + margin-top: 0; +} +.py-10 { + padding-top: 10px; + padding-bottom: 10px; +} +.m-10 { + margin: 10px; +} +.m-5 { + margin: 5px; +} +.p-5 { + padding: 5px; +} +.p-15 { + padding: 15px; +} +.p-10 { + padding: 10px; +} +.px-15 { + padding-left: 15px; + padding-right: 15px; +} +.py-25 { + padding-top: 25px; + padding-bottom: 25px; +} +.fs-16 { + font-size: 16px; +} +.br-5 { + border-radius: 5px; +} +.mb-15 { + margin-bottom: 15px; +} +.mr-5 { + margin-right: 5px; +} +.d-block { + display: block; +} +@media screen and (max-width: 600px) { + .course-info-pin .thumbnail { + width: 100%; + border: 0; + } + .course-info-pin .thumbnail .bg-contain { + height: 80px !important; + width: 100px; + float: left; + } + .tj-certificate-item-content { + float: right; + width: 70%; + } + .course-info-pin .thumbnail .tj-certificate-item-title { + height: auto; + } + .tj-certificate-item-content .p-10 { + padding: 0; + } + .course-info-pin hr { + display: none; + } + .tj-certificate-action-btn { + margin: 10px 0 0 0; + } + .tj-certificate-action-btn .btn { + float: left; + width: auto; + } +} \ No newline at end of file diff --git a/src/components/com_tjcertificate/site/languages/en-GB/en-GB.com_tjcertificate.ini b/src/components/com_tjcertificate/site/languages/en-GB/en-GB.com_tjcertificate.ini index 7b8f1575..1a97aed8 100644 --- a/src/components/com_tjcertificate/site/languages/en-GB/en-GB.com_tjcertificate.ini +++ b/src/components/com_tjcertificate/site/languages/en-GB/en-GB.com_tjcertificate.ini @@ -20,6 +20,11 @@ COM_TJCERTIFICATE_TEMPLATE_INVALID_DATE="Invalid expiry date! Enter in Y-m-d H:i COM_TJCERTIFICATE_CERTIFICATE_PRINT="Print" COM_TJCERTIFICATE_CERTIFICATE_DOWNLOAD_PDF="Save as PDF" COM_TJCERTIFICATE_CERTIFICATE_DOWNLOAD_FILE_NAME="Certificate_%s" +COM_TJCERTIFICATE_CERTIFICATE_DOWNLOAD_SHARE="Certificate Download & Share:" +COM_TJCERTIFICATE_CERTIFICATE_CERTIFICATE_RECIPIENT="Certificate Recipient:" +COM_TJCERTIFICATE_CERTIFICATE_ABOUT_THE_COURSE="About the Course:" +COM_TJCERTIFICATE_CERTIFICATE_DOWNLOAD_AS_IMAGE="Download as Image" +COM_TJCERTIFICATE_CERTIFICATE_COMPLETED_BY="Completed by " ;My certificate view COM_TJCERTIFICATE_CERTIFICATE_MY_VIEW_DEFAULT_TITLE="My Certificates" diff --git a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php index 216a933c..5da1358e 100644 --- a/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php +++ b/src/components/com_tjcertificate/site/views/certificate/tmpl/default.php @@ -14,6 +14,13 @@ use Joomla\CMS\Factory; use Joomla\CMS\Router\Route; use Joomla\CMS\Language\Text; +use Joomla\CMS\Uri\Uri; +use Joomla\CMS\HTML\HTMLHelper; + +HTMLHelper::StyleSheet('components/com_tjcertificate/assets/font-awesome-4.1.0/css/font-awesome.min.css'); +HTMLHelper::script('components/com_tjcertificate/assets/html2canvas/js/html2canvas.js'); +HTMLHelper::script('components/com_tjcertificate/assets/tjCertificate.js'); +HTMLHelper::script('components/com_tjcertificate/assets/css/tjCertificate.css'); if ($this->showSearchBox) { @@ -21,8 +28,9 @@
- + @@ -31,71 +39,105 @@ +
+
+ certificate) + {?> +
+ certificate->generated_body; + ?> +
+ + +
+
-// Tjlms course / jt event info HTML -if (!empty($this->contentHtml)) -{ - echo $this->contentHtml; -} +
+
+

+ +

+
+
+

+ certificate->getUserId())->name; ?> +
+
-if ($this->certificate) -{ - if ($this->certificate->getUserId() == Factory::getUser()->id) - { - ?> -
-
- - - - certificate->getDownloadUrl()) - { - ?> - - - -
- - - - - -
+ certificate->getUserId() == Factory::getUser()->id) + { + ?> +
+
+

+ +

-
+
+ + + + + certificate->getDownloadUrl()) + { + ?> + + + + + + + + + + + + +
+ item)) + { + echo $this->loadTemplate('social_sharing'); + } + ?> +
+
+
+
-
-certificate->generated_body; -?> + } + ?> +
+
+

+ +

+
+
+ contentHtml)) + { + echo $this->contentHtml; + } + ?> +
+
+
- - - - diff --git a/src/components/com_tjcertificate/site/views/certificate/tmpl/default_social_sharing.php b/src/components/com_tjcertificate/site/views/certificate/tmpl/default_social_sharing.php new file mode 100644 index 00000000..c758654c --- /dev/null +++ b/src/components/com_tjcertificate/site/views/certificate/tmpl/default_social_sharing.php @@ -0,0 +1,103 @@ + + * @copyright Copyright (C) 2009 - 2020 Techjoomla. All rights reserved. + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL + */ + +// No direct access to this file +defined('_JEXEC') or die('Restricted access'); + +use Joomla\CMS\Factory; +$document = Factory::getDocument(); +?> + +params->get('social_sharing')) +{ + // For facebook and linkedin + $config = Factory::getConfig(); + $siteName = $config->get('sitename'); + $document->addCustomTag(''); + $document->addCustomTag(''); + $document->addCustomTag(''); + $document->addCustomTag(''); + $document->addCustomTag(''); +?> + + + + + +