Commit 25618b6a authored by Alexis Ragot's avatar Alexis Ragot

fix conf && fix sql && fix css && fix minor

parent 85ee27db
[dependency.datasource]
@Adapter = Database
Dsn = %dsn%
Username = %username%
Password = %password%
\ No newline at end of file
[dependency.fileSystem]
; Path to the UK National Archives DROID signature file for file format detection
; Droid signature files can be found at http://www.nationalarchives.gov.uk/aboutapps/pronom/droid-signature-files.htm
signatureFile = "%laabsDirectory%/data/maarchRM/droidSignatureFiles/DROID_SignatureFile_V91.xml"
containerSignatureFile = "%laabsDirectory%/data/maarchRM/droidSignatureFiles/container-signature-20170330.xml"
; Path to libreOffice executable
;libreOfficeExecutable = "c:\Program Files (x86)\LibreOffice 5\program\soffice"
libreOfficeExecutable = "/usr/bin/libreoffice"
; Conversion paths
conversionServices = "[
{
'serviceName' : 'dependency/fileSystem/plugins/libreOffice',
'softwareName' : 'LibreOffice',
'softwareVersion' : '5.4.2.0',
'inputFormats' : ['fmt/412', 'fmt/291', 'fmt/293'],
'outputFormats' : {
'fmt/95' : {
'extension' : 'pdf',
'filter' : 'writer_pdf_Export',
'options': 'SelectPdfVersion=1'
},
'fmt/18' : {
'extension' : 'pdf'
}
}
}
]"
; Path to Clam antivirus executable
clamScan = "C:\Program Files (x86)\ClamWin\bin\clamscan.exe"
clamDb = "C:\ProgramData\.clamwin\db"
tikaJarFile = "%laabsDirectory%/dependency/fileSystem/plugins/tika/tika-app-1.16.jar"
;zipExecutable = "C:\Program Files\7-Zip\7z.exe"
\ No newline at end of file
[dependency.html]
headers = "['dashboard/head.html']"
layout = "dashboard/layout.html"
layoutData = "presentation/dashboard/layout"
plugins = "{
'dataTable' : '\dependency\html\plugins\DataTable\DataTable',
'dataList' : '\dependency\html\plugins\DataList\DataList',
'datePicker' : '\dependency\html\plugins\datePicker\datePicker',
'dateRangePicker' : '\dependency\html\plugins\dateRangePicker\dateRangePicker'
}"
layoutReferer = "['/user/prompt', '/user/logout']"
[dependency.json]
Options = JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_FORCE_OBJECT
[dependency.localisation]
@Adapter = Gettext
lang = fr
dateFormat = d-m-Y
[dependency.logger]
loggers = "{
'importCustomerRecords' : {
'level' : 'INFO',
'appenders' : [ 'importCustomerRecordsFile' ],
'additivity' : false
}
}"
appenders = "{
'default' : {
'class' : 'LoggerAppenderFile',
'layout' : {
'class' : 'LoggerLayoutSimple'
},
'params' : {
'file' : '/var/www/laabs/data/redgreen/log4php.txt',
'append' : true
}
},
'importCustomerRecordsFile' : {
'class' : 'LoggerAppenderDailyFile',
'layout' : {
'class' : 'LoggerLayoutPattern',
'params' : {
'conversionPattern' : '[%date{d/m/Y H:i:s}] %-5p [%t] %message %newline'
}
},
'params' : {
'datePattern' : 'Y-m-d',
'file' : '/var/www/laabs/data/maarchRM/importMapping-%s.log',
'append' : true
}
}
}"
\ No newline at end of file
[dependency.notification]
@Adapter = Mailer
mailHost = 'smtp.gmail.com'
mailUsername = 'notifications2@maarch.org';
mailPassword = '$rW4%r8RD*';
mailPort = 587;
mailSender = "notifications2@maarch.org";
mailAdminReceiver = "alexis.ragot@maarch.org";
mailSMTPAuth = true;
mailSMTPSecure = "tls";
;Pour laposte
;mailHost = 'smtp.laposte.com';
;mailPort = 25;
;SMTPSecure = "tls";
;mailSMTPAuth = true;
;Pour gmail
;mailHost = 'smtp.gmail.com';
;mailPort = 587;
;SMTPSecure = "tls";
;mailSMTPAuth = true;
[dependency.repository]
@Adapter = Repository
\ No newline at end of file
[dependency.sdo]
@Adapter = Database
Dsn = %dsn%
Username = %username%
Password = %password%
; Auto generate ids before create operation
; 0/false/Off = never generate ids
; 1/true/On = generates ids when no id is set on object
generateKey = on
; Sets the boolean storage method
; 0 : as integer 0 | 1
; 1 : as boolean true |false
; 2 : as char Y / N
boolFormat = 1
dateFormat = YYYY-MM-DD
timeFormat = HH24:MI:SS
datetimeFormat = "YYYY-MM-DD HH24:MI:SS,US"
; Log events in Laabs log
; 0 = no trace
; 1 = trace only errors
; 2 = trace queries
; 3 = dump queries
trace = 1
; Declare variables for database connection
@include confvars.ini
; Include external app config files for dependencies
; !! These files declare directives in sections, so all root directives must be declared before
; otherwise they will be included on the last opened section
@include conf.d
[presentation.maarchRM]
@include menu.ini
......@@ -137,4 +131,164 @@ securityPolicy = "{
chainJournalByOrganization = false;
; Chain journal with timestamp file. The timestamp dependency must be configured.
chainWithTimestamp = false;
\ No newline at end of file
chainWithTimestamp = false;
[dependency.datasource]
@Adapter = Database
Dsn = %dsn%
Username = %username%
Password = %password%
[dependency.fileSystem]
; Path to the UK National Archives DROID signature file for file format detection
; Droid signature files can be found at http://www.nationalarchives.gov.uk/aboutapps/pronom/droid-signature-files.htm
signatureFile = "%laabsDirectory%/data/maarchRM/droidSignatureFiles/DROID_SignatureFile_V91.xml"
containerSignatureFile = "%laabsDirectory%/data/maarchRM/droidSignatureFiles/container-signature-20170330.xml"
; Path to libreOffice executable
;libreOfficeExecutable = "c:\Program Files (x86)\LibreOffice 5\program\soffice"
libreOfficeExecutable = "/usr/bin/libreoffice"
; Conversion paths
conversionServices = "[
{
'serviceName' : 'dependency/fileSystem/plugins/libreOffice',
'softwareName' : 'LibreOffice',
'softwareVersion' : '5.4.2.0',
'inputFormats' : ['fmt/412', 'fmt/291', 'fmt/293'],
'outputFormats' : {
'fmt/95' : {
'extension' : 'pdf',
'filter' : 'writer_pdf_Export',
'options': 'SelectPdfVersion=1'
},
'fmt/18' : {
'extension' : 'pdf'
}
}
}
]"
; Path to Clam antivirus executable
clamScan = "C:\Program Files (x86)\ClamWin\bin\clamscan.exe"
clamDb = "C:\ProgramData\.clamwin\db"
tikaJarFile = "%laabsDirectory%/dependency/fileSystem/plugins/tika/tika-app-1.16.jar"
;zipExecutable = "C:\Program Files\7-Zip\7z.exe"
[dependency.html]
headers = "['dashboard/head.html']"
layout = "dashboard/layout.html"
layoutData = "presentation/dashboard/layout"
plugins = "{
'dataTable' : '\dependency\html\plugins\DataTable\DataTable',
'dataList' : '\dependency\html\plugins\DataList\DataList',
'datePicker' : '\dependency\html\plugins\datePicker\datePicker',
'dateRangePicker' : '\dependency\html\plugins\dateRangePicker\dateRangePicker'
}"
layoutReferer = "['/user/prompt', '/user/logout']"
[dependency.json]
Options = JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_FORCE_OBJECT
[dependency.localisation]
@Adapter = Gettext
lang = fr
dateFormat = d-m-Y
[dependency.logger]
loggers = "{
'importCustomerRecords' : {
'level' : 'INFO',
'appenders' : [ 'importCustomerRecordsFile' ],
'additivity' : false
}
}"
appenders = "{
'default' : {
'class' : 'LoggerAppenderFile',
'layout' : {
'class' : 'LoggerLayoutSimple'
},
'params' : {
'file' : '/var/www/laabs/data/redgreen/log4php.txt',
'append' : true
}
},
'importCustomerRecordsFile' : {
'class' : 'LoggerAppenderDailyFile',
'layout' : {
'class' : 'LoggerLayoutPattern',
'params' : {
'conversionPattern' : '[%date{d/m/Y H:i:s}] %-5p [%t] %message %newline'
}
},
'params' : {
'datePattern' : 'Y-m-d',
'file' : '/var/www/laabs/data/maarchRM/importMapping-%s.log',
'append' : true
}
}
}"
[dependency.notification]
@Adapter = Mailer
mailHost = 'smtp.gmail.com'
mailUsername = '';
mailPassword = '';
mailPort = 587;
mailSender = "";
mailAdminReceiver = "";
mailSMTPAuth = true;
mailSMTPSecure = "tls";
;Pour laposte
;mailHost = 'smtp.laposte.com';
;mailPort = 25;
;SMTPSecure = "tls";
;mailSMTPAuth = true;
;Pour gmail
;mailHost = 'smtp.gmail.com';
;mailPort = 587;
;SMTPSecure = "tls";
;mailSMTPAuth = true;
[dependency.repository]
@Adapter = Repository
[dependency.sdo]
@Adapter = Database
Dsn = %dsn%
Username = %username%
Password = %password%
; Auto generate ids before create operation
; 0/false/Off = never generate ids
; 1/true/On = generates ids when no id is set on object
generateKey = on
; Sets the boolean storage method
; 0 : as integer 0 | 1
; 1 : as boolean true |false
; 2 : as char Y / N
boolFormat = 1
dateFormat = YYYY-MM-DD
timeFormat = HH24:MI:SS
datetimeFormat = "YYYY-MM-DD HH24:MI:SS,US"
; Log events in Laabs log
; 0 = no trace
; 1 = trace only errors
; 2 = trace queries
; 3 = dump queries
trace = 1
\ No newline at end of file
-- Auth
-- Audit
DELETE FROM "audit"."event";
-- Auth
DELETE FROM "auth"."publicUserStory";
DELETE FROM "auth"."roleMember";
DELETE FROM "auth"."privilege";
......
This diff is collapsed.
......@@ -13,10 +13,10 @@
@gray-light: lighten(#000, 60%); // #999
@gray-lighter: lighten(#000, 93.5%); // #eee
@brand-primary: #017a97;
@brand-primary: #24b0ed;
@brand-success: #5cb85c;
@brand-info: #5bc0de;
@brand-warning: #f0ad4e;
@brand-info: #23aae5;
@brand-warning: #f99830;
@brand-danger: #d9534f;
......
......@@ -88,4 +88,4 @@
// set theme
@template-bg: #017A97;
@template-bg: #24b0ed;
......@@ -235,13 +235,43 @@ trait archiveAccessTrait
$queryParts[] = "originatorArchiveId='".$args['originatorArchiveId']."'";
}
if (!empty($args['originatingDate'])) {
if (!empty($args['originatingDate'][0])) {
if (!empty($args['originatingDate'][0]) && is_string($args['originatingDate'][0])) {
$args['originatingDate'][0] = \laabs::newDate($args['originatingDate'][0]);
}
if (!empty($args['originatingDate'][1]) && is_string($args['originatingDate'][1])) {
$args['originatingDate'][1] = \laabs::newDate($args['originatingDate'][1]);
}
if (!empty($args['originatingDate'][0])) { // originatingStartDate
$args['originatingDate'][0] = $args['originatingDate'][0]->format('Y-m-d');
$queryParts[] = "originatingDate>='".$args['originatingDate'][0]."'";
}
if (!empty($args['originatingDate'][1])) {
if (!empty($args['originatingDate'][1])) { // originatingEndDate
$args['originatingDate'][1] = $args['originatingDate'][1]->format('Y-m-d');
$queryParts[] = "originatingDate<='".$args['originatingDate'][1]."'";
}
}
if (!empty($args['depositStartDate']) && is_string($args['depositStartDate'])) {
$args['depositStartDate'] = \laabs::newDate($args['depositStartDate']);
}
if (!empty($args['depositEndDate']) && is_string($args['depositEndDate'])) {
$args['depositEndDate'] = \laabs::newDate($args['depositEndDate']);
}
if (!empty($args['depositStartDate']) && !empty($args['depositEndDate'])) {
$args['depositStartDate'] = $args['depositStartDate']->format('Y-m-d').'T00:00:00';
$args['depositEndDate'] = $args['depositEndDate']->format('Y-m-d').'T23:59:59';
$queryParts[] = "depositDate <= '".$args['depositEndDate']."' AND depositDate >= '".$args['depositStartDate']."'";
} elseif (!empty($args['depositStartDate'])) {
$args['depositStartDate'] = $args['depositStartDate']->format('Y-m-d').'T00:00:00';
$queryParts[] = "depositDate >= '".$args['depositStartDate']."'";
} elseif (!empty($args['depositEndDate'])) {
$args['depositEndDate'] = $args['depositEndDate']->format('Y-m-d').'T23:59:59';
$queryParts[] = "depositDate <= '".$args['depositEndDate']."'";
}
if (!empty($args['depositorOrgRegNumber'])) {
$queryParts[] = "depositorOrgRegNumber='".$args['depositorOrgRegNumber']."'";
}
......
......@@ -44,6 +44,11 @@ trait archiveCommunicationTrait
* @param string $description
* @param string $text
* @param bool $partialRetentionRule
* @param string $retentionRuleCode
* @param string $depositStartDate
* @param string $depositEndDate
* @param string $originatingStartDate
* @param string $originatingEndDate
*
* @return recordsManagement/archive[]
*/
......@@ -63,7 +68,11 @@ trait archiveCommunicationTrait
$description = null,
$text = null,
$partialRetentionRule = null,
$retentionRuleCode = null
$retentionRuleCode = null,
$depositStartDate = null,
$depositEndDate = null,
$originatingStartDate = null,
$originatingEndDate = null
) {
$archives = [];
......@@ -82,8 +91,10 @@ trait archiveCommunicationTrait
'hasParent' => $hasParent,
'partialRetentionRule' => $partialRetentionRule,
'retentionRuleCode' => $retentionRuleCode,
'depositStartDate' => $depositStartDate,
'depositEndDate' => $depositEndDate,
'originatingDate' => [$originatingStartDate, $originatingEndDate], // [0] startDate, [1] endDate
];
if (!empty($description) || !empty($text)) {
$searchClasses = [];
if (!$profileReference) {
......
......@@ -48,6 +48,10 @@ interface archivesInterface
* @param string $text
* @param bool $partialRetentionRule
* @param string $retentionRuleCode
* @param string $depositStartDate
* @param string $depositEndDate
* @param string $originatingStartDate
* @param string $originatingEndDate
*
* @action recordsManagement/archive/search
*
......@@ -68,7 +72,10 @@ interface archivesInterface
$description = null,
$text = null,
$partialRetentionRule = null,
$retentionRuleCode = null
$depositStartDate = null,
$depositEndDate = null,
$originatingStartDate = null,
$originatingEndDate = null
);
/*
......
......@@ -697,4 +697,4 @@ msgid "Passwords are not the same"
msgstr "Les mots de passe sont pas identiques"
msgid "Display only activated users"
msgstr "Afficher uniquement les utilisateurs actis"
msgstr "Afficher uniquement les utilisateurs actifs"
......@@ -21,6 +21,12 @@
<div class="collapse navbar-collapse" id='leMenu'>
<ul class="nav navbar-nav navbar-right" style="cursor: pointer;">
<?merge .menu.bool() ?>
<li>
<a class="" onclick="load('/', 'HTML_NO_LAYOUT')">
<i class="fa fa-home fa-fw" ></i>
</a>
</li>
<?merge .menu ?>
<li class="[?merge ['submenu'].count().bool().then('dropdown') ?]">
<a class="dropdown-toggle" data-href="[?merge ['href'] ?]" onclick="load('[?merge ['href'] ?]');" data-toggle="dropdown" role="button" aria-expanded="false">
......
......@@ -85,9 +85,6 @@
</select>
</div>
</div>
<br/>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="col-sm-4 control-label">Final disposition</label>
<div class="col-sm-6">
......@@ -111,6 +108,27 @@
</select>
</div>
</div>
<br/>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="col-sm-4 control-label">Deposit date</label>
<div class="col-sm-4">
<input type="text" class="form-control datePicker" name="depositStartDate" placeholder="From date"/>
</div>
<div class="col-sm-4">
<input type="text" class="form-control datePicker" name="depositEndDate" placeholder="To date"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">Originating date</label>
<div class="col-sm-4">
<input type="text" class="form-control datePicker" name="originatingStartDate" placeholder="From date"/>
</div>
<div class="col-sm-4">
<input type="text" class="form-control datePicker" name="originatingEndDate" placeholder="To date"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label"></label>
<div class="btn-group col-sm-6" data-toggle="buttons">
......@@ -215,7 +233,8 @@
$.ajax({
type : 'GET',
url : '/recordsManagement/archives',
data : $("#archive_searchForm").serialize(),
//data : $("#archive_searchForm").serialize(),
data : searchFormSerialize(),
dataType : 'html',
success : function (response) {
$('#archive_searchResult').empty().html(response);
......@@ -233,6 +252,24 @@
$('#archive_searchForm').find('input[type="checkbox"]').bootstrapToggle('off');
$('#archive_searchResult').empty();
});
function searchFormSerialize() {
var parameters = new Object();
$('#archive_searchForm').find('input[type="text"], input[type="number"], select').each(function(){
parameters[$(this).attr('name')] = $(this).val();
});
$('#archive_searchForm').find('input[type="checkbox"]').each(function(){
parameters[$(this).attr('name')] = $(this).prop("checked");
});
parameters.archiveExpired = $("#archive_searchForm [name=archiveExpired]:checked").val();
parameters.depositStartDate = $("#archive_searchForm [name=depositStartDate]").data('datepicker').getFormattedDate('yyyy-mm-dd');
parameters.depositEndDate = $("#archive_searchForm [name=depositEndDate]").data('datepicker').getFormattedDate('yyyy-mm-dd');
parameters.originatingStartDate = $("#archive_searchForm [name=originatingStartDate]").data('datepicker').getFormattedDate('yyyy-mm-dd');
parameters.originatingEndDate = $("#archive_searchForm [name=originatingEndDate]").data('datepicker').getFormattedDate('yyyy-mm-dd');
return parameters;
}
/* ----------------------------------------------------------------------------------------------------*/
/* -- VALIDATION MODAL -- */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment