Revision 56039
Added by Konstantinos Triantafyllou almost 5 years ago
update_db.js | ||
---|---|---|
132 | 132 |
} |
133 | 133 |
} |
134 | 134 |
|
135 |
function addCuratorsPage() { |
|
136 |
curatorsId = db.page.insertOne({"name" : "Curators", "route" : "/curators", "type" : "other", "connect":true,"openaire":false,"entities" : []}).insertedId.str; |
|
137 |
print("Creating curators page with id " + curatorsId); |
|
138 |
communities = db.community.find().map( function(community) { return community; } ); |
|
139 |
for (var i = 0; i < communities.length; i++) { |
|
140 |
community_pages = communities[i].pages; |
|
141 |
|
|
142 |
community_pages[curatorsId] = false; |
|
143 |
|
|
144 |
community_pid = communities[i].pid; |
|
145 |
db.community.update({ "pid" : community_pid },{$set: { "pages": community_pages}}); |
|
146 |
print("Add curators page with id " + curatorsId + " on community " + community_pid); |
|
147 |
} |
|
148 |
} |
|
149 |
|
|
135 | 150 |
use openaire_admin; |
136 | 151 |
|
137 | 152 |
//updatePages(); |
... | ... | |
156 | 171 |
//addDivHelpContentsForCommunity("clarin"); |
157 | 172 |
//addORPInStatistics(); |
158 | 173 |
//createShareInZenodoPage(); |
159 |
addCommunityLayout(); |
|
174 |
//addCommunityLayout(); |
|
175 |
addCuratorsPage(); |
Also available in: Unified diff
[Admin-Tools]: Update scripts to create curators page with default enabled value: false.