@@ -7,7 +7,7 @@ |
||
| 7 | 7 | $link = $data['router']->generate('components_component', ['component' => $component]); |
| 8 | 8 | |
| 9 | 9 | echo "<li class=\"component\">"; |
| 10 | - echo "<a href=\"{$link}\">" . midcom::get()->i18n->get_string($component, $component) ." </a>\n"; |
|
| 10 | + echo "<a href=\"{$link}\">" . midcom::get()->i18n->get_string($component, $component) . " </a>\n"; |
|
| 11 | 11 | echo "<ul>\n"; |
| 12 | 12 | foreach ($elements as $name => $path) { |
| 13 | 13 | echo "<li>"; |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $formatter = $data['l10n']->get_formatter(); |
| 14 | 14 | echo '<p>' . $data['l10n']->get('last login') . ': ' . $formatter->datetime($lastlogin) . "</p>\n"; |
| 15 | 15 | } |
| 16 | - if ( $data['person']->id == midcom_connection::get_user() |
|
| 16 | + if ($data['person']->id == midcom_connection::get_user() |
|
| 17 | 17 | || midcom::get()->auth->can_user_do('org.openpsa.user:manage', null, org_openpsa_user_interface::class)) { |
| 18 | 18 | $workflow = new midcom\workflow\datamanager; |
| 19 | 19 | echo '<ul class="area_toolbar">'; |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | 'object' => $data['person'], |
| 23 | 23 | 'label' => $data['l10n']->get('account') |
| 24 | 24 | ]); |
| 25 | - echo '<li><a href="' . $data['router']->generate('account_delete', ['guid' => $data['person']->guid]). '" ' . $workflow->render_attributes() . '" class="button">'; |
|
| 25 | + echo '<li><a href="' . $data['router']->generate('account_delete', ['guid' => $data['person']->guid]) . '" ' . $workflow->render_attributes() . '" class="button">'; |
|
| 26 | 26 | echo '<span class="toolbar_label">' . $data['l10n_midcom']->get('delete') . '</span></a></li>'; |
| 27 | - if ( midcom::get()->config->get('auth_allow_trusted') === true |
|
| 27 | + if (midcom::get()->config->get('auth_allow_trusted') === true |
|
| 28 | 28 | && $data['person']->can_do('org.openpsa.user:su')) { |
| 29 | 29 | echo '<li><a class="button" href="' . $data['router']->generate('account_su', ['guid' => $data['person']->guid]) . '" />' . $data['l10n']->get('switch to user') . "</a></li>\n"; |
| 30 | 30 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | } else { |
| 34 | 34 | echo '<p><span class="metadata">' . $data['l10n']->get("no account") . '</span></p>'; |
| 35 | - if ( $data['person']->id == midcom_connection::get_user() |
|
| 35 | + if ($data['person']->id == midcom_connection::get_user() |
|
| 36 | 36 | || midcom::get()->auth->can_user_do('org.openpsa.user:manage', null, org_openpsa_user_interface::class)) { |
| 37 | 37 | $workflow = new midcom\workflow\datamanager; |
| 38 | 38 | echo '<ul class="area_toolbar">'; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $this->add_breadcrumb('', $this->_person->get_label()); |
| 37 | 37 | |
| 38 | 38 | $auth = midcom::get()->auth; |
| 39 | - if ( $this->_person->id == midcom_connection::get_user() |
|
| 39 | + if ($this->_person->id == midcom_connection::get_user() |
|
| 40 | 40 | || $auth->can_user_do('org.openpsa.user:manage', null, org_openpsa_user_interface::class)) { |
| 41 | 41 | $buttons = []; |
| 42 | 42 | $workflow = $this->get_workflow('datamanager'); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $delete_workflow = $this->get_workflow('delete', ['object' => $this->_person]); |
| 50 | 50 | $buttons[] = $delete_workflow->get_button($this->router->generate('user_delete', ['guid' => $this->_person->guid])); |
| 51 | 51 | } |
| 52 | - if ( midcom_connection::is_user($this->_person) |
|
| 52 | + if (midcom_connection::is_user($this->_person) |
|
| 53 | 53 | && $this->_person->can_do('midgard:privileges')) { |
| 54 | 54 | $buttons[] = $workflow->get_button($this->router->generate('user_privileges', ['guid' => $this->_person->guid]), [ |
| 55 | 55 | MIDCOM_TOOLBAR_LABEL => $this->_l10n->get("permissions"), |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | private function _populate_node_toolbar() |
| 22 | 22 | { |
| 23 | - if ( $this->_topic->can_do('midgard:update') |
|
| 23 | + if ($this->_topic->can_do('midgard:update') |
|
| 24 | 24 | && $this->_topic->can_do('midcom:component_config')) { |
| 25 | 25 | $workflow = $this->get_workflow('datamanager'); |
| 26 | 26 | $this->_node_toolbar->add_item($workflow->get_button($this->router->generate('config'), [ |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | $search_config = org_openpsa_widgets_ui::get_search_providers(); |
| 3 | -if ( array_key_exists('org.openpsa.documents', $search_config) |
|
| 3 | +if (array_key_exists('org.openpsa.documents', $search_config) |
|
| 4 | 4 | && midcom::get()->indexer->enabled()) { |
| 5 | 5 | $url = $data['router']->generate('search'); ?> |
| 6 | 6 | <div class="area" id="document_search"> |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | } |
| 59 | 59 | $this->_view_toolbar->add_items($buttons); |
| 60 | 60 | |
| 61 | - if ( $this->_topic->can_do('midgard:update') |
|
| 61 | + if ($this->_topic->can_do('midgard:update') |
|
| 62 | 62 | && $this->_topic->can_do('midcom:component_config')) { |
| 63 | 63 | $this->_node_toolbar->add_item($workflow->get_button($this->router->generate('config'), [ |
| 64 | 64 | MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('component configuration'), |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | ]; |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - if ( midcom::get()->auth->can_user_do('midgard:create', null, org_openpsa_contacts_person_dba::class) |
|
| 51 | + if (midcom::get()->auth->can_user_do('midgard:create', null, org_openpsa_contacts_person_dba::class) |
|
| 52 | 52 | && $this->group->can_do('midgard:create')) { |
| 53 | 53 | $buttons[] = $workflow->get_button($this->router->generate('person_new_group', ['guid' => $this->group->guid]), [ |
| 54 | 54 | MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('create person'), |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | $siteconfig = org_openpsa_core_siteconfig::get_instance(); |
| 60 | 60 | $user_url = $siteconfig->get_node_full_url('org.openpsa.user'); |
| 61 | - if ( $user_url |
|
| 61 | + if ($user_url |
|
| 62 | 62 | && midcom::get()->auth->can_user_do('org.openpsa.user:access', null, org_openpsa_user_interface::class)) { |
| 63 | 63 | $buttons[] = [ |
| 64 | 64 | MIDCOM_TOOLBAR_URL => $user_url . "group/{$this->group->guid}/", |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | ?> |
| 51 | 51 | |
| 52 | - <div class="field"><div class="title"><?php echo $data['l10n_midcom']->get('description');?>: </div> |
|
| 52 | + <div class="field"><div class="title"><?php echo $data['l10n_midcom']->get('description'); ?>: </div> |
|
| 53 | 53 | <div class="description value">&(view['description']:h);</div></div> |
| 54 | 54 | |
| 55 | 55 | <?php |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | // does the invoice have a cancelation invoice? |
| 66 | 66 | if ($cancelation_invoice_link) { |
| 67 | 67 | echo "<div class=\"field\">"; |
| 68 | - echo "<div class=\"title\">" . $data['l10n']->get('canceled by') .":</div>"; |
|
| 68 | + echo "<div class=\"title\">" . $data['l10n']->get('canceled by') . ":</div>"; |
|
| 69 | 69 | echo "<div class=\"value\">" . $cancelation_invoice_link . "</a></div>"; |
| 70 | 70 | echo "</div>"; |
| 71 | 71 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $canceled_invoice_link = $data['router']->generate('invoice', ['guid' => $canceled_invoice->guid]); |
| 75 | 75 | |
| 76 | 76 | echo "<div class=\"field\">"; |
| 77 | - echo "<div class=\"title\">" . $data['l10n']->get('cancelation invoice for') .":</div>"; |
|
| 77 | + echo "<div class=\"title\">" . $data['l10n']->get('cancelation invoice for') . ":</div>"; |
|
| 78 | 78 | echo "<div class=\"value\"><a href=\"" . $canceled_invoice_link . "\">" . $data['l10n']->get('invoice') . " " . $canceled_invoice->get_label() . "</a></div>"; |
| 79 | 79 | echo "</div>"; |
| 80 | 80 | } |
@@ -171,7 +171,7 @@ |
||
| 171 | 171 | { |
| 172 | 172 | $this->prepare_toolbar(false); |
| 173 | 173 | |
| 174 | - if ( $this->_topic->can_do('midgard:update') |
|
| 174 | + if ($this->_topic->can_do('midgard:update') |
|
| 175 | 175 | && $this->_topic->can_do('midcom:component_config')) { |
| 176 | 176 | $workflow = $this->get_workflow('datamanager'); |
| 177 | 177 | $this->_node_toolbar->add_item($workflow->get_button($this->router->generate('config'), [ |