Jump to content

Database Tickets / Support


Recommended Posts

Posted
On 8/9/2018 at 9:45 AM, Heosforo said:

Hello @The Asian

It seems that you are installing as a plugin.

This works with Pages App.
Page Management -> Databases -> Add Database -> Upload database.

I see I did it wrong. Thanks for pointing that out!

Posted (edited)

Add category images (as request)
This is a little trick since you can't add images to database categories.

1. Go to Pages -> Templates -> Database Tickets Category
Open: categoryRow

 Replace all that code with this new one:

{{$RecordsClass = $category::$contentItemClass;}}
{{if $category->can('view')}}
{{$lastPost = $category->lastPost();}}
<div class='ipsGrid_span3 ipsBox ipsPad_half ipsSpacer_top ipsSpacer_bottom ipsDataItem ipsDataItem_responsivePhoto ipsClearfix' data-categoryID="{$category->_id}">
<h4 class='ipsType_sectionTitle ipsType_sectionTitle ipsType_center' title='{{if \IPS\Member::loggedIn()->isAdmin()}}ID: ticket_cat{$category->_id}{{endif}}'>
<a title='{$category->_title}' href="{$category->url()}">{$category->_title}</a>
</h4>
<div class='ipsSpacer_top ipsClearfix'>
<a data-ipstooltip="" title='{$category->_title}' href="{$category->url()}"><div class='ticket_cat' id='ticket_cat{$category->_id}'></div></a>  
<p class='ipsType_center ipsPad'>{$category->_description|raw}</p>
</div>
{{if $category->can('add')}}
<a class="ipsButton ipsButton_medium ipsButton_important ipsButton_fullWidth" href="{$category->url()->setQueryString( array( 'do' => 'form', 'd' => \IPS\cms\Databases\Dispatcher::i()->databaseId ) )}">{lang="cms_add_new_record_button" sprintf="\IPS\cms\Databases::load( $category->database_id )->recordWord( 1 )"}</a>
{{endif}}  
</div>
{{endif}}


2. Add this css to your custom.css

.ticket_cat {
  height: 140px;
  background-position: center; 
  background-repeat: no-repeat;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}
#ticket_catID {
  background-image: url(IMAGE_URL);
}


Now as admin you will be able to see each category ID (mouse over), so you can add each image through css:

tcat.thumb.png.f34a3351b016b3c2122417d8c81e55d7.png

 

Demo

Edited by Heosforo
Posted

If anyone is getting "Something went wrong. Please try again" when creating the tickets page.

Just go to your Tickets database settings and change his Database key to: db_tickets

  • 3 weeks later...
Posted (edited)

Hi, there is:

  1. no paper pin icon wenn the ticket is pinned
  2. no icon for ticktes closed for comments
  3. no icon or tag for popular ticket

It would probably worth to add this to the future versions :smile:

Edited by Sonya*
Posted

Hi,

I am trying to add Tickets.xml as a plugin - Is that correct because I get this error - A configuration or server error has occurred

3C145/3 Something went wrong. Please try again.

Posted
1 minute ago, Unlucky said:

Hi,

I am trying to add Tickets.xml as a plugin - Is that correct because I get this error - A configuration or server error has occurred

3C145/3 Something went wrong. Please try again.

Hello.

No sorry, this works with Pages.

If you have it:
Page Management -> Databases -> Add Database -> Upload database.

Posted (edited)

ADD BAGDES (as request)
pinned, closed, featured etc..

tickets2.thumb.png.29e437685ca1bf730f49bee04b8d3e31.png

If you have already installed this Database, just follow this step:

1. Page Management -> Templates -> Open: Database Tickets Records -> Entry

Replace all code with this new one:

<div class='ipsGrid ipsGrid_collapsePhone ipsDataItem'>
  <div class='ipsGrid_span1 ipsType_light ipsType_center ipsPad ipsResponsive_hidePhone'>#{$record->primary_id_field}</div>
  <div class='ipsGrid_span1 ipsPad'>{$record->customFieldDisplayByKey('db_field_priority')|raw}</div>
  <div class='ipsGrid_span4 ipsPad ipsType_left'>
