diff --git a/swad_QR.h b/swad_QR.h index 299917207..70100ffcf 100644 --- a/swad_QR.h +++ b/swad_QR.h @@ -37,13 +37,6 @@ /******************************* Public types ********************************/ /*****************************************************************************/ -typedef enum - { - QR_ID = 0, - QR_NICKNAME = 1, - QR_EMAIL = 2, - } QR_QRType_t; - /*****************************************************************************/ /***************************** Public prototypes *****************************/ /*****************************************************************************/ diff --git a/swad_action.c b/swad_action.c index d1171012a..4dcb2b775 100644 --- a/swad_action.c +++ b/swad_action.c @@ -4332,6 +4332,17 @@ void Act_PutContextualLink (Act_Action_t NextAction,void (*FuncParams) (), Act_FormEnd (); } +/*****************************************************************************/ +/****************** Show an icon with a link (without text) ******************/ +/*****************************************************************************/ + +void Act_PutIconLink (const char *Icon,const char *Title) + { + Act_LinkFormSubmit (Title,NULL); + Lay_PutSendIcon (Icon,Title,NULL); + Act_FormEnd (); + } + /*****************************************************************************/ /***************** Adjust current action when no user's logged ***************/ /*****************************************************************************/ diff --git a/swad_action.h b/swad_action.h index 972c86f46..e9d5548df 100644 --- a/swad_action.h +++ b/swad_action.h @@ -1345,6 +1345,7 @@ void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle); void Act_PutContextualLink (Act_Action_t NextAction,void (*FuncParams) (), const char *Icon,const char *Title); +void Act_PutIconLink (const char *Icon,const char *Title); void Act_AdjustActionWhenNoUsrLogged (void); void Act_AdjustCurrentAction (void); diff --git a/swad_assignment.c b/swad_assignment.c index 21bd26f11..732b6997f 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -501,26 +501,17 @@ static void Asg_PutFormsToRemEditOneAsg (long AsgCod,bool Hidden) extern const char *Txt_Hide; extern const char *Txt_Edit; - fprintf (Gbl.F.Out,"
"); Act_FormStart (ActReqRemAsg); Asg_PutParamAsgCod (AsgCod); Asg_PutHiddenParamAsgOrderType (); Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Remove, - Txt_Remove); - Act_FormEnd (); - fprintf (Gbl.F.Out," | "); + Act_PutIconLink ("delon",Txt_Remove); /***** Put form to hide/show assignment *****/ - fprintf (Gbl.F.Out,""); Act_FormStart (Hidden ? ActShoAsg : ActHidAsg); Asg_PutParamAsgCod (AsgCod); @@ -528,37 +519,19 @@ static void Asg_PutFormsToRemEditOneAsg (long AsgCod,bool Hidden) Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage); if (Hidden) - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Show, - Txt_Show); + Act_PutIconLink ("hidden_on",Txt_Show); else - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Hide, - Txt_Hide); - Act_FormEnd (); - fprintf (Gbl.F.Out," | "); + Act_PutIconLink ("visible_on",Txt_Hide); /***** Put form to edit assignment *****/ - fprintf (Gbl.F.Out,""); Act_FormStart (ActEdiOneAsg); Asg_PutParamAsgCod (AsgCod); Asg_PutHiddenParamAsgOrderType (); Grp_PutParamWhichGrps (); Pag_PutHiddenParamPagNum (Gbl.Pag.CurrentPage); - fprintf (Gbl.F.Out,"", - Gbl.Prefs.IconsURL, - Txt_Edit, - Txt_Edit); - Act_FormEnd (); - fprintf (Gbl.F.Out," | "); + Act_PutIconLink ("edit",Txt_Edit); - fprintf (Gbl.F.Out,"