diff --git a/CRM/Twingle/Page/Profiles.php b/CRM/Twingle/Page/Profiles.php index eb5bf0c..49396d4 100644 --- a/CRM/Twingle/Page/Profiles.php +++ b/CRM/Twingle/Page/Profiles.php @@ -20,8 +20,11 @@ class CRM_Twingle_Page_Profiles extends CRM_Core_Page { public function run() { CRM_Utils_System::setTitle(E::ts("Twingle API Profiles")); $profiles = []; - foreach (CRM_Twingle_Profile::getProfiles() as $profile_name => $profile) { - $profiles[$profile_name]['name'] = $profile_name; + foreach (CRM_Twingle_Profile::getProfiles() as $profile_id => $profile) { + $profiles[$profile_id]['id'] = $profile_id; + $profiles[$profile_id]['name'] = $profile->getName(); + $profiles[$profile_id]['is_default'] = $profile->is_default(); + $profiles[$profile_id]['selectors'] = $profile->getProjectIds(); foreach (CRM_Twingle_Profile::allowedAttributes() as $attribute) { $profiles[$profile_name][$attribute] = $profile->getAttribute($attribute); } diff --git a/templates/CRM/Twingle/Page/Profiles.tpl b/templates/CRM/Twingle/Page/Profiles.tpl index b5b869e..992fe64 100644 --- a/templates/CRM/Twingle/Page/Profiles.tpl +++ b/templates/CRM/Twingle/Page/Profiles.tpl @@ -25,7 +25,7 @@ {ts domain="de.systopia.twingle"}Profile name{/ts} - {ts domain="de.systopia.twingle"}Properties{/ts} + {ts domain="de.systopia.twingle"}Selectors{/ts} {ts domain="de.systopia.twingle"}Used{/ts} {ts domain="de.systopia.twingle"}Last Used{/ts} {ts domain="de.systopia.twingle"}Operations{/ts} @@ -34,10 +34,16 @@ {foreach from=$profiles item=profile} {assign var="profile_name" value=$profile.name} - + {$profile.name} -
{ts domain="de.systopia.twingle"}Selector{/ts}: {$profile.selector}
+ {if not $profile.is_default} + + {/if} {ts domain="de.systopia.twingle"}{$profile_stats.$profile_name.access_counter_txt}{/ts} {ts domain="de.systopia.twingle"}{$profile_stats.$profile_name.last_access_txt}{/ts}