Browse Source

- Merge with edhelas

pull/16/head
Jaussoin Timothée 10 years ago
parent
commit
9c1f8d216b
  1. 3
      app/widgets/Chat/Chat.php
  2. 27
      app/widgets/Chat/_chat_empty.tpl
  3. 1
      app/widgets/Chat/locales.ini
  4. 8
      app/widgets/Chats/_chats.tpl
  5. 3
      app/widgets/Chats/locales.ini
  6. 3
      app/widgets/Group/Group.php
  7. 12
      app/widgets/Group/_group_empty.tpl
  8. 1
      app/widgets/Group/locales.ini
  9. 2
      app/widgets/Header/_header_main.tpl
  10. 2
      app/widgets/Header/_header_news.tpl
  11. 2
      app/widgets/Header/locales.ini
  12. 4
      app/widgets/Hello/hello.tpl
  13. 15
      app/widgets/Menu/_menu_list.tpl
  14. 4
      app/widgets/Menu/locales.ini
  15. 2
      app/widgets/Navigation/navigation.tpl
  16. 15
      app/widgets/Post/_post_header.tpl
  17. 18
      themes/material/css/style.css

3
app/widgets/Chat/Chat.php

@ -500,6 +500,9 @@ class Chat extends WidgetBase
function prepareEmpty()
{
$view = $this->tpl();
$cd = new \Modl\ContactDAO;
$view->assign('top', $cd->getTop(10));
return $view->draw('_chat_empty', true);
}

27
app/widgets/Chat/_chat_empty.tpl

@ -2,3 +2,30 @@
<h1>{$c->__('chat.empty_title')}</h1>
<h4>{$c->__('chat.empty_text')}</h4>
</div>
<br />
<ul class="flex middle active">
<li class="subheader block large">{$c->__('chat.frequent')}</li>
{loop="$top"}
<li class="condensed block {if="$value->last > 60"} inactive{/if}"
onclick="Chats_ajaxOpen('{$value->jid}'); Chat_ajaxGet('{$value->jid}');">
{$url = $value->getPhoto('s')}
{if="$url"}
<span class="icon bubble
{if="$value->value"}
status {$presencestxt[$value->value]}
{/if}">
<img src="{$url}">
</span>
{else}
<span class="icon bubble color {$value->jid|stringToColor}
{if="$value->value"}
status {$presencestxt[$value->value]}
{/if}">
<i class="md md-person"></i>
</span>
{/if}
<span>{$value->getTrueName()}</span>
<p class="wrap">{$value->jid}</p>
</li>
{/loop}
</ul>

1
app/widgets/Chat/locales.ini

@ -11,6 +11,7 @@ chat.placeholder = 'Your message here...'
chat.smileys = 'Smileys'
chat.empty_title = 'Chat'
chat.empty_text = 'Discuss with your contacts'
chat.frequent = 'Frequent contacts'
chatroom.members = 'Members'
chatroom.connected = 'Connected to the chatroom'

8
app/widgets/Chats/_chats.tpl

@ -1,8 +1,8 @@
{if="$chats == null"}
<li class="condensed">
<span class="icon green"><i class="md md-chat"></i></span>
<p>{$c->__('chats.empty')}</p>
</li>
<div class="placeholder icon">
<h1>{$c->__('chats.empty_title')}</h1>
<h4>{$c->__('chats.empty')}</h4>
</div>
{/if}
{loop="$chats"}

3
app/widgets/Chats/locales.ini

@ -1,5 +1,6 @@
[chats]
chats.empty = 'Open a new conversation by clicking on the plus button bellow'
chats.empty_title = 'No chats yet...'
chats.empty = 'Open a new conversation by clicking on the plus button bellow or visit the Contacts page.'
chats.add = 'Chat with a contact'
chats.frequent = 'Frequent contacts'
chats.more = 'Load more contacts'

3
app/widgets/Group/Group.php

