Zum Inhalt springen
  • Live Demo

    Hier klicken um eine Live-Demo unseres Bugtrackers auszuprobieren...

    Bugtracker
  • Templates für die Ausgabe

    Da wir ja eine eigene Ansicht verwenden wollen, benötigen wir selbstverständlich eigene Templates. Man kann die benutzerdefinierten Felder zwar auch ganz einfach automatisch an festgelegten Positionen anzeigen lassen, doch genau das tun wir hier NICHT.

    Also legen wir uns jetzt unser eigenes Set an, für die Auflistung und den Datensatz, das Feld haben wir ja auf der letzten Seite bereits vorbereitet.

    Dafür geht ihr im AdminCP auf Seiten -> Seitenverwaltung -> Templates -> Neu. Nun fügen wir zwei neue Datenbank Templates hinzu:

    1. Name: bugtracker_display -> Datenansicht
    2. Name: bugtracker_listing -> Liste der Einträge

    bugtracker_hinzufügen.png

    Nun solltet ihr in der Liste eurer Templates zwei neue Gruppen vorfinden ...

    bugtracker_gruppen.png

    In der Bugtracker Display Gruppe tauscht jetzt ihr den Inhalt des record Templates komplett mit diesem Code aus ...

    <div class='ipsPageHeader ipsBox ipsResponsive_pull ipsPadding ipsClearfix'>
    	<div class='ipsFlex ipsFlex-ai:center ipsFlex-fw:wrap ipsGap:4'>
    		<div class='ipsFlex-flex:11'>
    			<h1 class='ipsType_pageTitle ipsContained_container'>
    				{{if $record->locked()}}<span><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_icon 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_icon 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_icon ipsBadge_warning" data-ipsTooltip title='{$record->deletedBlurb()}'><i class='fa fa-trash'></i></span></span>
    					{{elseif $record->hidden() === 1}}
    						<span><span class="ipsBadge ipsBadge_icon 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_icon 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_icon ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span></span>
    					{{endif}}
    				{{endif}}
    				
    
                  
    				{{if $record->prefix() OR ( $record->canEdit() AND $record::canTag( NULL, $record->container() ) AND $record::canPrefix( NULL, $record->container() ) )}}
    					<span {{if !$record->prefix()}}class='ipsHide'{{endif}} {{if ( $record->canEdit() AND $record::canTag( NULL, $record->container() ) AND $record::canPrefix( NULL, $record->container() ) )}}data-editablePrefix{{endif}}>
    						{template="prefix" group="global" app="core" params="$record->prefix( TRUE ), $record->prefix()"}
    					</span>
    				{{endif}}
    				{{if $record->canEditTitle()}}
    					<span class='ipsType_break ipsContained' data-controller="core.front.core.moderation">
    						<span data-role="editableTitle" title='{lang="click_hold_edit"}'>{$record->_title}</span>
    					</span>
    				{{else}}
    					<span class='ipsType_break ipsContained'>{$record->_title}</span>
    				{{endif}}
    			</h1>
    			{{if \count( $record->tags() ) OR ( $record->canEdit() AND $record::canTag( NULL, $record->container() ) )}}
    				{template="tags" group="global" app="core" params="$record->tags(), FALSE, FALSE, ( $record->canEdit() AND $record::canTag( NULL, $record->container() ) ) ? $record->url() : NULL"}
    			{{endif}}
    		</div>
          
          <div class='ipsPos_right'>
            {$record->customFieldDisplayByKey('bugtracker_status', 'display')|raw}
          </div>     
          
    		<div class='ipsFlex-flex:00'>
    			{{if $record::database()->options['reviews']}}
    				<div>
    					{template="rating" group="global" location="front" app="core" params="'large', $record->averageReviewRating(), \IPS\Settings::i()->reviews_rating_out_of, $record->memberReviewRating()"}   <span class='ipsType_normal ipsType_light'>({lang="num_reviews" pluralize="$record->record_reviews"})</span>
    				</div>
    			{{elseif $record->container()->allow_rating}}
    				<div>{$record->rating()|raw}</div>
    			{{endif}}
    		</div>
    	</div>
    
    	<hr class='ipsHr'>
    	<div class='ipsPageHeader__meta ipsFlex ipsFlex-jc:between ipsFlex-ai:center ipsFlex-fw:wrap ipsGap:3'>
    		<div class='ipsFlex-flex:11'>
    			<div class='ipsPhotoPanel ipsPhotoPanel_tiny ipsClearfix'>
    				{template="userPhoto" app="core" group="global" params="$record->author(), 'tiny', $record->warningRef()"}
    				<div>
    					<p class='ipsType_reset ipsType_large ipsType_blendLinks'>
    						{lang="content_record_started_by" htmlsprintf="$record->author()->link()"}
    						{{if $record->editLine()}}
    							<span class='ipsType_light ipsType_medium ipsType_reset'>
    								({lang="edited_lc"})
    							</span>
    						{{endif}}
    					</p>
    					<ul class='ipsList_inline'>
    						<li>{datetime="$record->record_publish_date"}</li>
    
    					</ul>
    				</div>
    			</div>
    		</div>
    		<div class='ipsFlex-flex:00 ipsResponsive_hidePhone'>
    			<div class='ipsFlex ipsFlex-ai:center ipsGap:3 ipsGap_row:0'>
    				{{if !$record->container()->disable_sharelinks}}
    					{template="shareButton" app="core" group="sharelinks" params="$record"}
    				{{endif}}
    				{template="promote" app="core" group="global" params="$record"}
    				{template="follow" app="core" group="global" params="'cms', 'records'.$record::$customDatabaseId, $record->primary_id_field, $record->followersCount()"}
    			</div>
    		</div>
    	</div>
    </div>
    
    {{if \count($record->getMessages())}}
    	<div class='ipsSpacer ipsSpacer_top'>
    		{template="contentItemMessages" group="global" app="core" params="$record->getMessages(), $record"}
    	</div>
    {{endif}}
    
    <article class='ipsContained ipsSpacer_top ipsBox ipsResponsive_pull'>
    	<div class='ipsClearfix ipsPadding '>
    		{{if $record->record_image}}
    			<div class="cCmsRecord_image">
    				<img class="ipsImage" src="{file="$record->_record_image_thumb" extension="cms_Records"}">
    			</div>
    		{{endif}}
    		<section class="ipsType_richText ipsType_normal" data-controller='core.front.core.lightboxedImages'>{$record->_content|raw}</section>
    		
    		{{if $record->editLine()}}
    			{$record->editLine()|raw}
    		{{endif}}
    		
    		{{if $records = $record->getReciprocalItems()}}
    			<br>
    			{{foreach $records as $fieldId => $items}}
    				{{$infoLineShown = FALSE;}}
    				<ul class="ipsList_inline ipsList_csv ipsList_noSpacing">
    				{{foreach $items as $item}}
    					<li>{{if ! $infoLineShown}}{{$infoLineShown=TRUE;}}{lang="records_linking_to_me" sprintf="$item::database()->recordWord(0,TRUE), $record::database()->recordWord(1)"}: {{endif}}<a href="{$item->url()}">{$item->_title}</a></li>
    				{{endforeach}}
    				</ul>
    			{{endforeach}}
    		{{endif}}
    	</div>
    	{{if $bottomFields = $record->customFieldsForDisplay('display_bottom')}}
    		<hr class='ipsHr ipsClear ipsClearfix'>
    		<div class="ipsType_richText ipsPadding ipsType_normal" data-controller='core.front.core.lightboxedImages'>
    		{{foreach $bottomFields as $fieldId => $fieldValue}}
    			{{if $fieldValue}}
    				{$fieldValue|raw}
    			{{endif}}
    		{{endforeach}}
    		</div>
    	{{endif}}
    	
    	<div class='ipsItemControls'>
    		{{if \IPS\IPS::classUsesTrait( $record, 'IPS\Content\Reactable' ) and settings.reputation_enabled}}
    			{template="reputation" app="core" group="global" params="$record"}
    		{{endif}}
    		<ul class='ipsComment_controls ipsClearfix ipsItemControls_left'>
    			{{if ( $record->canEdit() or $record->isFutureDate() or $record->canPin() or $record->canUnpin() or $record->canFeature() or $record->canUnfeature() or $record->canHide() or $record->canUnhide() or $record->canMove() or $record->canLock() or $record->canUnlock() or $record->canDelete() ) or ( $record->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content'))}}
    				<li>
    					<a href='#elentryActions_menu' id='elentryActions' class='ipsButton ipsButton_light ipsButton_verySmall ipsButton_fullWidth' data-ipsMenu>{lang="content_record_actions" sprintf="$record::database()->recordWord( 1, TRUE )"} <i class='fa fa-caret-down'></i></a>
    					<ul id='elentryActions_menu' class='ipsMenu ipsMenu_auto ipsHide'>
    						{{if $record->canEdit()}}
    							<li class='ipsMenu_item'><a href='{$record->url('edit')}' title='{lang="edit"}'>{lang="edit"}</a></li>
    						{{endif}}
    						{{if $record->canReportOrRevoke() === TRUE}}
    							<li class='ipsMenu_item'><a href='{$record->url('report')}' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}" data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="report_submit_success"}" title="{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}">{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}</a></li>
    						{{endif}}
    						{{if ( $record->canEdit() || $record->canReportOrRevoke() === TRUE ) AND ( (\IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') AND $record->hidden() == -2 ) OR ( $record->isFutureDate() and $record::canFuturePublish( NULL, $record->container() ) ) OR $record->canFeature() OR $record->canUnfeature() OR $record->canPin() OR $record->canUnpin() OR $record->canHide() OR $record->canUnhide() OR $record->canLock() OR $record->canUnlock() OR $record->canMove() OR $record->canDelete() OR $record->canOnMessage( 'add' ) OR \IPS\Member::loggedIn()->modPermission('can_view_moderation_log') )}}
    							<li class='ipsMenu_sep'><hr></li>
    						{{endif}}
    						{{if \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') AND $record->hidden() == -2}}
    							<li class='ipsMenu_item'><a href='{$record->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'restore' ) )}' data-confirm data-confirmSubMessage='{lang="restore_as_visible_desc"}'>{lang="restore_as_visible"}</a></li>
    							<li class='ipsMenu_item'><a href='{$record->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'restoreAsHidden' ) )}' data-confirm data-confirmSubMessage='{lang="restore_as_hidden_desc"}'>{lang="restore_as_hidden"}</a></li>
    							<li class='ipsMenu_item'><a href='{$record->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'delete', 'immediate' => 1 ) )}' data-confirm data-confirmSubMessage='{lang="delete_immediately_desc"}'>{lang="delete_immediately"}</a></li>
    						{{else}}
    							{{if $record->isFutureDate() and $record::canFuturePublish( NULL, $record->container() )}}
    								<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'publish' ) )}' data-confirm title='{lang="publish_now"}'>{lang="publish"}</a></li>
    							{{endif}}
    							{{if $record->canFeature()}}
    								<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'feature' ) )}' title='{lang="feature_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="feature"}</a></li>
    							{{endif}}
    							{{if $record->canUnfeature()}}				
    								<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'unfeature' ) )}' title='{lang="unfeature_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="unfeature"}</a></li>
    							{{endif}}
    							{{if $record->canPin()}}				
    								<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'pin' ) )}' title='{lang="pin_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="pin"}</a></li>
    							{{endif}}
    							{{if $record->canUnpin()}}				
    								<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'unpin' ) )}' title='{lang="unpin_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="unpin"}</a></li>
    							{{endif}}
    							{{if $record->canHide()}}				
    								<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'hide' ) )}' title='{lang="hide_title_record" sprintf="$record::database()->recordWord(1)"}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
    							{{endif}}
    							{{if $record->canUnhide()}}				
    								<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'unhide' ) )}' title='{{if $record->hidden() === 1}}{lang="approve_title_record" sprintf="$record::database()->recordWord(1)"}{{else}}{lang="unhide_title_record" sprintf="$record::database()->recordWord(1)"}{{endif}}'>{{if $record->hidden() === 1}}{lang="approve"}{{else}}{lang="unhide"}{{endif}}</a></li>
    							{{endif}}
    							{{if $record->canLock()}}				
    								<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'lock' ) )}' title='{lang="lock_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="lock"}</a></li>
    							{{endif}}
    							{{if $record->canUnlock()}}				
    								<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'unlock' ) )}' title='{lang="unlock_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="unlock"}</a></li>
    							{{endif}}
    							{{if $record->canMove()}}				
    								<li class='ipsMenu_item'><a href='{$record->url('move')->csrf()}' data-ipsDialog data-ipsDialog-title="{lang="move"}"  title='{lang="move_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="move"}</a></li>
    							{{endif}}
    							{{if $record->canDelete()}}				
    								<li class='ipsMenu_item'><a href='{$record->url('moderate')->csrf()->setQueryString( array( 'action' => 'delete' ) )}' data-confirm  title='{lang="delete_title_record" sprintf="$record::database()->recordWord(1)"}'>{lang="delete"}</a></li>
    							{{endif}}
    							{{if $record->canOnMessage( 'add' )}}
    								<li class='ipsMenu_item'><a href='{$record->url('messageForm')->csrf()}' data-ipsDialog data-ipsDialog-title='{lang="add_message"}'>{lang="add_message"}</a></li>
    							{{endif}}
    							{{if \IPS\Member::loggedIn()->modPermission('can_view_moderation_log')}}
    								<li class='ipsMenu_sep'><hr></li>
    								<li class="ipsMenu_item"><a href='{$record->url()->csrf()->setQueryString( array( 'do' => 'modLog' ) )}' data-ipsDialog data-ipsDialog-title='{lang="moderation_history"}'>{lang="moderation_history"}</a></li>
    							{{endif}}
    						{{endif}}
    					</ul>
    				</li>
    			{{elseif $record->canReportOrRevoke() === TRUE}}
    				<li><a href='{$record->url('report')}' class='ipsButton ipsButton_link ipsButton_verySmall ipsButton_fullWidth' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}" data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="report_submit_success"}" title="{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}">{lang="content_record_report" sprintf="$record::database()->recordWord( 1, TRUE )"}</a></li>
    			{{endif}}
    			
    			{{if $record->canManageRevisions()}}
    				<li><a href='{$record->url('revisions')}' class='ipsButton ipsButton_verySmall ipsButton_link ipsButton_fullWidth' title="{lang="content_view_revisions"}">{lang="content_view_revisions"}</a></li>
    			{{endif}}
    		</ul>
    	</div>
    </article>
    
    <div class='ipsBox ipsPadding ipsResponsive_pull ipsResponsive_showPhone ipsMargin_top'>
    	{{if !$record->container()->disable_sharelinks}}
    		<div class='ipsResponsive_noFloat ipsResponsive_block ipsMargin_bottom:half'>
    			{template="shareButton" app="core" group="sharelinks" params="$record, 'verySmall', 'light'"}
    		</div>
    	{{endif}}
    	<div class='ipsResponsive_noFloat ipsResponsive_block'>
    		{template="follow" app="core" group="global" params="'cms', 'records'.$record::$customDatabaseId, $record->primary_id_field, $record->followersCount()"}
    	</div>
    	{{if $record->canPromoteToSocialMedia() and ( $record instanceof \IPS\Content or $record instanceof \IPS\Node\Model )}}
    		<div class='ipsResponsive_noFloat ipsResponsive_block ipsMargin_top:half'>
    			{template="promote" app="core" group="global" params="$record"}
    		</div>
    	{{endif}}
    </div>
    
    <div class='ipsPager ipsSpacer_top'>
    	<div class="ipsPager_prev">
    		{{if $record::database()->use_categories}}
    			<a href="{$record->container()->url()}" title="{lang="cms_back_to_category_with_title" sprintf="$record->container()->_title"}" rel="up">
    				<span class="ipsPager_type">{lang="cms_back_to_category" sprintf="$record::database()->recordWord( 2 )"}</span>
    			</a>
    		{{else}}
    			{{$page = \IPS\cms\Pages\Page::$currentPage;}}
    			<a href="{$page->url()}" title="{lang="cms_back_to_category_with_title" sprintf="$page->_title"}" rel="up">
    				<span class="ipsPager_type">{lang="cms_back_to_category" sprintf="$record::database()->recordWord( 2 )"}</span>
    			</a>
    		{{endif}}
    	</div>
    	{{if $nextUnread !== NULL}}
    		<div class='ipsPager_next'>
    			<a href="{$record->url()->setQueryString( array( 'do' => 'nextUnread' ) )}" title='{lang="cms_view_next_unread_title" sprintf="$record::database()->recordWord( 1 )"}'>
    				<span class="ipsPager_type">{lang="cms_next_unread_title" sprintf="$record::database()->recordWord( 1 )"}</span>
    			</a>
    		</div>
    	{{endif}}
    </div>
    
    <br>
    {{if $commentsAndReviews}}
    	<a id="replies"></a>
    	<h2 class='ipsHide'>{lang="user_feedback"}</h2>
    	<div class='ipsResponsive_pull'>
    		{$commentsAndReviews|raw}
    	</div>
    {{endif}}
    
    <br>
    {{if $updateForm}}
    	<div class='ipsAreaBackground_light ipsPad'>
    		<h2 class='ipsType_sectionHead'>{lang="cms_front_update_fields" sprintf="$record::database()->recordWord( 1 )"}</h2>
    		<ul class='ipsForm ipsForm_vertical'>
    			{$updateForm|raw}
    		</ul>
    	</div>
    {{endif}}

    In der Bugtracker Listing Gruppe ist es das recordRow Template, dessen Inhalt ihr austauschen müsst ...

    {{$rowIds = array();}}
    {{foreach $rows as $row}}
    	{{$idField = $row::$databaseColumnId;}}
    	{{$rowIds[] = $row->$idField;}}
    {{endforeach}}
    {{$iposted = $table ? $table->contentPostedIn : array();}}
    {{foreach $rows as $row}}
    	{{$idField = $row::$databaseColumnId;}}
    	<li class="cCmsRecord_row ipsDataItem ipsDataItem_responsivePhoto {{if $row->unread()}}ipsDataItem_unread{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}} {{if $row->hidden()}}ipsModerated{{endif}}" data-rowID='{$row->$idField}'>
    		{{if member.member_id}}
    			<div class='ipsDataItem_icon ipsPos_top'>
    				{{if $row->unread()}}
    					<a href='{$row->url( 'getNewComment' )}' title='{lang="first_unread_post"}' data-ipsTooltip>
    						<span class='ipsItemStatus'><i class="fa {{if \in_array( $row->$idField, $iposted )}}fa-star{{else}}fa-circle{{endif}}"></i></span>
    					</a>
    				{{else}}
    					{{if \in_array( $row->$idField, $iposted )}}
    						<span class='ipsItemStatus ipsItemStatus_read ipsItemStatus_posted'><i class="fa fa-star"></i></span>
    					{{else}}
    						 
    					{{endif}}
    				{{endif}}
    			</div>
    		{{endif}}
    		<div class='ipsDataItem_main'>
    			<h4 class='ipsDataItem_title ipsContained_container'>
    				{{if $row->locked()}}
    					<span><i class='fa fa-lock' data-ipsTooltip title='{lang="content_locked_record"}'></i></span>
    				{{endif}}
    
    				{{if $row->isFutureDate() || $row->mapped('pinned') || $row->mapped('featured') || $row->hidden() === -1 || $row->hidden() === 1}}
    					{{if $row->isFutureDate()}}
    						<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span></span>
    					{{elseif $row->hidden() === -1}}
    						<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span></span>
    					{{elseif $row->hidden() === 1}}
    						<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span></span>
    					{{endif}}							
    					{{if $row->mapped('pinned')}}
    						<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="pinned"}'><i class='fa fa-thumb-tack'></i></span></span>
    					{{endif}}
    					{{if $row->mapped('featured')}}
    						<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="featured"}'><i class='fa fa-star'></i></span></span>
    					{{endif}}
    				{{endif}}
    									
    				{{if $row->prefix()}}
    					<span>{template="prefix" group="global" app="core" params="$row->prefix( TRUE ), $row->prefix()"}</span>
    				{{endif}}
    				
    				<span class='ipsContained ipsType_break'>
    					<a href='{$row->url( "getPrefComment" )}'>
    						{{if $row->_title or $row->_title == 0}}{$row->_title}{{else}}<em class="ipsType_light">{lang="content_deleted"}</em>{{endif}}
    					</a>
    				</span>
    				{{if $row->commentPageCount() > 1}}
    					{$row->commentPagination( array(), 'miniPagination' )|raw}
    				{{endif}}
    			</h4>
    			
    			<div class='ipsDataItem_meta ipsType_reset ipsType_light ipsType_blendLinks'>     
                  <span>Gemeldet {datetime="$row->_publishDate"}</span>
                  {{if \count( $row->tags() )}}
                    
                  {template="tags" group="global" app="core" params="$row->tags(), true"}
                  {{endif}}
                  <br />Letztes Update
                  <a href='{$row->url( 'getLastComment' )}' title='{lang="get_last_post"}'>
                    {{if $row->database()->_comment_bump & \IPS\cms\Databases::BUMP_ON_COMMENT}}
                    {{if $row->mapped('num_comments')}}{datetime="$row->mapped('last_comment')"}{{else}}{datetime="$row->mapped('date')"}{{endif}}
                    {{else}}
                    {{if $row->record_edit_time > 0}}{datetime="$row->record_edit_time"}{{else}}{datetime="$row->mapped('date')"}{{endif}}
                    {{endif}}
                  </a>
    			</div>
    		</div>
          
    	    <ul class='ipsDataItem_lastPoster ipsDataItem_withPhoto ipsType_blendLinks'>
    	      {$row->customFieldDisplayByKey('bugtracker_status', 'listing')|raw}
    	    </ul>
            <ul class='ipsDataItem_stats'>
    		<div class='ipsResponsive_hidePhone ipsResponsive_hideTablet'>
    			{{foreach $row->stats(TRUE) as $k => $v}}
    				<li {{if \in_array( $k, $row->hotStats )}}class="ipsDataItem_stats_hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}}>
    					<span class='ipsDataItem_stats_number'>{number="$v"}</span>
    					<span class='ipsDataItem_stats_type'>{lang="content_records_stat_{$k}" pluralize="$v"}</span>
    				</li>
    			{{endforeach}}
    			{{if $row::database()->options['reviews']}}
    				<li>
    					<ul class='ipsList_inline ipsList_noSpacing_left ipsClearfix ipsRating ipsRating_{{if \IPS\Settings::i()->reviews_rating_out_of > 5}}small{{else}}large{{endif}}'>
    						{{foreach range( 1, \IPS\Settings::i()->reviews_rating_out_of ) as $i}}
    							<li class='{{if $row->averageReviewRating() >= $i}}ipsRating_on{{else}}ipsRating_off{{endif}}'>
    								<i class='fa fa-star'></i>
    							</li>
    						{{endforeach}}
    					</ul>
    				</li>
    				
    			{{elseif $row->container()->allow_rating}}
    				{template="rating" group="global" location="front" app="core" params="'large', $row->rating_value, \IPS\Settings::i()->reviews_rating_out_of"}
    			{{endif}}
            </div>  
    		</ul>
    
    		{{if $table and $table->canModerate()}}
    			<div class='ipsDataItem_modCheck'>
    				<span class='ipsCustomInput'>
    					<input type='checkbox' data-role='moderation' name="moderate[{$row->$idField}]" data-actions="{expression="implode( ' ', $table->multimodActions( $row ) )"}" data-state='{{if $row->tableStates()}}{$row->tableStates()}{{endif}}'>
    					<span></span>
    				</span>
    			</div>
    		{{endif}}
    	</li>
    {{endforeach}}

    Was genau hier passiert ist, seht ihr am einfachsten, indem ihr diese beiden Templates mit den Originalen vergleicht. Das müsst ihr natürlich nicht Zeile für Zeile selber tun, dafür gibt es Programme wie WinMerge, die euch das automatisch anzeigen.

    Ihr seht dann ganz genau, was entfernt und was dafür hinzugefügt wurde. Was genau erklärt sich aus dem Code von selbst. Und dadurch das ihr das so selber nachvollzieht, ist der Lerneffekt auch viel grösser, als wenn wir hier einen Schritt-für-Schritt-Changelog auflisten würden :winking-face:

    Bearbeitet von V0RT3X







  • Diese Seite empfehlen

    Dir gefällt InvisionFocus? Empfehle die Seite weiter!
×
×
  • Neu erstellen...

Wichtige Information

Um unsere Webseite für Sie optimal zu gestalten und fortlaufend verbessern zu können, verwenden wir Cookies. Durch die weitere Nutzung der Webseite stimmen Sie der Verwendung von Cookies zu. Weitere Informationen zu Cookies erhalten Sie in unserer Datenschutzerklärung.