Skip to content

Commit

Permalink
shop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Praesidiarius committed Mar 9, 2020
1 parent 023abf5 commit 29b39d9
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 12 deletions.
12 changes: 12 additions & 0 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,16 @@
'contact-request' => __DIR__ . '/../view',
],
],

# Translator
'translator' => [
'locale' => 'de_DE',
'translation_file_patterns' => [
[
'type' => 'gettext',
'base_dir' => __DIR__ . '/../language',
'pattern' => '%s.mo',
],
],
],
];
15 changes: 4 additions & 11 deletions data/install.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,13 @@
-- Add new tab
--
INSERT INTO `core_form_tab` (`Tab_ID`, `form`, `title`, `subtitle`, `icon`, `counter`, `sort_id`, `filter_check`, `filter_value`) VALUES
('contact-request', 'contact-single', 'Request', 'Recent Contact', 'fas fa-request', '', '1', '', '');
('contact-request', 'contact-single', 'Requests', 'Recent Requests', 'fas fa-envelope', '', '1', '', '');

--
-- Add new partial
--
INSERT INTO `core_form_field` (`Field_ID`, `type`, `label`, `fieldkey`, `tab`, `form`, `class`, `url_view`, `url_list`, `show_widget_left`, `allow_clear`, `readonly`, `tbl_cached_name`, `tbl_class`, `tbl_permission`) VALUES
(NULL, 'partial', 'Request', 'contact_request', 'contact-request', 'contact-single', 'col-md-12', '', '', '0', '1', '0', '', '', '');

--
-- add button
--
INSERT INTO `core_form_button` (`Button_ID`, `label`, `icon`, `title`, `href`, `class`, `append`, `form`, `mode`, `filter_check`, `filter_value`) VALUES
(NULL, 'Add Request', 'fas fa-request', 'Add Request', '/contact/request/add/##ID##', 'primary', '', 'contact-view', 'link', '', ''),
(NULL, 'Save Request', 'fas fa-save', 'Save Request', '#', 'primary saveForm', '', 'contactrequest-single', 'link', '', '');
(NULL, 'partial', 'Requests', 'contact_request', 'contact-request', 'contact-single', 'col-md-12', '', '', '0', '1', '0', '', '', '');

--
-- create request table
Expand All @@ -41,13 +34,13 @@ ALTER TABLE `contact_request`
-- add request form
--
INSERT INTO `core_form` (`form_key`, `label`, `entity_class`, `entity_tbl_class`) VALUES
('contactrequest-single', 'Contact Request', 'OnePlace\\Contact\\Request\\Model\\Request', 'OnePlace\\Contact\\Request\\Model\\RequestTable');
('contactrequest-single', 'Contact Requests', 'OnePlace\\Contact\\Request\\Model\\Request', 'OnePlace\\Contact\\Request\\Model\\RequestTable');

--
-- add form tab
--
INSERT INTO `core_form_tab` (`Tab_ID`, `form`, `title`, `subtitle`, `icon`, `counter`, `sort_id`, `filter_check`, `filter_value`) VALUES
('request-base', 'contactrequest-single', 'Request', 'Recent Contact', 'fas fa-request', '', '1', '', '');
('request-base', 'contactrequest-single', 'Requests', 'Recent Requests', 'fas fa-envelope', '', '1', '', '');

--
-- add address fields
Expand Down
Binary file added language/de_DE.mo
Binary file not shown.
27 changes: 27 additions & 0 deletions language/de_DE.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: de_DE\n"
"X-Generator: Poedit 2.2.4\n"

msgid "Request"
msgstr "Anfrage"

msgid "Requests"
msgstr "Anfragen"

msgid "Recent Requests"
msgstr "Neuste Anfragen"

msgid "Contact Requests"
msgstr "Kontakt Anfragen"

msgid "No Requests yet"
msgstr "Bisher keine Anfragen"
8 changes: 7 additions & 1 deletion view/partial/contact_request-view.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if(array_key_exists('contact_request',$this->aPartialData)) {

if(count($aHistories) == 0) { ?>
<div class="alert alert-info px-2 py-2">
<?=$this->translate('No Request yet')?>
<?=$this->translate('No Requests yet')?>
</div>
<?php } else { ?>
<ul class="list-group">
Expand All @@ -24,4 +24,10 @@ if(array_key_exists('contact_request',$this->aPartialData)) {
</ul>
<?php
}
}else { ?>
<div class="alert alert-danger px-2 py-2">
<?= $this->translate('Could not load request data') ?>
</div>
<?php
}

0 comments on commit 29b39d9

Please sign in to comment.