Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel CAZAL
co2
Commits
1146f44e
Commit
1146f44e
authored
Feb 26, 2019
by
Raph El
Browse files
Amélioration gestion mails + interface admin
parent
cc7d9192
Changes
3
Hide whitespace changes
Inline
Side-by-side
config/CO2/params.json
View file @
1146f44e
...
...
@@ -521,6 +521,14 @@
"id"
:
"btn-mailerror"
,
"href"
:
"javascript:;"
,
"icon"
:
"envelope"
},
"notsendmail"
:{
"label"
:
"Not send mail"
,
"super"
:
true
,
"class"
:
"text-red"
,
"id"
:
"btn-notsendmail"
,
"href"
:
"javascript:;"
,
"icon"
:
"envelope"
}
},
"element"
:{
...
...
views/admin/notSendMail.php
View file @
1146f44e
...
...
@@ -15,12 +15,31 @@
<h4
id=
"errormsg"
></h4>
</div>
</div>
<div
class=
"pageTable col-md-12 col-sm-12 col-xs-12 padding-20 text-center"
></div>
<div
class=
"panel-body"
>
<div>
<table
class=
"table table-striped table-bordered table-hover directoryTable"
id=
"panelAdmin"
>
<thead>
<tr>
<th>
Email
</th>
<th>
Date
</th>
</tr>
</thead>
<tbody
class=
"directoryLines"
>
</tbody>
</table>
</div>
</div>
<div
class=
"pageTable col-md-12 col-sm-12 col-xs-12 padding-20"
></div>
</div>
<script
type=
"text/javascript"
>
var
results
=
<?php
echo
json_encode
(
$results
)
?>
;
jQuery
(
document
).
ready
(
function
()
{
setTitle
(
"
Not send mail
"
,
"
cog
"
);
initViewTable
(
results
);
$
(
"
#btn-valider
"
).
off
().
on
(
"
click
"
,
function
(){
$
(
"
#success
"
).
addClass
(
"
hidden
"
);
...
...
@@ -38,23 +57,58 @@ jQuery(document).ready(function() {
dataType
:
"
json
"
,
data
:
param
,
success
:
function
(
data
){
console
.
log
(
"
data
"
,
data
);
if
(
data
.
result
)
{
toastr
.
success
(
data
.
msg
);
$
(
"
#email
"
).
val
(
""
);
$
(
"
#success
"
).
removeClass
(
"
hidden
"
);
$
(
"
#error
"
).
addClass
(
"
hidden
"
);
if
(
data
.
res
.
result
)
{
toastr
.
success
(
data
.
res
.
msg
);
location
.
reload
();
}
else
{
$
(
"
#error
"
).
removeClass
(
"
hidden
"
);
$
(
"
#success
"
).
addClass
(
"
hidden
"
);
toastr
.
error
(
data
.
msg
);
$
(
"
#errormsg
"
).
html
(
data
.
msg
);
toastr
.
error
(
data
.
res
.
msg
);
$
(
"
#errormsg
"
).
html
(
data
.
res
.
msg
);
}
}
});
});
});
function
initViewTable
(
data
){
$
(
'
#panelAdmin .directoryLines
'
).
html
(
""
);
$
.
each
(
data
,
function
(
key
,
values
){
entry
=
buildDirectoryLine
(
key
,
values
);
$
(
"
#panelAdmin .directoryLines
"
).
append
(
entry
);
});
//bindAdminBtnEvents();
}
function
buildDirectoryLine
(
key
,
e
){
mylog
.
log
(
"
here
"
,
e
);
strHTML
=
""
;
});
\ No newline at end of file
actions
=
""
;
classes
=
""
;
strHTML
+=
'
<tr id="
'
+
key
+
'
">
'
;
strHTML
+=
'
<td>
'
+
e
.
target
.
email
+
'
</td>
'
;
strHTML
+=
'
<td class="center status">
'
+
moment
(
e
.
date
).
local
().
format
(
"
DD-MM-YYYY HH:mm
"
);
strHTML
+=
'
</td>
'
;
/* **************************************
* ACTIONS
***************************************** */
// if(searchAdmin.mode=="source"){
// action='
<
button
data
-
id
=
"
'+id+'
"
data
-
type
=
"
'+type+'
"
data
-
action
=
"
remove
"
data
-
setkey
=
"
source
"
class
=
"
margin-right-5 setSourceAdmin btn bg-red text-white
"
><
i
class
=
"
fa fa-ban
"
><
/i> Remove from source</
button
>
'
;
// }else if (searchAdmin.mode=="reference"){
// action=
'
<
button
data
-
id
=
"
'+id+'
"
data
-
type
=
"
'+type+'
"
data
-
action
=
"
remove
"
data
-
setkey
=
"
reference
"
class
=
"
margin-right-5 setSourceAdmin btn bg-red text-white
"
><
i
class
=
"
fa fa-ban
"
><
/i> Remove from reference</
button
>
'
;
// }
// else if (searchAdmin.mode=="open"){
// action=
'
<
button
data
-
id
=
"
'+id+'
"
data
-
type
=
"
'+type+'
"
data
-
action
=
"
add
"
data
-
setkey
=
"
reference
"
class
=
"
margin-right-5 setSourceAdmin btn bg-green text-white
"
><
i
class
=
"
fa fa-plus
"
><
/i> Add as reference</
button
>
'
;
// }
// strHTML +=
'
<
td
class
=
"
center
"
>
'
;
// strHTML +=
'
<
div
class
=
"
btn-group
"
>
'
+action
//
'
<
/div>'
;
// strHTML += '
<
/td>'
;
strHTML
+=
'
</tr>
'
;
return
strHTML
;
}
\ No newline at end of file
views/admin/referenceTable.php
View file @
1146f44e
...
...
@@ -67,6 +67,7 @@ $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.';
<?php
foreach
(
$typeDirectory
as
$value
)
{
?>
<a
href=
"javascript:;"
onclick=
"applyStateFilter('
<?php
echo
$value
?>
')"
class=
"filter
<?php
echo
$value
?>
btn btn-xs btn-default active btncountsearch"
>
<?php
echo
$value
?>
<span
class=
"badge badge-warning countPeople"
id=
"count
<?php
echo
$value
?>
"
>
<?php
echo
@
$results
[
"count"
][
$value
]
?>
</span></a>
<?php
}
?>
<a
href=
"
<?php
echo
Yii
::
app
()
->
request
->
baseUrl
.
'/dda/co/getproposals/format/csv'
;
?>
"
target=
"_blank"
id=
"csv"
><i
class=
'fa fa-2x fa-table text-green'
></i></a></span>
</div>
<div
class=
"pageTable col-md-12 col-sm-12 col-xs-12 padding-20 text-center"
></div>
<div
class=
"panel-body"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment