Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update image icons #5130

Merged
merged 1 commit into from Jan 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/components/com_kunena/layout/category/item.php
Expand Up @@ -80,6 +80,11 @@ public function getCategoryActions()
$actions['create'] = $this->subLayout('Widget/Button')
->setProperties(array('url' => $url,'name' => 'create','scope' => 'topic','type' => 'communication','success' => true,'icon' => 'fa fa-pencil'));
}
elseif ($url && $topicicontype == 'image')
{
$actions['create'] = $this->subLayout('Widget/Button')
->setProperties(array('url' => $url,'name' => 'create','scope' => 'topic','type' => 'communication','success' => true,'icon' => ''));
}
else
{
$actions['create'] = $this->subLayout('Widget/Button')
Expand All @@ -104,6 +109,11 @@ public function getCategoryActions()
$actions['markread'] = $this->subLayout('Widget/Button')
->setProperties(array('url' => $url, 'name' => 'markread', 'scope' => 'category', 'type' => 'user', 'icon' => 'fa fa-book'));
}
elseif ($url && $topicicontype == 'image')
{
$actions['markread'] = $this->subLayout('Widget/Button')
->setProperties(array('url' => $url, 'name' => 'markread', 'scope' => 'category', 'type' => 'user', 'icon' => ''));
}
else
{
$actions['markread'] = $this->subLayout('Widget/Button')
Expand Down Expand Up @@ -146,6 +156,21 @@ public function getCategoryActions()
->setProperties(array('url' => $url,'name' => 'unsubscribe','scope' => 'category','type' => 'user','icon' => 'fa fa-bookmark-o'));
}
}
elseif ($url && $topicicontype == 'image')
{
if (!$subscribed)
{
$url = "index.php?option=com_kunena&view=category&task=subscribe&catid={$category->id}{$token}";
$actions['subscribe'] = $this->subLayout('Widget/Button')
->setProperties(array('url' => $url,'name' => 'subscribe','scope' => 'category','type' => 'user','icon' => ''));
}
else
{
$url = "index.php?option=com_kunena&view=category&task=unsubscribe&catid={$category->id}{$token}";
$actions['unsubscribe'] = $this->subLayout('Widget/Button')
->setProperties(array('url' => $url,'name' => 'unsubscribe','scope' => 'category','type' => 'user','icon' => ''));
}
}
else
{
if (!$subscribed)
Expand Down
12 changes: 12 additions & 0 deletions src/libraries/kunena/icons/icons.php
Expand Up @@ -223,6 +223,10 @@ static public function star()
{
return '<span class="glyphicon glyphicon-star"></span>';
}
elseif ($topicicontype == 'image')
{
return '<span class="kicon kfavoritestar ksmall"></span>';
}
else
{
return '<span class="icon icon-star"></span>';
Expand Down Expand Up @@ -283,6 +287,10 @@ static public function flag()
{
return '<span class="glyphicon glyphicon-flag"></span>';
}
elseif ($topicicontype == 'image')
{
return '<span class="kicon ktopicmy ksmall"></span>';
}
else
{
return '<span class="icon icon-flag"></span>';
Expand Down Expand Up @@ -743,6 +751,10 @@ static public function attach()
{
return '<span class="glyphicon glyphicon-paperclip"></span>';
}
elseif ($topicicontype == 'image')
{
return '<span class="kicon ktopicattach ksmall"></span>';
}
else
{
return '<i class="icon icon-flag-2 icon-white"></i>';
Expand Down