ErwinKomen / RU-passim

0 stars 0 forks source link

MyPASSIM - delete saved search, datasets, DCT #751

Closed shariboodts closed 2 months ago

shariboodts commented 2 months ago

In MyPASSIM I am currently (logged in as User) not able to delete saved searches, datasets, DCTs, .... Please make it possible to 'clean up' MyPASSIM environment by adding red cross to all items in all relevant subsections of MyPASSIM.

ErwinKomen commented 2 months ago

Two things

  1. Change the current button with "Delete" to a pictogram with a red cross
  2. Make sure that passim_user group people get to see and are allowed to use that feature

Changing the appearance

  1. This is in dct/views.py, class MyPassimEdit, function get_field_value()
  2. Okay, changed that the glyphicon-remove
  3. Checked and works

Allowing passim_user

  1. This is in class MyPassimEdit, function get_related_objects(), where it is dependant upon the value of bMayEdit
  2. The latter currenctly simply checks if the user is in the right group, the team_group
  3. Added for this particular item: user may also be in app_user
  4. Tested, works
ErwinKomen commented 2 months ago

Double checking

  1. It appears that "Stemmatizer research sets" cannot be removed?
    1. Function check_hlist() is called...
    2. But there is no definition in hlist_objects for stemma. In fact, there are no definitions for:
      1. svdvis - Saved visualizations - model: SavedVis
      2. dctdef - Dynamic comparitive tables - model: SetDef
      3. stemma - Stemmatizer research sets - model: StemmaSet
ErwinKomen commented 2 months ago

Related 1: linktype

The migration for linktype had a side-effect on linktype for a number of models. The allowed linktypes are: [ ech, eqs, neq, prt, rel] Some of these models are allowed to have their own selection of link types:

Model Linktypes okay Needed
EqualGoldLink yes
ManuscriptLink yes
SermonDescrEqual no eqs, uns
SermonDescrGold no eqs, neq, prt, sim, use
SermonDescrLink yes
SermonGoldSame yes

Action:

  1. Created separate linktypes seeker.linktype.srmeq, seeker.linktype.srmgld
  2. Filled these (in FieldChoice) with the allowed linktypes

Related 2: other MyPassim items

Several other MyPassim items were without deletability from the MyPassim menu. I've corrected that

Related 3: create default DCT

When all DCTs of a user for a research set are removed, it is very difficult to create a new DCT with the same research set. I've added a Create DCT button to the ResearchSet details view that alleviates this.