Revision 58550
Added by Konstantinos Triantafyllou almost 4 years ago
update_db.js | ||
---|---|---|
1559 | 1559 |
} |
1560 | 1560 |
} |
1561 | 1561 |
|
1562 |
function addFAQsPage() { |
|
1563 |
db.page.save({"name" : "About - FAQs", |
|
1564 |
"route" : "/about/faq", |
|
1565 |
"type" : "other", |
|
1566 |
"connect":true, |
|
1567 |
"communities":false, |
|
1568 |
"openaire":false, |
|
1569 |
"entities" : [], |
|
1570 |
"top":true, |
|
1571 |
"bottom":false, |
|
1572 |
"right":false, |
|
1573 |
"left":false |
|
1574 |
}); |
|
1575 |
faq = db.page.find( { route: "/about/faq" }).map( function(page) { return page._id.str; } ).toString(); |
|
1576 |
communities = db.community.find().map( function(community) { return community; } ); |
|
1577 |
for (var i = 0; i < communities.length; i++) { |
|
1578 |
community_pages = communities[i].pages; |
|
1579 |
|
|
1580 |
community_pages[faq] = true; |
|
1581 |
community_pid = communities[i].pid; |
|
1582 |
db.community.update({ "pid" : community_pid },{$set: { "pages": community_pages}}); |
|
1583 |
print("Update pages for " + community_pid); |
|
1584 |
} |
|
1585 |
} |
|
1586 |
|
|
1562 | 1587 |
use openaire_admin; |
1563 | 1588 |
|
1564 | 1589 |
//updatePages(); |
... | ... | |
1626 | 1651 |
//addSearchResearchOutcomesPages(); |
1627 | 1652 |
|
1628 | 1653 |
// 10-04-2020 |
1629 |
createNewPagesForConnect(); |
|
1630 |
createNewPagesForCommunities(); |
|
1631 |
removeContentPolicyPageAndAddHelpTextInCommunitiesSourcesPage(); |
|
1654 |
// createNewPagesForConnect(); |
|
1655 |
// createNewPagesForCommunities(); |
|
1656 |
// removeContentPolicyPageAndAddHelpTextInCommunitiesSourcesPage(); |
|
1657 |
|
|
1658 |
//24-04-2020 |
|
1659 |
addFAQsPage(); |
Also available in: Unified diff
[Admin Tools | Trunk]: Add on scripts new FAQs page.