Added social icons to navigation footer

This commit is contained in:
Hillel Coren 2016-12-12 00:25:22 +02:00
parent 5cab6e009a
commit 03e9e978d7
8 changed files with 51 additions and 8 deletions

View File

@ -652,6 +652,8 @@ if (!defined('CONTACT_EMAIL')) {
define('SOCIAL_LINK_TWITTER', env('SOCIAL_LINK_TWITTER', 'https://twitter.com/invoiceninja'));
define('SOCIAL_LINK_GITHUB', env('SOCIAL_LINK_GITHUB', 'https://github.com/invoiceninja/invoiceninja/'));
define('NINJA_FORUM_URL', env('NINJA_FORUM_URL', 'https://www.invoiceninja.com/forums/forum/support/'));
define('NINJA_CONTACT_URL', env('NINJA_CONTACT_URL', 'https://www.invoiceninja.com/contact/'));
define('NINJA_FROM_EMAIL', env('NINJA_FROM_EMAIL', 'maildelivery@invoiceninja.com'));
define('RELEASES_URL', env('RELEASES_URL', 'https://trello.com/b/63BbiVVe/invoice-ninja'));
define('ZAPIER_URL', env('ZAPIER_URL', 'https://zapier.com/zapbook/invoice-ninja'));
@ -915,7 +917,7 @@ if (!defined('CONTACT_EMAIL')) {
if ( ! $text) {
$text = $entityType;
}
if ( ! Utils::isNinjaProd() && $module = Module::find($entityType)) {
return trans("{$module->getLowerName()}::texts.{$text}");
} else {

View File

@ -1067,6 +1067,22 @@ class Utils
});
}
public static function getReadableUrl($path)
{
$url = static::getDocsUrl($path);
$parts = explode('/', $url);
$part = $parts[count($parts) - 1];
$part = str_replace('#', '> ', $part);
$part = str_replace(['.html', '-', '_'], ' ', $part);
if ($part) {
return trans('texts.user_guide') . ': ' . ucwords($part);
} else {
return trans('texts.user_guide');
}
}
public static function getDocsUrl($path)
{
$page = '';

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -167,8 +167,12 @@
text-overflow: ellipsis;
}
.sidebar-nav li:hover div {
max-width:186px;
.sidebar-nav li div.nav-footer i {
color:#ccc !important;
}
.sidebar-nav li div.nav-footer i:hover {
color:#fff !important;
}
#wrapper {

View File

@ -2264,6 +2264,9 @@ $LANG = array(
'new_...' => 'New ...',
'list_...' => 'List ...',
'created_at' => 'Created',
'contact_us' => 'Contact Us',
'support_forum' => 'Support Forum',
'user_guide' => 'User Guide',
);

View File

@ -511,6 +511,25 @@
@endforeach
@endif
@include('partials.navigation_option', ['option' => 'settings'])
<li>
<div class="nav-footer" style="position: absolute;bottom:60px;left:0;right:0:text-align:center">
<a href="{{ url(NINJA_CONTACT_URL) }}" target="_blank" title="{{ trans('texts.contact_us') }}">
<i class="fa fa-envelope"></i>
</a>
<a href="{{ url(NINJA_FORUM_URL) }}" target="_blank" title="{{ trans('texts.support_forum') }}">
<i class="fa fa-question-circle"></i>
</a>
<a href="{{ url(SOCIAL_LINK_FACEBOOK) }}" target="_blank" title="">
<i class="fa fa-facebook-square"></i>
</a>
<a href="{{ url(SOCIAL_LINK_TWITTER) }}" target="_blank" title="">
<i class="fa fa-twitter-square"></i>
</a>
<a href="{{ url(SOCIAL_LINK_GITHUB) }}" target="_blank" title="">
<i class="fa fa-github-square"></i>
</a>
</div>
</li>
</ul>
</div>
<!-- /#left-sidebar-wrapper -->
@ -567,7 +586,6 @@
@endif
</div>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>

View File

@ -2,9 +2,9 @@
@if ($option == 'settings')
<a type="button" class="btn btn-default btn-sm pull-right"
<a type="button" class="btn btn-default btn-sm pull-right" title="{{ Utils::getReadableUrl(request()->path()) }}"
href="{{ Utils::getDocsUrl(request()->path()) }}" target="_blank">
<i class="fa fa-question-circle" style="width:20px" title="{{ trans('texts.help') }}"></i>
<i class="fa fa-question-circle" style="width:20px"></i>
</a>
@elseif (Auth::user()->can('create', $option) || Auth::user()->can('create', substr($option, 0, -1)))