<div class='ipsPhotoPanel ipsPhotoPanel_tiny'>
{template="userPhoto" app="core" group="global" params="$record->author(), 'tiny'"}     
<div> 
<div data-ipsTruncate data-ipsTruncate-size='1 lines' data-ipsTruncate-type='remove'><a href="{$record->url()}" data-ipstooltip="" title="{$record->_title}">{wordbreak="$record->_title"}</a></div>
<p class='ipsType_reset ipsType_medium ipsType_blendLinks'>
{{if $record->canEditTitle()}}{{if $record->unread()}}<i data-ipstooltip="" title='{lang="calperm_perm__reply"}' class="fa fa-commenting-o" aria-hidden="true"></i> {{endif}}{{endif}}{template="userLink" app="core" group="global" params="$record->author(), $record->warningRef()"}
</p>
</div>
</div>
</div>   
<div class='ipsGrid_span2 ipsPad ipsType_light ipsType_left ipsResponsive_hidePhone'>   
<a data-ipstooltip="" title='{$record->container()->_title}' href="{$record->container()->url()}">{$record->container()->_title}</a></div>
<div class='ipsGrid_span2 ipsPad ipsType_light ipsResponsive_hidePhone'>
{{if $record->locked()}}<span class='ipsBadge ipsBadge_new ipsBadge_small ipsBadge_icon ipsType_center ipsBadge_warning' data-ipsTooltip title='{lang="locked"}'><i class='fa fa-lock'></i></span> {{endif}}
{{if $record->isFutureDate() || $record->mapped('pinned') || $record->mapped('featured') || $record->hidden() === -1 || $record->hidden() === 1 || $record->hidden() === -2}}
{{if $record->isFutureDate()}}
<span><span class=" ipsBadge ipsBadge_new ipsBadge_small ipsBadge_icon ipsType_center ipsBadge_warning" data-ipsTooltip title='{$record->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span></span>
			{{elseif $record->hidden() === -1}}
				<span><span class="ipsBadge ipsBadge_new ipsBadge_small ipsBadge_icon ipsType_center ipsBadge_warning" data-ipsTooltip title='{$record->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span></span>
			{{elseif $record->hidden() === -2}}
				<span><span class="ipsBadge ipsBadge_new ipsBadge_small ipsBadge_icon ipsType_center ipsBadge_warning" data-ipsTooltip title='{$record->deletedBlurb()}'><i class='fa fa-trash'></i></span></span>
			{{elseif $record->hidden() === 1}}
				<span><span class="ipsBadge ipsBadge_new ipsBadge_small ipsBadge_icon ipsType_center ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span></span>
			{{endif}}
			{{if $record->mapped('pinned')}}
				<span><span class="ipsBadge ipsBadge_new ipsBadge_small ipsBadge_icon ipsType_center ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span></span>
			{{endif}}
			{{if $record->mapped('featured')}}
				<span><span class="ipsBadge ipsBadge_new ipsBadge_small ipsBadge_icon ipsType_center ipsBadge_intermediary" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span></span>
			{{endif}}
		{{endif}}  
<span class=' ipsBadge ipsBadge_large ipsType_success'>{$record->customFieldDisplayByKey('db_field_status', 'processed')}</span> 
</div>
<div class='ipsGrid_span2 ipsPad ipsType_light'>
<p class='ipsType_reset ipsResponsive_hidePhone ipsType_medium ipsType_light'>{datetime="$record->mapped('date')"}</p>
<p class='ipsType_reset ipsResponsive_hideDesktop ipsPos_right ipsType_small ipsType_light'>{datetime="$record->mapped('date')"}</p>
</div>
</div>

Done.

Edited by Heosforo
Posted (edited)

Liking it so far 👍 I tried so hard to figure out how IPS does it for their support (commerce) and probably got it somewhat.

Remove
<span class=' ipsBadge ipsBadge_large ipsType_success'>{$record->customFieldDisplayByKey('db_field_status', 'processed')}</span> 

Replace
{{if $row->author() == $row->lastCommenter() || !$row->author() == !$row->lastCommenter() || $row->locked()}}
	{{if $row->locked()}}
    	<span class='ipsType_negative'>Closed</span>
	{{elseif $row->author() == $row->lastCommenter()}}
      	<span class='ipsType_issue'>Awaititing Response</span>
	{{elseif !$row->author() == !$row->lastCommenter()}} 
      	<span class='ipsType_success'>Customer Response</span>
	{{endif}}
{{endif}} 

For anyone whose looking for little bit more automatically for status updates. 

Edited by Goza
Posted
20 hours ago, Heosforo said:

ADD BAGDES (as request)
pinned, closed, featured etc..

 

1. Page Management -> Templates -> Open: Database Tickets Records -> Entry

Replace all code with this new one:

Where is the Open: Database Tickets Records -> Entry?

090803.png

Posted (edited)
3 hours ago, Heosforo said:

You could also try cleaning your site cache:
Admincp ->
Support -> Something isn't working correctly -> Go.

Please let me know.

I removed the database, cleared cache the way you said, re-downloaded file, uploaded xml and it's still not there.

 

 

090804.png

090805.png

Edited by Darrell England
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...