Commit f7f985f9 authored by Roque's avatar Roque

erp5_web_project_ui: project supervisor link

parent b343da4c
...@@ -50,6 +50,11 @@ div[data-gadget-url$="gadget_erp5_page_project_front_page.html"] .project-left a ...@@ -50,6 +50,11 @@ div[data-gadget-url$="gadget_erp5_page_project_front_page.html"] .project-left a
text-decoration: none; text-decoration: none;
} }
div[data-gadget-url$="gadget_erp5_page_project_front_page.html"] .project-right .value a {
color: #111;
text-decoration: none;
}
div[data-gadget-url$="gadget_erp5_page_project_front_page.html"] .front-project-list .project-box .project-info { div[data-gadget-url$="gadget_erp5_page_project_front_page.html"] .front-project-list .project-box .project-info {
display: inline-flex; display: inline-flex;
} }
...@@ -59,7 +64,7 @@ div[data-gadget-url$="gadget_erp5_page_project_front_page.html"] .front-project- ...@@ -59,7 +64,7 @@ div[data-gadget-url$="gadget_erp5_page_project_front_page.html"] .front-project-
} }
div[data-gadget-url$="gadget_erp5_page_project_front_page.html"] .front-project-list .project-box .project-info .project-right { div[data-gadget-url$="gadget_erp5_page_project_front_page.html"] .front-project-list .project-box .project-info .project-right {
min-width: 66px; min-width: 92px;
} }
div[data-gadget-url$="gadget_erp5_page_project_front_page.html"] .front-project-list .project-box .project-line { div[data-gadget-url$="gadget_erp5_page_project_front_page.html"] .front-project-list .project-box .project-line {
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>982.32516.14143.33843</string> </value> <value> <string>982.36777.28263.51165</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1584100274.69</float> <float>1584355891.48</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -227,10 +227,9 @@ ...@@ -227,10 +227,9 @@
return gadget.jio_allDocs({ return gadget.jio_allDocs({
query: project_query, query: project_query,
limit: QUERY_LIMIT, limit: QUERY_LIMIT,
select_list: ['title', 'source_decision_title'], select_list: ['title', 'source_decision_title',
//FOR DEMO 'source_decision_relative_url', 'forum_link'],
//sort_on: [["title", "ascending"]], sort_on: [["title", "ascending"]]
sort_on: [["modification_date", "ascending"]]
}) })
.push(function (result) { .push(function (result) {
return result.data.rows; return result.data.rows;
...@@ -303,11 +302,12 @@ ...@@ -303,11 +302,12 @@
task_report_url_list = [], task_report_url_list = [],
bug_url_list = [], bug_url_list = [],
test_result_url_list = [], test_result_url_list = [],
supervisor_url_list = [],
milestone_view, milestone_view,
project_view; project_view;
function createProjectHtmlElement(project_id, project_title, function createProjectHtmlElement(project_id, project_title,
project_url, supervisor) { project_url, supervisor, supervisor_url) {
var project_li = document.createElement('li'), var project_li = document.createElement('li'),
box_div = document.createElement('div'), box_div = document.createElement('div'),
title_div = document.createElement('div'), title_div = document.createElement('div'),
...@@ -320,14 +320,15 @@ ...@@ -320,14 +320,15 @@
project_link = document.createElement('a'), project_link = document.createElement('a'),
forum_link = document.createElement('a'), forum_link = document.createElement('a'),
supervisor_field_label = document.createElement('label'), supervisor_field_label = document.createElement('label'),
supervisor_value_span = document.createElement('span'); supervisor_value_link = document.createElement('a');
if (supervisor) { if (supervisor) {
supervisor_field_div.classList.add("field", "project-line"); supervisor_field_div.classList.add("field", "project-line");
supervisor_value_div.classList.add("field", "project-line"); supervisor_value_div.classList.add("field", "project-line", "value");
supervisor_field_label.innerHTML = SUPERVISOR_FIELD_TITLE; supervisor_field_label.innerHTML = SUPERVISOR_FIELD_TITLE;
supervisor_value_span.innerHTML = supervisor; supervisor_value_link.innerHTML = supervisor;
supervisor_value_link.href = supervisor_url;
supervisor_field_div.appendChild(supervisor_field_label); supervisor_field_div.appendChild(supervisor_field_label);
supervisor_value_div.appendChild(supervisor_value_span); supervisor_value_div.appendChild(supervisor_value_link);
right_div.appendChild(supervisor_field_div); right_div.appendChild(supervisor_field_div);
right_div.appendChild(supervisor_value_div); right_div.appendChild(supervisor_value_div);
} }
...@@ -458,13 +459,18 @@ ...@@ -458,13 +459,18 @@
null, null,
createProjectQuery(project_list[i].id, [])) createProjectQuery(project_list[i].id, []))
); );
supervisor_url_list.push(
getUrlParameterDict(project_list[i].value.source_decision_relative_url,
'view')
);
} }
return RSVP.all([gadget.getUrlForList(url_parameter_list), return RSVP.all([gadget.getUrlForList(url_parameter_list),
gadget.getUrlForList(milestone_url_list), gadget.getUrlForList(milestone_url_list),
gadget.getUrlForList(task_url_list), gadget.getUrlForList(task_url_list),
gadget.getUrlForList(task_report_url_list), gadget.getUrlForList(task_report_url_list),
gadget.getUrlForList(bug_url_list), gadget.getUrlForList(bug_url_list),
gadget.getUrlForList(test_result_url_list)]); gadget.getUrlForList(test_result_url_list),
gadget.getUrlForList(supervisor_url_list)]);
}) })
.push(function (result_list) { .push(function (result_list) {
var type, var type,
...@@ -475,7 +481,8 @@ ...@@ -475,7 +481,8 @@
createProjectHtmlElement(project_list[i].id, createProjectHtmlElement(project_list[i].id,
project_list[i].value.title, project_list[i].value.title,
result_list[0][i], result_list[0][i],
project_list[i].value.source_decision_title); project_list[i].value.source_decision_title,
result_list[6][i]);
project_html = project_html_element_list[0]; project_html = project_html_element_list[0];
left_div_html = project_html_element_list[1]; left_div_html = project_html_element_list[1];
for (type in PORTAL_TITLE_DICT) { for (type in PORTAL_TITLE_DICT) {
...@@ -621,7 +628,7 @@ ...@@ -621,7 +628,7 @@
//forum_link_html.innerHTML = forum_link_list[i].value.title; //forum_link_html.innerHTML = forum_link_list[i].value.title;
//HARDCODED FOR DEMO //HARDCODED FOR DEMO
forum_link_html.href = "https://www.erp5.com/group_section/forum"; forum_link_html.href = "https://www.erp5.com/group_section/forum";
forum_link_html.innerHTML = "forum link"; forum_link_html.innerHTML = "Project Forum";
forum_link_html.classList.remove("ui-hidden"); forum_link_html.classList.remove("ui-hidden");
} }
} }
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>982.32521.27013.3925</string> </value> <value> <string>982.36776.5986.55278</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1584100413.1</float> <float>1584355853.33</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
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