Revision 55027
Added by Konstantinos Triantafyllou about 5 years ago
update_db.js | ||
---|---|---|
108 | 108 |
function createShareInZenodoPage() { |
109 | 109 |
db.page.save({"name" : "Share in Zenodo", "route" : "/participate/share-zenodo", "type" : "share", "connect":true,"openaire":false,"entities" : []}); |
110 | 110 |
shareInZenodo = db.page.find( { route: "/participate/share-zenodo" }).map( function(page) { return page._id.str; } ).toString(); |
111 |
|
|
112 | 111 |
communities = db.community.find().map( function(community) { return community; } ); |
113 | 112 |
|
114 | 113 |
for (var i = 0; i < communities.length; i++) { |
... | ... | |
122 | 121 |
} |
123 | 122 |
} |
124 | 123 |
|
124 |
function addCommunityLayout() { |
|
125 |
db.createCollection("layout"); |
|
126 |
communities = db.community.find().map( function(community) { return community; } ); |
|
127 |
for (var i = 0; i < communities.length; i++) { |
|
128 |
var layoutId = db.layout.insertOne({"color": "#EBB13E"}).insertedId.str; |
|
129 |
community_pid = communities[i].pid; |
|
130 |
db.community.update({ "pid" : community_pid }, {$set: {"layout": layoutId}}); |
|
131 |
print("Creating layout for " + community_pid); |
|
132 |
} |
|
133 |
} |
|
134 |
|
|
125 | 135 |
use openaire_admin; |
126 | 136 |
|
127 | 137 |
//updatePages(); |
... | ... | |
141 | 151 |
|
142 | 152 |
//createOtherResearchProducts(); |
143 | 153 |
|
144 |
addDefaultHtmlToHtmlPagesForCommunity("clarin"); |
|
145 |
createNotificationsCollection(); |
|
146 |
addDivHelpContentsForCommunity("clarin"); |
|
147 |
addORPInStatistics(); |
|
148 |
createShareInZenodoPage(); |
|
154 |
//addDefaultHtmlToHtmlPagesForCommunity("clarin"); |
|
155 |
//createNotificationsCollection(); |
|
156 |
//addDivHelpContentsForCommunity("clarin"); |
|
157 |
//addORPInStatistics(); |
|
158 |
//createShareInZenodoPage(); |
|
159 |
addCommunityLayout(); |
Also available in: Unified diff
[Trunk|AdminTools]: 1. Add Layout Collection 2. Create getLayout, updateLayout, resetLayout in CommunityController 3. Add at admintooles.properties default color=color of connect