dzhw / metadatamanagement

Metadatamanagement (MDM) - Data Search for Higher Education Research and Science Studies
https://metadata.fdz.dzhw.eu
GNU Affero General Public License v3.0
25 stars 9 forks source link

Implement multiple question images #1454

Closed rreitmann closed 6 years ago

rreitmann commented 6 years ago

We need to implement the changes designed in #1414

dkatzberg commented 6 years ago

@rreitmann I like to discuss a last question for this topic: It is about the case if a question has only one image. Do we use the carousel always to have a similar style or do we disable the carousel?

dkatzberg commented 6 years ago

Ng-Change on Ng-Select is an problem. Hacky workaround is linked under the issue: https://github.com/angular/material/issues/1576

dkatzberg commented 6 years ago

Mongoskript for searching just question files: db.getCollection('fs.files').find({"filename": { $regex: /questions/ }})

Mongoskript for deleting just question files: db['fs.files'].remove({"filename": { $regex: /questions/ }});

rreitmann commented 6 years ago

We can select all old image files by executing: db.fs.files.find({"filename": { $regex: /^\/questions/ }})

Deleting files can be done with: db.fs.files.remove({"filename": { $regex: /^\/questions/ }})

Afterwards the chunks are still present but can be cleaned up with:

function removeChunkIfNoOwner(chunk){
  //Look for the parent file
  var parentCount = db.fs.files.find({'_id' : chunk.files_id}).count();

  if (parentCount === 0 ){
     db.fs.chunks.remove({'_id': chunk._id});
     print("Removing chunk " + chunk._id);
  }
}
db.fs.chunks.find().forEach(removeChunkIfNoOwner);
rreitmann commented 6 years ago

@dkatzberg Here are my remarks:

dkatzberg commented 6 years ago

@rreitmann The resizing is a problem. We should talk about this on monday. @rreitmann The padding is from the md-card, not from the carousel. If I remove the padding, I remove it from the card, not just the from the carousel. I know that I could add the padding to the other string elements, but we should talk about this on monday too.

kimsommer commented 6 years ago
dkatzberg commented 6 years ago

We should discuss the first point on monday for need.