Merge remote-tracking branch 'MarcMichalsky/improve_profile_list'
[#76] Improve profile list view
This commit is contained in:
commit
692c66a9a5
3 changed files with 16 additions and 3 deletions
|
@ -26,6 +26,7 @@ class CRM_Twingle_Page_Profiles extends CRM_Core_Page {
|
||||||
$profiles[$profile_id]['id'] = $profile_id;
|
$profiles[$profile_id]['id'] = $profile_id;
|
||||||
$profiles[$profile_id]['name'] = $profile->getName();
|
$profiles[$profile_id]['name'] = $profile->getName();
|
||||||
$profiles[$profile_id]['is_default'] = $profile->is_default();
|
$profiles[$profile_id]['is_default'] = $profile->is_default();
|
||||||
|
$profiles[$profile_id]['selectors'] = $profile->getProjectIds();
|
||||||
foreach (CRM_Twingle_Profile::allowedAttributes() as $attribute) {
|
foreach (CRM_Twingle_Profile::allowedAttributes() as $attribute) {
|
||||||
$profiles[$profile_id][$attribute] = $profile->getAttribute($attribute);
|
$profiles[$profile_id][$attribute] = $profile->getAttribute($attribute);
|
||||||
}
|
}
|
||||||
|
@ -33,6 +34,9 @@ class CRM_Twingle_Page_Profiles extends CRM_Core_Page {
|
||||||
$this->assign('profiles', $profiles);
|
$this->assign('profiles', $profiles);
|
||||||
$this->assign('profile_stats', CRM_Twingle_Profile::getProfileStats());
|
$this->assign('profile_stats', CRM_Twingle_Profile::getProfileStats());
|
||||||
|
|
||||||
|
// Add custom css
|
||||||
|
Civi::resources()->addStyleFile(E::LONG_NAME, 'css/twingle.css');
|
||||||
|
|
||||||
parent::run();
|
parent::run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
3
css/twingle.css
Normal file
3
css/twingle.css
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
.twingle-profile-list {
|
||||||
|
border-bottom: 1px solid #cfcec3;
|
||||||
|
}
|
|
@ -25,7 +25,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{ts domain="de.systopia.twingle"}Profile name{/ts}</th>
|
<th>{ts domain="de.systopia.twingle"}Profile name{/ts}</th>
|
||||||
<th>{ts domain="de.systopia.twingle"}Properties{/ts}</th>
|
<th>{ts domain="de.systopia.twingle"}Selectors{/ts}</th>
|
||||||
<th>{ts domain="de.systopia.twingle"}Used{/ts}</th>
|
<th>{ts domain="de.systopia.twingle"}Used{/ts}</th>
|
||||||
<th>{ts domain="de.systopia.twingle"}Last Used{/ts}</th>
|
<th>{ts domain="de.systopia.twingle"}Last Used{/ts}</th>
|
||||||
<th>{ts domain="de.systopia.twingle"}Operations{/ts}</th>
|
<th>{ts domain="de.systopia.twingle"}Operations{/ts}</th>
|
||||||
|
@ -35,10 +35,16 @@
|
||||||
{foreach from=$profiles item=profile}
|
{foreach from=$profiles item=profile}
|
||||||
{assign var="profile_id" value=$profile.id}
|
{assign var="profile_id" value=$profile.id}
|
||||||
{assign var="profile_name" value=$profile.name}
|
{assign var="profile_name" value=$profile.name}
|
||||||
<tr>
|
<tr class="twingle-profile-list">
|
||||||
<td>{$profile.name}</td>
|
<td>{$profile.name}</td>
|
||||||
<td>
|
<td>
|
||||||
<div><strong>{ts domain="de.systopia.twingle"}Selector{/ts}:</strong> {$profile.selector}</div>
|
{if not $profile.is_default}
|
||||||
|
<ul>
|
||||||
|
{foreach from=$profile.selectors item=selector}
|
||||||
|
<li><strong></strong> {$selector}</li>
|
||||||
|
{/foreach}
|
||||||
|
</ul>
|
||||||
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
<td>{ts domain="de.systopia.twingle"}{$profile_stats.$profile_name.access_counter_txt}{/ts}</td>
|
<td>{ts domain="de.systopia.twingle"}{$profile_stats.$profile_name.access_counter_txt}{/ts}</td>
|
||||||
<td>{ts domain="de.systopia.twingle"}{$profile_stats.$profile_name.last_access_txt}{/ts}</td>
|
<td>{ts domain="de.systopia.twingle"}{$profile_stats.$profile_name.last_access_txt}{/ts}</td>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue