Subversion Repositories wimsdev

Rev

Rev 14831 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. !! generate link for action on freework in a class
  2. !! wims_read_parm=linkmodule,freeworknumber,statutsheet,flag(after action 1 return to home 0 stay in linkmodule),typeoffreework
  3.  
  4. !distribute item $wims_read_parm into m_,sh_,st_,home_,ty_
  5. !let exocnt_=!recordcnt wimshome/log/classes/$wims_class/freeworks/.freework$sh_
  6. !if $home_=1
  7.   !let li_=cmd=new&$m_=$sh_&back=$home_&module=adm/class/$(m_)
  8. !else
  9.   !let li_=cmd=reply&back=0
  10. !endif
  11.  
  12. !if $st_=0
  13.   !! ---- link for preparing mode
  14.   !if $exocnt_>0
  15.     !set wims_ref_class=wims_button
  16.     !href $li_&job=prep_activate $(wims_name_actionlist[1])
  17.      
  18.   !endif
  19.   !if $erasable=yes or ($sh_>$(min_$(m_)_erasable) and $home_=1)
  20.     !set wims_ref_class=wims_button wims_warning
  21.     !href $li_&job=prep_erase $(wims_name_actionlist[6])
  22.     $
  23.   !endif
  24. !else
  25.   !if $st_=1
  26.     !! ---- link for active mode
  27.     !set wims_ref_class=wims_button
  28.     !href $li_&job=expire $(wims_name_actionlist[2])
  29.     $
  30.     !set wims_ref_class=wims_button wims_secondary_button
  31.     !href $li_&job=deactivate $(wims_name_actionlist[3])
  32.   !else
  33.     !set wims_ref_class=wims_button
  34.     !if $st_=2
  35.       !href $li_&job=hide $(wims_name_actionlist[4])
  36.     !else
  37.       !href $li_&job=expire $(wims_name_actionlist[5])
  38.     !endif
  39.     $
  40.     !let test_=!fileexists wimshome/log/classes/$wims_class/freeworksdata/$sh_/.archivated
  41.     !if $test_!=yes
  42.       !set wims_ref_class=wims_button
  43.       !href $li_&job=reactivate $(wims_name_actionlist[1])
  44.       !if $ty_>1
  45.         $
  46.         !set wims_ref_class=wims_button wims_secondary_button
  47.         !href $li_&job=archive $(wims_name_actionlist[7])
  48.       !endif
  49.     !endif
  50.   !endif
  51. !endif
  52.