Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
c4da5416
Commit
c4da5416
authored
Jan 06, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
romain_dev: forum
parent
ff430e9d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1324 additions
and
3 deletions
+1324
-3
bt5/romain_dev/PathTemplateItem/web_page_module/romain_forum_html.html
...v/PathTemplateItem/web_page_module/romain_forum_html.html
+29
-0
bt5/romain_dev/PathTemplateItem/web_page_module/romain_forum_html.xml
...ev/PathTemplateItem/web_page_module/romain_forum_html.xml
+336
-0
bt5/romain_dev/PathTemplateItem/web_page_module/romain_forum_js.js
...n_dev/PathTemplateItem/web_page_module/romain_forum_js.js
+615
-0
bt5/romain_dev/PathTemplateItem/web_page_module/romain_forum_js.xml
..._dev/PathTemplateItem/web_page_module/romain_forum_js.xml
+338
-0
bt5/romain_dev/bt/template_keep_last_workflow_history_only_path_list
...dev/bt/template_keep_last_workflow_history_only_path_list
+2
-1
bt5/romain_dev/bt/template_keep_workflow_path_list
bt5/romain_dev/bt/template_keep_workflow_path_list
+2
-1
bt5/romain_dev/bt/template_path_list
bt5/romain_dev/bt/template_path_list
+2
-1
No files found.
bt5/romain_dev/PathTemplateItem/web_page_module/romain_forum_html.html
0 → 100644
View file @
c4da5416
<!DOCTYPE html>
<html>
<!--
data-i18n=Others
-->
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<title>
ERP5 PT Frontpage
</title>
<link
rel=
"http://www.renderjs.org/rel/interface"
href=
"interface_page.html"
>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<!--link rel="stylesheet" href="gadget_erp5_page_nx_project_quality.css"-->
<!-- custom script -->
<script
src=
"jiodev.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_global.js"
type=
"text/javascript"
></script>
<script
src=
"domsugar.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_erp5_page_nx_forum.js"
type=
"text/javascript"
></script>
</head>
<body>
<ul>
</ul>
</body>
</html>
\ No newline at end of file
bt5/romain_dev/PathTemplateItem/web_page_module/romain_forum_html.xml
0 → 100644
View file @
c4da5416
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Page"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_erp5_page_nx_forum.html
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
romain_forum_html
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Page
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Forum Reader
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish_alive
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1609424889.61
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published_alive
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
989.1604.35674.62737
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1609424915.53
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
empty
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1609424496.86
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/romain_dev/PathTemplateItem/web_page_module/romain_forum_js.js
0 → 100644
View file @
c4da5416
/*global window, rJS, RSVP, domsugar, SimpleQuery, ComplexQuery, Query,
console */
/*jslint nomen: true, indent: 2, maxerr: 3, maxlen: 80, continue:true */
(
function
(
window
,
rJS
,
RSVP
,
domsugar
,
SimpleQuery
,
ComplexQuery
,
Query
)
{
"
use strict
"
;
// XXX history_previous: prevent getting to erp5 ui by checking the
// historing or forcing the page value
// XXX create topic by followup (allDocs group by follow up)
var
DISPLAY_READER
=
'
display_reader
'
,
MAIN_SCOPE
=
'
child_scope
'
;
function
loadChildGadget
(
gadget
,
gadget_url
,
must_declare
,
callback
)
{
var
queue
,
child_gadget
;
if
(
must_declare
)
{
queue
=
gadget
.
declareGadget
(
gadget_url
,
{
scope
:
MAIN_SCOPE
});
}
else
{
queue
=
gadget
.
getDeclaredGadget
(
MAIN_SCOPE
);
}
return
queue
.
push
(
function
(
result
)
{
child_gadget
=
result
;
if
(
callback
)
{
return
callback
(
result
);
}
})
.
push
(
function
(
result
)
{
if
(
must_declare
)
{
domsugar
(
gadget
.
element
,
[
child_gadget
.
element
]);
}
return
result
;
});
}
function
renderDiscussionThreadList
(
gadget
,
must_declare
)
{
return
loadChildGadget
(
gadget
,
"
gadget_erp5_pt_form_view.html
"
,
must_declare
,
function
(
form_gadget
)
{
var
group_list
=
[],
field_dict
=
{},
column_list
=
[
[
'
title
'
,
'
Title
'
],
[
'
DiscussionThread_getDiscussionPostCount
'
,
'
Responses
'
],
[
'
modification_date
'
,
'
Modification Date
'
]
];
field_dict
.
listbox
=
{
"
column_list
"
:
column_list
,
"
show_anchor
"
:
0
,
"
default_params
"
:
{},
"
editable
"
:
1
,
"
editable_column_list
"
:
[],
"
key
"
:
"
field_listbox
"
,
"
lines
"
:
15
,
"
list_method
"
:
"
portal_catalog
"
,
"
query
"
:
"
urn:jio:allDocs?query=
"
+
Query
.
objectToSearchText
(
new
ComplexQuery
({
operator
:
"
AND
"
,
query_list
:
[
new
SimpleQuery
({
key
:
"
portal_type
"
,
operator
:
"
=
"
,
type
:
"
simple
"
,
value
:
"
Discussion Thread
"
}),
new
SimpleQuery
({
key
:
"
validation_state
"
,
operator
:
"
=
"
,
type
:
"
simple
"
,
// XXX Check usual states
value
:
"
shared
"
})
],
type
:
"
complex
"
})
),
"
portal_type
"
:
[
"
Discussion Thread
"
],
"
search_column_list
"
:
[],
"
sort_column_list
"
:
[],
"
sort
"
:
[[
'
modification_date
'
,
'
DESC
'
]],
"
title
"
:
"
Discussion Threads
"
,
"
type
"
:
"
ListBox
"
};
group_list
.
push
([
"
bottom
"
,
[[
"
listbox
"
]]
],
[
"
hidden
"
,
[
"
listbox_modification_date
"
]
]);
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
field_dict
},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
group_list
}
});
})
.
push
(
function
()
{
return
gadget
.
updateHeader
({
page_title
:
'
Forum
'
,
page_icon
:
'
comment
'
});
});
}
function
renderDiscussionThread
(
gadget
,
must_declare
,
jio_key
)
{
return
loadChildGadget
(
gadget
,
"
gadget_erp5_pt_form_view.html
"
,
must_declare
,
function
(
form_gadget
)
{
var
thread_info_dict
;
return
gadget
.
jio_allDocs
({
select_list
:
[
'
uid
'
,
'
title
'
],
query
:
Query
.
objectToSearchText
(
new
SimpleQuery
({
key
:
"
relative_url
"
,
operator
:
"
=
"
,
type
:
"
simple
"
,
value
:
jio_key
})
),
limit
:
[
0
,
1
]
})
.
push
(
function
(
result_list
)
{
// XXX implement pseudo getResultValue
thread_info_dict
=
result_list
.
data
.
rows
[
0
].
value
;
var
group_list
=
[],
field_dict
=
{},
column_list
=
[
[
'
asStrippedHTML
'
,
'
Content
'
],
[
'
modification_date
'
,
'
Modification Date
'
]
];
field_dict
.
listbox
=
{
"
column_list
"
:
column_list
,
"
show_anchor
"
:
0
,
"
default_params
"
:
{},
"
editable
"
:
1
,
"
editable_column_list
"
:
[],
"
key
"
:
"
field_listbox
"
,
"
lines
"
:
15
,
"
list_method
"
:
"
portal_catalog
"
,
"
query
"
:
"
urn:jio:allDocs?query=
"
+
Query
.
objectToSearchText
(
new
ComplexQuery
({
operator
:
"
AND
"
,
query_list
:
[
new
SimpleQuery
({
key
:
"
portal_type
"
,
operator
:
"
=
"
,
type
:
"
simple
"
,
value
:
"
Discussion Post
"
}),
new
SimpleQuery
({
key
:
"
parent_uid
"
,
operator
:
"
=
"
,
type
:
"
simple
"
,
// XXX Check usual states
value
:
thread_info_dict
.
uid
})
],
type
:
"
complex
"
})
),
"
portal_type
"
:
[
"
Discussion Post
"
],
"
search_column_list
"
:
[],
"
sort_column_list
"
:
[],
"
sort
"
:
[[
'
modification_date
'
,
'
ASC
'
]],
"
title
"
:
"
Discussion Posts
"
,
"
type
"
:
"
ListBox
"
};
group_list
.
push
([
"
bottom
"
,
[[
"
listbox
"
]]
],
[
"
hidden
"
,
[
"
listbox_modification_date
"
]
]);
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
field_dict
},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
group_list
}
});
})
.
push
(
function
()
{
return
gadget
.
getUrlFor
({
command
:
'
history_previous
'
});
})
.
push
(
function
(
url
)
{
return
gadget
.
updateHeader
({
page_title
:
'
Thread:
'
+
thread_info_dict
.
title
,
page_icon
:
'
comment
'
,
front_url
:
url
});
});
});
}
function
renderDiscussionPost
(
gadget
,
must_declare
,
jio_key
)
{
return
loadChildGadget
(
gadget
,
"
gadget_erp5_pt_form_view.html
"
,
must_declare
,
function
(
form_gadget
)
{
var
thread_info_dict
;
return
gadget
.
jio_allDocs
({
select_list
:
[
'
asStrippedHTML
'
,
'
title
'
],
query
:
Query
.
objectToSearchText
(
new
SimpleQuery
({
key
:
"
relative_url
"
,
operator
:
"
=
"
,
type
:
"
simple
"
,
value
:
jio_key
})
),
limit
:
[
0
,
1
]
})
.
push
(
function
(
result_list
)
{
// XXX implement pseudo getResultValue
thread_info_dict
=
result_list
.
data
.
rows
[
0
].
value
;
var
group_list
=
[],
field_dict
=
{};
field_dict
.
content
=
{
"
editable
"
:
0
,
"
key
"
:
"
content
"
,
"
default
"
:
thread_info_dict
.
asStrippedHTML
,
"
type
"
:
"
EditorField
"
};
group_list
.
push
([
"
bottom
"
,
[[
"
content
"
]]
]);
return
form_gadget
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
field_dict
},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
group_list
}
});
})
.
push
(
function
()
{
return
gadget
.
getUrlFor
({
command
:
'
history_previous
'
});
})
.
push
(
function
(
url
)
{
return
gadget
.
updateHeader
({
page_title
:
'
Post:
'
+
thread_info_dict
.
title
,
page_icon
:
'
comment
'
,
front_url
:
url
});
});
});
}
function
createMultipleSimpleOrQuery
(
key
,
value_list
)
{
var
i
,
query_list
=
[];
for
(
i
=
0
;
i
<
value_list
.
length
;
i
+=
1
)
{
query_list
.
push
(
new
SimpleQuery
({
key
:
key
,
operator
:
"
=
"
,
type
:
"
simple
"
,
value
:
value_list
[
i
]
}));
}
return
new
ComplexQuery
({
operator
:
"
OR
"
,
query_list
:
query_list
,
type
:
"
complex
"
});
}
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// Acquired methods
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
getUrlForList
"
,
"
getUrlForList
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareMethod
(
'
triggerSubmit
'
,
function
()
{
return
;
})
.
declareMethod
(
'
render2
'
,
function
renderHeader
()
{
var
gadget
=
this
;
return
gadget
.
jio_allDocs
({
select_list
:
[
'
uid
'
,
'
follow_up_title
'
,
'
title
'
,
'
modification_date
'
,
'
countFolder
'
],
sort_on
:
[[
'
modification_date
'
,
'
DESC
'
]],
query
:
Query
.
objectToSearchText
(
new
ComplexQuery
({
operator
:
"
AND
"
,
query_list
:
[
new
SimpleQuery
({
key
:
"
portal_type
"
,
operator
:
"
=
"
,
type
:
"
simple
"
,
value
:
"
Discussion Thread
"
}),
new
SimpleQuery
({
key
:
"
validation_state
"
,
operator
:
"
=
"
,
type
:
"
simple
"
,
// XXX Check usual states
value
:
"
shared
"
})
],
type
:
"
complex
"
})
),
limit
:
15
})
.
push
(
function
(
result
)
{
var
uid_list
=
[];
if
(
result
.
data
.
total_rows
.
length
===
0
)
{
uid_list
.
push
(
-
1
);
}
else
{
uid_list
=
result
.
data
.
rows
.
map
(
function
(
x
)
{
return
x
.
value
.
uid
;
});
}
// Search amount of documentation web pages related to those products
return
gadget
.
jio_allDocs
({
select_list
:
[
'
parent_uid
'
,
'
count(*)
'
],
query
:
Query
.
objectToSearchText
(
new
ComplexQuery
({
operator
:
"
AND
"
,
query_list
:
[
new
SimpleQuery
({
key
:
"
portal_type
"
,
operator
:
"
=
"
,
type
:
"
simple
"
,
value
:
"
Discussion Post
"
}),
new
ComplexQuery
({
operator
:
"
OR
"
,
type
:
"
complex
"
,
query_list
:
uid_list
.
map
(
function
(
parent_uid
)
{
return
new
SimpleQuery
({
key
:
"
parent_uid
"
,
operator
:
"
=
"
,
type
:
"
simple
"
,
value
:
parent_uid
});
})
})
],
type
:
"
complex
"
})
),
group_by
:
[
'
parent_uid
'
],
limit
:
10000
})
.
push
(
function
()
{
return
result
;
});
})
.
push
(
function
(
result
)
{
console
.
log
(
result
);
var
element_list
=
[],
i
;
console
.
log
(
result
);
for
(
i
=
0
;
i
<
result
.
data
.
total_rows
;
i
+=
1
)
{
element_list
.
push
(
domsugar
(
'
br
'
),
domsugar
(
'
div
'
,
[
domsugar
(
'
p
'
,
{
text
:
result
.
data
.
rows
[
i
].
value
.
title
}),
domsugar
(
'
p
'
,
{
text
:
result
.
data
.
rows
[
i
].
value
.
modification_date
}),
domsugar
(
'
p
'
,
{
text
:
result
.
data
.
rows
[
i
].
value
.
follow_up_title
}),
domsugar
(
'
p
'
,
{
text
:
result
.
data
.
rows
[
i
].
value
.
countFolder
}),
])
);
}
// XXX group by discussion post by parent_uid
console
.
log
(
element_list
);
return
domsugar
(
gadget
.
element
,
element_list
);
});
var
gadget
=
this
,
product_uid_dict
=
{},
meta_product_uid_list
=
[],
product_list
=
[];
// First, get the list of products
return
searchAllProject
(
gadget
,
product_uid_dict
,
meta_product_uid_list
,
product_list
)
.
push
(
function
()
{
return
RSVP
.
hash
({
status_dom
:
buildSoftwareStatusDom
(
gadget
,
product_list
,
product_uid_dict
),
documentation_dom
:
buildDocumentationDom
(
gadget
,
meta_product_uid_list
)
});
})
.
push
(
function
(
result_dict
)
{
domsugar
(
gadget
.
element
,
[
domsugar
(
'
img
'
,
{
src
:
'
NXD-Official.Logo.svg?format=
'
,
alt
:
'
Nexedi Logo
'
}),
domsugar
(
'
section
'
,
{
class
:
'
ui-content-header-plain
'
},
[
domsugar
(
'
h3
'
,
[
domsugar
(
'
span
'
,
{
class
:
'
ui-icon ui-icon-exchange
'
,
text
:
'
'
}),
'
Documentation
'
])
]),
result_dict
.
documentation_dom
,
domsugar
(
'
section
'
,
{
class
:
'
ui-content-header-plain
'
},
[
domsugar
(
'
h3
'
,
[
domsugar
(
'
span
'
,
{
class
:
'
ui-icon ui-icon-exchange
'
,
text
:
'
'
}),
'
Software Status
'
])
]),
result_dict
.
status_dom
]);
return
gadget
.
updateHeader
({
page_title
:
'
Nexedi Project Quality
'
,
page_icon
:
'
puzzle-piece
'
});
});
})
////////////////////////////////////////////////////////////////////
// Go
////////////////////////////////////////////////////////////////////
.
allowPublicAcquisition
(
'
updateHeader
'
,
function
()
{
return
;
})
.
allowPublicAcquisition
(
"
jio_allDocs
"
,
function
(
param_list
)
{
// XXX Convert iso date to a DateTime field
// XXX Paginate message to last message on modification date column
var
gadget
=
this
,
options
=
param_list
[
0
];
return
gadget
.
jio_allDocs
(
options
)
.
push
(
function
(
result
)
{
var
i
,
date
,
len
=
result
.
data
.
total_rows
;
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
modification_date
"
))
{
date
=
new
Date
(
result
.
data
.
rows
[
i
].
value
.
modification_date
);
result
.
data
.
rows
[
i
].
value
.
modification_date
=
{
url_value
:
{
command
:
'
index
'
,
options
:
{
jio_key
:
result
.
data
.
rows
[
i
].
id
,
page
:
gadget
.
state
.
page
}
},
field_gadget_param
:
{
allow_empty_time
:
0
,
ampm_time_style
:
0
,
css_class
:
"
date_field
"
,
date_only
:
false
,
description
:
"
The Date
"
,
editable
:
1
,
hidden
:
0
,
hidden_day_is_last_day
:
0
,
"
default
"
:
date
.
toUTCString
(),
key
:
"
modification_date
"
,
required
:
0
,
timezone_style
:
0
,
title
:
"
Modification Date
"
,
type
:
"
DateTimeField
"
}
};
}
if
(
result
.
data
.
rows
[
i
].
value
.
hasOwnProperty
(
"
asStrippedHTML
"
))
{
result
.
data
.
rows
[
i
].
value
.
asStrippedHTML
=
{
url_value
:
{
command
:
'
index
'
,
options
:
{
jio_key
:
result
.
data
.
rows
[
i
].
id
,
page
:
gadget
.
state
.
page
}
},
field_gadget_param
:
{
description
:
"
Content
"
,
editable
:
0
,
hidden
:
0
,
"
default
"
:
result
.
data
.
rows
[
i
].
value
.
asStrippedHTML
,
key
:
"
asStrippedHTML
"
,
required
:
0
,
title
:
"
Content
"
,
type
:
"
EditorField
"
}
};
}
}
return
result
;
});
})
.
setState
({
display_step
:
DISPLAY_READER
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
console
.
log
(
options
);
return
this
.
changeState
({
first_render
:
true
,
page
:
options
.
page
,
jio_key
:
options
.
jio_key
,
options
:
options
/*
display_step: DISPLAY_TREE,
// Only build the bt5 during the first query
extract: 1,
diff_url: options.diff_url,
get_tree_url: options.get_tree_url,
remote_comment: options.remote_comment,
remote_url: options.remote_url,
key: options.key,
default_changelog: options.default_changelog,
default_push: options.default_push,
value: options.value || JSON.stringify({
added: [],
modified: [],
removed: [],
changelog: '',
push: false
}),
editable: (options.editable === undefined) ? true : options.editable
*/
});
})
.
onStateChange
(
function
(
modification_dict
)
{
console
.
log
(
'
changestate
'
,
modification_dict
);
var
gadget
=
this
;
// Always refresh the reader
if
(
gadget
.
state
.
display_step
===
DISPLAY_READER
)
{
if
(
gadget
.
state
.
jio_key
===
undefined
)
{
return
renderDiscussionThreadList
(
gadget
,
modification_dict
.
hasOwnProperty
(
'
display_step
'
)
||
modification_dict
.
first_render
);
}
// XXX HACK
if
((
gadget
.
state
.
jio_key
.
match
(
/
\/
/g
)
||
[]).
length
===
1
)
{
return
renderDiscussionThread
(
gadget
,
modification_dict
.
hasOwnProperty
(
'
display_step
'
)
||
modification_dict
.
first_render
,
gadget
.
state
.
jio_key
);
}
return
renderDiscussionPost
(
gadget
,
modification_dict
.
hasOwnProperty
(
'
display_step
'
)
||
modification_dict
.
first_render
,
gadget
.
state
.
jio_key
);
}
/*
if (gadget.state.display_step === DISPLAY_TREE) {
console.log(modification_dict);
if (modification_dict.hasOwnProperty('display_step')) {
return renderTreeView(gadget,
modification_dict.hasOwnProperty('extract'));
}
if (modification_dict.hasOwnProperty('expand_tree')) {
return expandTreeView(gadget);
}
}
if (modification_dict.display_step === DISPLAY_DIFF) {
return renderDiffView(gadget);
}
if (modification_dict.display_step === DISPLAY_CHANGELOG) {
return renderChangelogView(gadget);
}
*/
if
(
modification_dict
.
hasOwnProperty
(
'
display_step
'
))
{
throw
new
Error
(
'
Unhandled display step:
'
+
gadget
.
state
.
display_step
);
}
});
}(
window
,
rJS
,
RSVP
,
domsugar
,
SimpleQuery
,
ComplexQuery
,
Query
));
\ No newline at end of file
bt5/romain_dev/PathTemplateItem/web_page_module/romain_forum_js.xml
0 → 100644
View file @
c4da5416
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_erp5_page_nx_forum.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
romain_forum_js
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Forum Reader JS
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
</item>
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
document_publication_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
edit_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
processing_status_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAU=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
publish_alive
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1609424819.36
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
validation_state
</string>
</key>
<value>
<string>
published_alive
</string>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
edit
</string>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
989.8969.7970.21555
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
<value>
<string>
current
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1609866799.64
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"5"
aka=
"AAAAAAAAAAU="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_log
</string>
</key>
<value>
<list>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
actor
</string>
</key>
<value>
<string>
zope
</string>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
error_message
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_processing_state
</string>
</key>
<value>
<string>
empty
</string>
</value>
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
0.0.0.0
</string>
</value>
</item>
<item>
<key>
<string>
time
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
1609424753.54
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
</value>
</item>
</dictionary>
</list>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/romain_dev/bt/template_keep_last_workflow_history_only_path_list
View file @
c4da5416
image_module/romain_wallpaper_*
\ No newline at end of file
image_module/romain_wallpaper_*
web_page_module/romain_forum_*
\ No newline at end of file
bt5/romain_dev/bt/template_keep_workflow_path_list
View file @
c4da5416
image_module/romain_wallpaper_*
\ No newline at end of file
image_module/romain_wallpaper_*
web_page_module/romain_forum_*
\ No newline at end of file
bt5/romain_dev/bt/template_path_list
View file @
c4da5416
image_module/romain_wallpaper_*
notebook_module/romain_notebook_*
\ No newline at end of file
notebook_module/romain_notebook_*
web_page_module/romain_forum_*
\ No newline at end of file
Write
Preview
Markdown
is supported
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