@ -352,7 +352,10 @@ class Group extends WidgetBase
function prepareEmpty()
{
$id = new \modl\ItemDAO();
$view = $this->tpl();
$view->assign('servers', $id->getGroupServers());
$html = $view->draw('_group_empty', true);
return $html;

12
app/widgets/Group/_group_empty.tpl

@ -2,3 +2,15 @@
<h1>{$c->__('group.empty_title')}</h1>
<h4>{$c->__('group.empty_text')}</h4>
</div>
<br />
<ul class="flex middle active">
{loop="$servers"}
{if="!filter_var($value->server, FILTER_VALIDATE_EMAIL)"}
<li class="block condensed" onclick="Groups_ajaxDisco('{$value->server}')">
<span class="icon bubble color {$value->server|stringToColor}">{$value->server|firstLetterCapitalize}</span>
<span>{$value->server}</span>
<p>{$c->__('group.counter', $value->number)}</p>
</li>
{/if}
{/loop}
</ul>

1
app/widgets/Group/locales.ini

@ -13,6 +13,7 @@ group.config_saved = 'Group configuration saved'
group.delete_title = 'Delete the group'
group.delete_text = 'You are going to delete the following group. Please confirm your action.'
group.delete_clean_text = "It seems that this group doesn't exists anymore. Do you want to remove it from your subscriptions?"
group.counter = '%s groups on this server'
group.configuration = 'Configuration'
group.subscriptions = 'Subscriptions'

2
app/widgets/Header/_header_main.tpl

@ -1,5 +1,5 @@
<div>
<span id="menu" class="on_mobile icon active" onclick="MovimTpl.toggleMenu()"><i class="md md-menu"></i></span>
<span class="on_desktop icon"><i class="md md-view-list"></i></span>
<span class="on_desktop icon"><i class="md md-home"></i></span>
<h2 class="r1">{$c->__('page.home')}</h2>
</div>

2
app/widgets/Header/_header_news.tpl

@ -1,6 +1,6 @@
<div>
<span id="menu" class="on_mobile icon active" onclick="MovimTpl.toggleMenu()"><i class="md md-menu"></i></span>
<span class="on_desktop icon"><i class="md md-view-list"></i></span>
<span class="on_desktop icon"><i class="md md-filter-list"></i></span>
<form>
<div>
<div class="select">

2
app/widgets/Header/locales.ini

@ -5,4 +5,4 @@ menu.contacts = 'Contacts'
menu.refresh = 'Refresh all the streams'
[roster]
roster.search = 'Search'
roster.search = 'Search in your contacts'

4
app/widgets/Hello/hello.tpl

@ -93,14 +93,14 @@
<i class="md md-chevron-right"></i>
</div>
<span class="icon">
<i class="md md-view-list"></i>
<i class="md md-receipt"></i>
</span>
<span>{$c->__('hello.news')}</span>
</li>
</a>
</ul>
<br />
<ul class="active thick">
<ul class="active thick on_desktop">
<a href="{$c->route('blog', array($jid))}" target="_blank">
<li class="condensed action">
<div class="action">

15
app/widgets/Menu/_menu_list.tpl

@ -67,13 +67,12 @@
{elseif="$page == 0"}
<div id="menu_refresh"></div>
<br/>
<ul id="menu_wrapper">
<li class="condensed">
<span class="icon orange">
<i class="md md-format-align-left"></i>
</span>
<span>{$c->__('menu.empty_title')}</span>
<p>{$c->__('menu.empty')}</p>
</li>
<ul class="thick active divided spaced" id="menu_wrapper">
<div class="placeholder icon news">
<h1>{$c->__('menu.empty_title')}</h1>
<h4>{$c->__('menu.empty')}</h4>
</div>
</ul>
{/if}

4
app/widgets/Menu/locales.ini

@ -1,5 +1,5 @@
menu.empty_title = 'Hello'
menu.empty_title = 'No news yet...'
menu.contact_post = 'Contact post'
menu.empty = 'Welcome on your news feed, here you will see all the posts published in the groups you have subscribed.'
menu.empty = 'Welcome on your news feed, here you will see all the posts published by your contacts and in the groups you have subscribed.'
menu.refresh = 'Refreshing all the streams'
menu.public = 'This post is public'

2
app/widgets/Navigation/navigation.tpl

@ -17,7 +17,7 @@
</a>
<a class="classic {if="!$c->supported('pubsub')"}disabled{/if}" href="{$c->route('news')}">
<li {if="$page == 'news'"}class="active"{/if}>
<span class="icon"><i class="md md-view-list"></i></span>
<span class="icon"><i class="md md-receipt"></i></span>
<span data-key="news" class="counter"></span>
<span>{$c->__('page.news')}</span>
</li>

15
app/widgets/Post/_post_header.tpl

@ -1,12 +1,11 @@
<div>
<span class="on_desktop icon"><i class="md md-view-list"></i></span>
<h2>
{if="$post->node == 'urn:xmpp:microblog:0'"}
{$c->__('page.blog')}
{else}
{$post->node}
{/if}
</h2>
{if="$post->isMicroblog()"}
<span class="on_desktop icon"><i class="md md-person"></i></span>
<h2>{$c->__('page.blog')}</h2>
{else}
<span class="on_desktop icon"><i class="md md-pages"></i></span>
<h2>{$post->node}</h2>
{/if}
</div>
<div>
{if="$post->isMine()"}

18
themes/material/css/style.css

@ -732,23 +732,33 @@ main section > div:first-child:nth-last-child(2) ~ div .actions.fixed > div:last
.placeholder {
text-align: center;
font-size: 1.2em;
max-width: 500px;
max-width: 400px;
padding: 0 2rem;
padding-bottom: 2rem;
margin: 0 auto;
}
.placeholder h1 {
color: #888;
}
.placeholder h4 {
color: #AAA;
}
.placeholder p {
text-align: center;
}
.placeholder.icon {
background-image: url(../img/placeholder/chat.png);
background-image: url(../img/icons/chat.svg);
background-size: 25rem;
padding-top: 27rem;
padding-top: 30rem;
background-repeat: no-repeat;
background-position: center 4em;
}
.icon.newspaper { background-image: url(../img/icons/view_list.svg); }
.icon.news { background-image: url(../img/icons/receipt.svg); }
.icon.forum { background-image: url(../img/icons/forum.svg); }
.icon.media { background-image: url(../img/placeholder/media.png); }
.icon.explore { background-image: url(../img/placeholder/explore.png); }

Loading…
Cancel
Save