Browse Source

- Echap some character in the Core.php file

- Continue Material design integration in the Admin panel
pull/16/head
Jaussoin Timothée 11 years ago
parent
commit
2b3837839d
  1. 2
      app/widgets/AdminMain/adminmain.tpl
  2. 1
      app/widgets/AdminTest/admintest.css
  3. 64
      app/widgets/AdminTest/admintest.tpl
  4. 3
      app/widgets/AdminTest/locales.ini
  5. 77
      app/widgets/Api/api.tpl
  6. 29
      app/widgets/Statistics/statistics.tpl
  7. 8
      src/Movim/Daemon/Core.php

2
app/widgets/AdminMain/adminmain.tpl

@ -1,4 +1,4 @@
<div id="admingen" class="tabelem paddedtop" title="{$c->__('admin.general')}">
<div id="admingen" class="tabelem paddedtop" title="{$c->__('admin.general')}">
<form name="admin" id="adminform" action="#" method="post">
<legend><i class="fa fa-wrench"></i> {$c->__('admin.general')}</legend>

1
app/widgets/AdminTest/admintest.css

@ -2,6 +2,7 @@ figure {
width: 100%;
height: 40em;
position: relative;
font-size: 1.5rem;
}
figure div {

64
app/widgets/AdminTest/admintest.tpl

@ -1,5 +1,5 @@
<div id="admincomp" class="tabelem" title="{$c->__('admin.compatibility')}">
<div class="block">
<div>
<figure>
<div id="webserver">
@ -33,37 +33,52 @@
</figure>
</div>
<div class="block">
<p>
<ul>
<li class="subheader">
{$c->__('compatibility.info')}
</p>
</li>
{if="$dbconnected"}
{if="$dbinfos > 0"}
<div class="message warning">
<i class="fa fa-refresh"></i> The database need to be updated, go to the database panel to fix this
</div>
<li>
<span class="icon bubble color orange"><i class="fa fa-refresh"></i></span>
<span>The database need to be updated, go to the database panel to fix this</span>
</li>
{else}
<script type="text/javascript">AdminTest.databaseOK = true</script>
{/if}
{else}
<div class="message error">
<i class="fa fa-database"></i> Database connection error, check if database configuration exist in the <code>config/</code> folder and fill it with proper values
</div>
<li class="condensed">
<span class="icon bubble color red"><i class="fa fa-database"></i></span>
<span>Database connection error</span>
<p>Check if database configuration exist in the <code>config/</code> folder and fill it with proper values</p>
</li>
{/if}
<div id="websocket_error" class="message error">
<i class="fa fa-plug"></i> WebSocket connection error, check if the Movim Daemon is running and is reacheable
</div>
<li id="websocket_error">
<span class="icon bubble color red">
<i class="fa fa-plug"></i>
</span>
<span>
WebSocket connection error, check if the Movim Daemon is running and is reacheable
</span>
</li>
<div id="xmpp_websocket_error" class="message error">
<i class="fa fa-plug"></i> XMPP Websocket connection error, please check the validity of the URL given in the General Configuration. <code>{$websocketurl}</code>
</div>
<li id="xmpp_websocket_error">
<span class="icon bubble color red">
<i class="fa fa-plug"></i>
</span>
<span>
XMPP Websocket connection error, please check the validity of the URL given in the General Configuration. <code>{$websocketurl}</code>
</span>
</li>
{if="!$c->version()"}
<div class="message error">
<i class="fa fa-code"></i> {$c->__('compatibility.php', PHP_VERSION)}
</div>
<li class="condensed">
<span class="icon color bubble red"><i class="fa fa-code"></i> </span>
<span>{$c->__('compatibility.php1', PHP_VERSION)}</span>
<p>{$c->__('compatibility.php2')}</p>
</li>
<script type="text/javascript">AdminTest.disableMovim()</script>
{/if}
@ -82,10 +97,13 @@
{/if}
{if="!$_SERVER['HTTP_MOD_REWRITE']"}
<div class="message info">
<i class="fa fa-pencil"></i> {$c->__('compatibility.rewrite')}
</div>
<li>
<span class="icon bubble color orange">
<i class="fa fa-pencil"></i>
</span>
<span>{$c->__('compatibility.rewrite')}</span>
</li>
{/if}
</div>
</ul>
<script type="text/javascript">AdminTest.testXMPPWebsocket('{$websocketurl}');</script>
</div>

3
app/widgets/AdminTest/locales.ini

@ -2,7 +2,8 @@ admin.compatibility = 'General Overview'
[compatibility]
compatibility.info = 'Movim has found some issues or things that need to be fixed or improved'
compatibility.php = 'Update your PHP-Version: %s <br>Required: 5.3.0'
compatibility.php1 = 'Update your PHP-Version: %s'
compatibility.php2 = 'Required: 5.3.0'
compatibility.curl = 'Install the php5-curl library'
compatibility.gd = 'Install the php5-gd library'
compatibility.rights = "Read and write rights for the webserver in Movim's root directory"

77
app/widgets/Api/api.tpl

@ -1,45 +1,70 @@
<div id="api" class="tabelem paddedtop" title="{$c->__("api.title")}">
<p>{$infos}</p>
<ul>
<li class="subheader">{$infos}</li>
{if="isset($json)"}
{if="$json->status == 200"}
<div class="message success">
{$c->__('api.registered')}
<li>
<span class="icon bubble color green">
<i class="md md-cloud"></i>
</span>
{if="!$unregister_status"}
<a class="button color red oppose" onclick="{$unregister}">
<i class="fa fa-sign-out"></i> {$c->__('button.unregister')}
</a>
<div class="action">
<a class="button oppose" onclick="{$unregister}">
{$c->__('button.unregister')}
</a>
</div>
{/if}
<div class="clear"></div>
</div>
<span>{$c->__('api.registered')}</span>
</li>
{if="$json->pod->activated"}
<div class="message success">
{$c->__('api.validated')}
</div>
<li>
<span class="icon bubble color green">
<i class="md md-cloud"></i>
</span>
<span>{$c->__('api.validated')}</span>
</li>
{else}
<div class="message warning">{$c->__('api.wait')}</div>
<li>
<span class="icon bubble color gray">
<i class="md md-cloud-off"></i>
</span>
<span>{$c->__('api.wait')}</span>
</li>
{/if}
{if="$unregister_status"}
<div class="message info">{$c->__('api.unregister')}
<a class="button color orange oppose" onclick="{$unregister}">
<i class="fa fa-sign-out"></i> {$c->__('button.reset')}
</a>
<div class="clear"></div>
</div>
<li>
<div class="action">
<a class="button oppose" onclick="{$unregister}">
{$c->__('button.reset')}
</a>
</div>
<span>{$c->__('api.unregister')}</span>
</li>
{/if}
<script type="text/javascript">AdminTest.enableAPI();</script>
{else}
<div class="message info">
{$c->__('api.register')}
<a class="button color green oppose" onclick="{$register}">
<i class="fa fa-sign-in"></i> {$c->__('button.register')}
</a>
<div class="clear"></div>
</div>
<li>
<span class="icon bubble color blue">
<i class="md md-cloud-off"></i>
</span>
<div class="action">
<a class="button oppose" onclick="{$register}">
{$c->__('button.register')}
</a>
</div>
<span>{$c->__('api.register')}</span>
</li>
{/if}
{else}
<div class="message error">{$c->__('api.error')}</div>
<li>
<span class="icon bubble color gray">
<i class="md md-cloud-off"></i>
</span>
{$c->__('api.error')}
</li>
{/if}
</ul>
</div>

29
app/widgets/Statistics/statistics.tpl

@ -1,23 +1,28 @@
<div id="statistics" class="tabelem paddedtop" title="{$c->__("statistics.title")}">
<ul class="list">
<li class="title">
<a class="action">{$c->__('statistics.since')}</a>
<ul class="simple divided thick">
<li class="subheader">
{$c->__('statistics.sessions')} - {$sessions|count}
</li>
{loop="$sessions"}
<li>
{if="isset($value->start)"}
<a class="action">{$c->getTime($value->start)}</a>
{/if}
<a>{$value->username}@{$value->host} - {$value->domain}</a>
<li class="condensed">
<span>{$value->username}@{$value->host} - {$value->domain}</span>
<p>
{if="isset($value->start)"}
{$c->getTime($value->start)}
{/if}
</p>
</li>
{/loop}
</ul>
<h1><i class="fa fa-line-chart"></i> {$c->__('statistics.subscriptions')}</h1>
<img src="{$cache_path}monthly.png">
<img src="{$cache_path}monthly_cumulated.png">
<h3>{$c->__('statistics.subscriptions')}</h3>
<div class="card">
<img src="{$cache_path}monthly.png">
</div>
<div class="card">
<img src="{$cache_path}monthly_cumulated.png">
</div>
<script type="text/javascript">
MovimWebsocket.attach(function() {
MovimWebsocket.connection.admin("{$hash}");

8
src/Movim/Daemon/Core.php

@ -49,11 +49,11 @@ class Core implements MessageComponentInterface {
echo "location /ws/ {
proxy_pass http://{$explode['host']}:{$port}/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Upgrade \$http_upgrade;
proxy_set_header Connection \"Upgrade\";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host \$host;
proxy_set_header X-Real-IP \$remote_addr;
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;

Loading…
Cancel
Save