Adding my files as a new external tool.

1.10.x
Julio Montoya 11 years ago
parent f7ebe36332
commit a693ea141d
  1. 3
      main/template/default/index/profile_block.tpl
  2. 13
      main/template/default/index/profile_social_block.tpl
  3. 4
      main/template/default/javascript/editor/ckeditor/elfinder.tpl
  4. 0
      main/template/default/javascript/editor/tinymce/templates.tpl
  5. 5
      main/template/default/user/files.tpl
  6. 2
      src/ChamiloLMS/Component/Editor/CkEditor/CkEditor.php
  7. 2
      src/ChamiloLMS/Component/Editor/Editor.php
  8. 2
      src/ChamiloLMS/Component/Editor/TinyMce/TinyMce.php
  9. 2
      src/ChamiloLMS/Controller/EditorController.php
  10. 2
      src/ChamiloLMS/Controller/User/ProfileController.php

@ -6,5 +6,8 @@
<li><a href="{{ _p.web }}main/messages/inbox.php">{{ 'Inbox' | get_lang}} {{ _u.messages_count }}</a></li> <li><a href="{{ _p.web }}main/messages/inbox.php">{{ 'Inbox' | get_lang}} {{ _u.messages_count }}</a></li>
<li><a href="{{ _p.web }}main/messages/new_message.php">{{ 'Compose' | get_lang }}</a></li> <li><a href="{{ _p.web }}main/messages/new_message.php">{{ 'Compose' | get_lang }}</a></li>
<li><a href="{{ _p.web }}main/auth/profile.php">{{ 'EditProfile' | get_lang }}</a></li> <li><a href="{{ _p.web }}main/auth/profile.php">{{ 'EditProfile' | get_lang }}</a></li>
{% if ('allow_personal_user_files' | get_setting) == 'true' %}
<li><a href="{{ url('profile.controller:fileAction', {'username' : _u.username}) }}">{{ 'MyFiles' | trans }}</a></li>
{% endif %}
</ul> </ul>
{% endblock %} {% endblock %}

@ -3,9 +3,14 @@
{% block block_menu_item %} {% block block_menu_item %}
<h4>{{ block_menu.title }}</h4> <h4>{{ block_menu.title }}</h4>
<ul class="nav nav-list"> <ul class="nav nav-list">
<li><a href="{{ _p.web}}main/messages/inbox.php?f=social">{{ 'Inbox' | get_lang}} {{ _u.messages_count}}</a></li> <li><a href="{{ _p.web }}main/messages/inbox.php?f=social">{{ 'Inbox' | trans }} {{ _u.messages_count}}</a></li>
<li><a href="{{ _p.web}}main/messages/new_message.php?f=social"> {{ 'Compose' | get_lang}}</a></li> <li><a href="{{ _p.web }}main/messages/new_message.php?f=social"> {{ 'Compose' | trans }}</a></li>
<li><a href="{{ _p.web}}main/social/invitations.php"> {{ 'PendingInvitations' | get_lang }} {{ _u.messages_invitations_count}}</a></li> <li><a href="{{ _p.web }}main/social/invitations.php"> {{ 'PendingInvitations' | trans }} {{ _u.messages_invitations_count}}</a></li>
<li><a href="{{ _p.web }}main/auth/profile.php">{{ 'EditProfile' | get_lang }}</a></li> <li><a href="{{ _p.web }}main/auth/profile.php">{{ 'EditProfile' | trans }}</a></li>
{% if ('allow_personal_user_files' | get_setting) == 'true' %}
<li><a href="{{ url('profile.controller:fileAction', {'username' : _u.username}) }}">{{ 'MyFiles' | trans }}</a></li>
{% endif %}
</ul> </ul>
{% endblock %} {% endblock %}

@ -14,8 +14,8 @@
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
// Helper function to get parameters from the query string. // Helper function to get parameters from the query string.
function getUrlParam(paramName) { function getUrlParam(paramName) {
var reParam = new RegExp('(?:[\?&]|&amp;)' + paramName + '=([^&]+)', 'i') ; var reParam = new RegExp('(?:[\?&]|&amp;)' + paramName + '=([^&]+)', 'i');
var match = window.location.search.match(reParam) ; var match = window.location.search.match(reParam);
return (match && match.length > 1) ? match[1] : ''; return (match && match.length > 1) ? match[1] : '';
} }

@ -5,13 +5,12 @@
<img src="{{ user.avatar }}"/> <img src="{{ user.avatar }}"/>
</div> </div>
<div class="well sidebar-nav">
</div>
{% endblock %} {% endblock %}
{% block right_column %} {% block right_column %}
<div class="well_border"> <div class="well_border">
<h3>{{ 'MyFiles' | trans }}</h3> <h3>{{ 'MyFiles' | trans }}</h3>
</div> </div>
{{ editor }}
{% endblock %} {% endblock %}

@ -16,7 +16,7 @@ class CkEditor extends Editor
/** /**
* @return string * @return string
*/ */
public function getTemplate() public function getEditorTemplate()
{ {
return 'javascript/editor/ckeditor/elfinder.tpl'; return 'javascript/editor/ckeditor/elfinder.tpl';
} }

@ -223,7 +223,7 @@ class Editor
/** /**
* @return null * @return null
*/ */
public function getTemplate() public function getEditorTemplate()
{ {
return null; return null;
} }

@ -23,7 +23,7 @@ class TinyMce extends Editor
/** /**
* @return string * @return string
*/ */
public function getTemplate() public function getEditorTemplate()
{ {
return 'javascript/editor/tinymce/elfinder.tpl'; return 'javascript/editor/tinymce/elfinder.tpl';
} }

@ -24,7 +24,7 @@ class EditorController extends CommonController
*/ */
public function fileManagerAction() public function fileManagerAction()
{ {
$response = $this->getTemplate()->renderTemplate($this->getHtmlEditor()->getTemplate()); $response = $this->getTemplate()->renderTemplate($this->getHtmlEditor()->getEditorTemplate());
return new Response($response, 200, array()); return new Response($response, 200, array());
} }

@ -43,7 +43,9 @@ class ProfileController extends CommonController
$userId = \UserManager::get_user_id_from_username($username); $userId = \UserManager::get_user_id_from_username($username);
$userInfo = api_get_user_info($userId); $userInfo = api_get_user_info($userId);
$editor = $this->getTemplate()->renderTemplate($this->getHtmlEditor()->getEditorTemplate());
$this->getTemplate()->assign('user', $userInfo); $this->getTemplate()->assign('user', $userInfo);
$this->getTemplate()->assign('editor', $editor);
$response = $this->getTemplate()->renderTemplate($this->getTemplatePath().'files.tpl'); $response = $this->getTemplate()->renderTemplate($this->getTemplatePath().'files.tpl');
return new Response($response, 200, array()); return new Response($response, 200, array());
} }

Loading…
Cancel
Save