diff --git a/swad_ID.c b/swad_ID.c index 6277c3c5d..8d2dc4fb8 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -378,13 +378,15 @@ void ID_PutLinkToChangeUsrIDs (void) /***** Link for changing the password *****/ if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me Lay_PutContextualLink (ActFrmUsrAcc,NULL, - "arroba64x64.gif",Txt_Change_IDs); + "arroba64x64.gif", + Txt_Change_IDs,Txt_Change_IDs); else // Not me Lay_PutContextualLink ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActFrmIDsStd : (Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER ? ActFrmIDsTch : ActFrmIDsOth), // Guest, visitor or admin Usr_PutParamOtherUsrCodEncrypted, - "arroba64x64.gif",Txt_Change_IDs); + "arroba64x64.gif", + Txt_Change_IDs,Txt_Change_IDs); } /*****************************************************************************/ diff --git a/swad_account.c b/swad_account.c index 98007227e..6ea6a9eb0 100644 --- a/swad_account.c +++ b/swad_account.c @@ -128,7 +128,8 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith /***** Link to log in *****/ fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActFrmLogIn,NULL,"login64x64.png",Txt_Log_in); + Lay_PutContextualLink (ActFrmLogIn,NULL,"login64x64.png", + Txt_Log_in,Txt_Log_in); fprintf (Gbl.F.Out,"
"); /***** Form to enter some data of the new user *****/ @@ -244,7 +245,8 @@ static void Acc_PutLinkToRemoveMyAccount (void) extern const char *Txt_Remove_account; Lay_PutContextualLink (ActReqRemMyAcc,Acc_PutLinkToRemoveMyAccountParams, - "remove-on64x64.png",Txt_Remove_account); + "remove-on64x64.png", + Txt_Remove_account,Txt_Remove_account); } static void Acc_PutLinkToRemoveMyAccountParams (void) diff --git a/swad_announcement.c b/swad_announcement.c index d87ed4e0d..25db5a8df 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -93,7 +93,8 @@ void Ann_ShowAllAnnouncements (void) if (ICanEditAnnouncements) { fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActWriAnn,NULL,"plus64x64.png",Txt_New_announcement); + Lay_PutContextualLink (ActWriAnn,NULL,"plus64x64.png", + Txt_New_announcement,Txt_New_announcement); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_assignment.c b/swad_assignment.c index a0cac6abc..56a0d262b 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -470,7 +470,8 @@ static void Asg_PutFormToCreateNewAsg (void) /***** Put form to create a new assignment *****/ fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (ActFrmNewAsg,Asg_PutFormToCreateNewAsgParams, - "plus64x64.png",Txt_New_assignment); + "plus64x64.png", + Txt_New_assignment,Txt_New_assignment); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_attendance.c b/swad_attendance.c index fdce8ae73..8e4bf7334 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -467,7 +467,8 @@ static void Att_PutFormToListMyAttendance (void) extern const char *Txt_Attendance_list; Lay_PutContextualLink (ActSeeLstMyAtt,NULL, - "list16x16.gif",Txt_Attendance_list); + "list16x16.gif", + Txt_Attendance_list,Txt_Attendance_list); } /*****************************************************************************/ @@ -479,7 +480,8 @@ static void Att_PutFormToListStdsAttendance (void) extern const char *Txt_Attendance_list; Lay_PutContextualLink (ActReqLstStdAtt,Att_PutFormToListStdsParams, - "list16x16.gif",Txt_Attendance_list); + "list16x16.gif", + Txt_Attendance_list,Txt_Attendance_list); } static void Att_PutFormToListStdsParams (void) @@ -499,7 +501,8 @@ static void Att_PutFormToCreateNewAttEvent (void) /***** Put form to create a new attendance event *****/ Lay_PutContextualLink (ActFrmNewAtt,Att_PutFormToCreateNewAttEventParams, - "plus64x64.png",Txt_New_event); + "plus64x64.png", + Txt_New_event,Txt_New_event); } static void Att_PutFormToCreateNewAttEventParams (void) @@ -2864,7 +2867,8 @@ static void Att_PutFormToPrintMyList (void) /***** Link to print view *****/ fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (ActPrnLstMyAtt,Att_PutFormToPrintMyListParams, - "print64x64.png",Txt_Print); + "print64x64.png", + Txt_Print,Txt_Print); fprintf (Gbl.F.Out,"
"); } @@ -2887,7 +2891,8 @@ static void Att_PutFormToPrintStdsList (void) /***** Link to print view *****/ fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (ActPrnLstStdAtt,Att_PutFormToPrintStdsListParams, - "print64x64.png",Txt_Print); + "print64x64.png", + Txt_Print,Txt_Print); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_banner.c b/swad_banner.c index d8549b75e..9a8f656e2 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -130,7 +130,8 @@ static void Ban_PutFormToEditBanners (void) /***** Link to edit banners *****/ fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActEdiBan,NULL,"edit64x64.png",Txt_Edit); + Lay_PutContextualLink (ActEdiBan,NULL,"edit64x64.png", + Txt_Edit,Txt_Edit); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_calendar.c b/swad_calendar.c index 9bbbd7395..85df1d832 100644 --- a/swad_calendar.c +++ b/swad_calendar.c @@ -251,7 +251,8 @@ void Cal_DrawCalendar (void) { /* Link to print view */ fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActPrnCal,NULL,"print64x64.png",Txt_Print); + Lay_PutContextualLink (ActPrnCal,NULL,"print64x64.png", + Txt_Print,Txt_Print); fprintf (Gbl.F.Out,"
"); } Lay_StartRoundFrameTable (NULL,0,NULL); diff --git a/swad_centre.c b/swad_centre.c index 25bd25557..8c878ad4d 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -283,7 +283,8 @@ static void Ctr_Configuration (bool PrintView) fprintf (Gbl.F.Out,"
"); /* Link to print view */ - Lay_PutContextualLink (ActPrnCtrInf,NULL,"print64x64.png",Txt_Print); + Lay_PutContextualLink (ActPrnCtrInf,NULL,"print64x64.png", + Txt_Print,Txt_Print); /* Links to upload logo and photo */ if (Gbl.Usrs.Me.LoggedRole >= Rol_CTR_ADM) @@ -1905,8 +1906,11 @@ static void Ctr_PutFormToChangeCtrPhoto (bool PhotoExists) /***** Link for changing / uploading the photo *****/ Lay_PutContextualLink (ActReqCtrPho,NULL, - "photo64x64.gif",PhotoExists ? Txt_Change_photo : - Txt_Upload_photo); + "photo64x64.gif", + PhotoExists ? Txt_Change_photo : + Txt_Upload_photo, + PhotoExists ? Txt_Change_photo : + Txt_Upload_photo); } /*****************************************************************************/ diff --git a/swad_changelog.h b/swad_changelog.h index d04d6e22d..cde2142af 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -117,12 +117,13 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.64.6 (2015/12/13)" +#define Log_PLATFORM_VERSION "SWAD 15.64.7 (2015/12/13)" #define CSS_FILE "swad15.64.5.css" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1 /* + Version 15.64.7: Dec 13, 2015 Code refactoring in contextual links. (187063 lines) Version 15.64.6: Dec 13, 2015 Code refactoring in contextual links. (186974 lines) Version 15.64.5: Dec 13, 2015 Code refactoring in record card. (186944 lines) Version 15.64.4: Dec 13, 2015 Links to web / social networks are not displayed when printing record card. (186986 lines) diff --git a/swad_connected.c b/swad_connected.c index de6be6156..8dc0c2eaf 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -141,8 +141,8 @@ void Con_PutLinkToLastClicks (void) { extern const char *Txt_Last_clicks; - Lay_PutContextualLink (ActLstClk,NULL, - "mouse-pointer64x64.png",Txt_Last_clicks); + Lay_PutContextualLink (ActLstClk,NULL,"mouse-pointer64x64.png", + Txt_Last_clicks,Txt_Last_clicks); } /*****************************************************************************/ diff --git a/swad_country.c b/swad_country.c index d7b65ad05..da6677733 100644 --- a/swad_country.c +++ b/swad_country.c @@ -224,7 +224,8 @@ static void Cty_Configuration (bool PrintView) fprintf (Gbl.F.Out,"
"); /* Link to print view */ - Lay_PutContextualLink (ActPrnCtyInf,NULL,"print64x64.png",Txt_Print); + Lay_PutContextualLink (ActPrnCtyInf,NULL,"print64x64.png", + Txt_Print,Txt_Print); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_course.c b/swad_course.c index 61ec249a8..886f33aff 100644 --- a/swad_course.c +++ b/swad_course.c @@ -192,7 +192,8 @@ static void Crs_Configuration (bool PrintView) fprintf (Gbl.F.Out,"
"); /* Link to print view */ - Lay_PutContextualLink (ActPrnCrsInf,NULL,"print64x64.png",Txt_Print); + Lay_PutContextualLink (ActPrnCrsInf,NULL,"print64x64.png", + Txt_Print,Txt_Print); /* Link to request enrollment in the current course */ if (Gbl.Usrs.Me.LoggedRole == Rol__GUEST_ || @@ -2896,7 +2897,8 @@ static void Crs_PutLinkToSearchCourses (void) (Gbl.CurrentCty.Cty.CtyCod > 0 ? ActCtyReqSch : ActSysReqSch)))), Crs_PutLinkToSearchCoursesParams, - "search64x64.gif",Txt_Search_courses); + "search64x64.gif", + Txt_Search_courses,Txt_Search_courses); } static void Crs_PutLinkToSearchCoursesParams (void) @@ -2914,7 +2916,8 @@ void Crs_PutFormToSelectMyCourses (void) extern const char *Txt_My_courses; /***** Put form to search / select courses *****/ - Lay_PutContextualLink (ActMyCrs,NULL,"hierarchy64x64.gif",Txt_My_courses); + Lay_PutContextualLink (ActMyCrs,NULL,"hierarchy64x64.gif", + Txt_My_courses,Txt_My_courses); } /*****************************************************************************/ diff --git a/swad_degree.c b/swad_degree.c index 92fd258be..4647359f2 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -317,7 +317,8 @@ static void Deg_Configuration (bool PrintView) fprintf (Gbl.F.Out,"
"); /* Link to print view */ - Lay_PutContextualLink (ActPrnDegInf,NULL,"print64x64.png",Txt_Print); + Lay_PutContextualLink (ActPrnDegInf,NULL,"print64x64.png", + Txt_Print,Txt_Print); /* Link to upload logo */ if (Gbl.Usrs.Me.LoggedRole >= Rol_DEG_ADM) diff --git a/swad_department.c b/swad_department.c index 8695f1414..3cb3ec603 100644 --- a/swad_department.c +++ b/swad_department.c @@ -212,7 +212,8 @@ static void Dpt_PutFormToEditDpts (void) extern const char *Txt_Edit; fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActEdiDpt,NULL,"edit64x64.png",Txt_Edit); + Lay_PutContextualLink (ActEdiDpt,NULL,"edit64x64.png", + Txt_Edit,Txt_Edit); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_enrollment.c b/swad_enrollment.c index 459671438..b18281291 100644 --- a/swad_enrollment.c +++ b/swad_enrollment.c @@ -152,7 +152,8 @@ void Enr_PutLinkToRequestSignUp (void) extern const char *Txt_Sign_up; /***** Show the form *****/ - Lay_PutContextualLink (ActReqSignUp,NULL,"signup16x16.gif",Txt_Sign_up); + Lay_PutContextualLink (ActReqSignUp,NULL,"signup16x16.gif", + Txt_Sign_up,Txt_Sign_up); } /*****************************************************************************/ @@ -352,12 +353,14 @@ void Enr_ReqAcceptRegisterInCrs (void) /***** Send button to accept register in the current course *****/ Lay_PutContextualLink (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActAccEnrStd : ActAccEnrTch, - NULL,"ok_green16x16.gif",Txt_Confirm_my_enrollment); + NULL,"ok_green16x16.gif", + Txt_Confirm_my_enrollment,Txt_Confirm_my_enrollment); /***** Send button to refuse register in the current course *****/ Lay_PutContextualLink (Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActRemMe_Std : ActRemMe_Tch, - NULL,"remove-on64x64.png",Txt_Remove_me_from_this_course); + NULL,"remove-on64x64.png", + Txt_Remove_me_from_this_course,Txt_Remove_me_from_this_course); fprintf (Gbl.F.Out,"
"); @@ -682,7 +685,8 @@ void Enr_PutLinkToRemOldUsrs (void) extern const char *Txt_Eliminate_old_users; /***** Put form to remove old users *****/ - Lay_PutContextualLink (ActReqRemOldUsr,NULL,"remove-on64x64.png",Txt_Eliminate_old_users); + Lay_PutContextualLink (ActReqRemOldUsr,NULL,"remove-on64x64.png", + Txt_Eliminate_old_users,Txt_Eliminate_old_users); } /*****************************************************************************/ @@ -1773,7 +1777,8 @@ static void Enr_PutLinkToRemAllStdsThisCrs (void) /***** Put form to remove all the students in the current course *****/ Lay_PutContextualLink (ActReqRemAllStdCrs,NULL, - "remove-on64x64.png",Txt_Remove_all_students); + "remove-on64x64.png", + Txt_Remove_all_students,Txt_Remove_all_students); } /*****************************************************************************/ @@ -2750,6 +2755,8 @@ void Enr_PutLinkToAdminOneUsr (Act_Action_t NextAction) extern const char *Txt_Admin_one_user; Lay_PutContextualLink (NextAction,NULL,"configtest16x16.gif", + Enr_CheckIfICanAdminOtherUsrs () ? Txt_Admin_one_user : + Txt_Admin_me, Enr_CheckIfICanAdminOtherUsrs () ? Txt_Admin_one_user : Txt_Admin_me); } @@ -2766,6 +2773,8 @@ void Enr_PutLinkToAdminSeveralUsrs (Rol_Role_t Role) Lay_PutContextualLink (Role == Rol_STUDENT ? ActReqEnrSevStd : ActReqEnrSevTch, NULL,"configtest16x16.gif", + Role == Rol_STUDENT ? Txt_Admin_several_students : + Txt_Admin_several_teachers, Role == Rol_STUDENT ? Txt_Admin_several_students : Txt_Admin_several_teachers); } diff --git a/swad_exam.c b/swad_exam.c index 536eaef77..d938c928f 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -444,7 +444,8 @@ static void Exa_ListExamAnnouncements (Exa_TypeViewExamAnnouncement_t TypeViewEx case Rol_SYS_ADM: fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (ActEdiExaAnn,NULL, - "plus64x64.png",Txt_New_announcement_OF_EXAM); + "plus64x64.png", + Txt_New_announcement_OF_EXAM,Txt_New_announcement_OF_EXAM); fprintf (Gbl.F.Out,"
"); break; default: diff --git a/swad_file_browser.c b/swad_file_browser.c index 8e7cd3d1b..1345c7c3d 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -4302,11 +4302,13 @@ static void Brw_PutFormToShowOrAdmin (Brw_ShowOrAdmin_t ShowOrAdmin, { case Brw_SHOW: Lay_PutContextualLink (Action,Brw_PutFormToShowOrAdminParams, - "eye-on64x64.png",Txt_View); + "eye-on64x64.png", + Txt_View,Txt_View); break; case Brw_ADMIN: Lay_PutContextualLink (Action,Brw_PutFormToShowOrAdminParams, - "edit64x64.png",Txt_Edit); + "edit64x64.png", + Txt_Edit,Txt_Edit); break; } fprintf (Gbl.F.Out,"
"); diff --git a/swad_holiday.c b/swad_holiday.c index ab00fa22d..8dd3227f9 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -199,7 +199,8 @@ static void Hld_PutFormToEditHlds (void) extern const char *Txt_Edit; fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActEdiHld,NULL,"edit64x64.png",Txt_Edit); + Lay_PutContextualLink (ActEdiHld,NULL,"edit64x64.png", + Txt_Edit,Txt_Edit); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_info.c b/swad_info.c index 0b801ae3f..161deac3d 100644 --- a/swad_info.c +++ b/swad_info.c @@ -417,7 +417,8 @@ static void Inf_PutFormToEditInfo (Inf_InfoType_t InfoType) extern const char *Txt_Edit; fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (Inf_ActionsEditInfo[InfoType],NULL,"edit64x64.png",Txt_Edit); + Lay_PutContextualLink (Inf_ActionsEditInfo[InfoType],NULL,"edit64x64.png", + Txt_Edit,Txt_Edit); fprintf (Gbl.F.Out,"
"); } @@ -923,7 +924,8 @@ void Inf_FormsToSelSendInfo (void) /***** Put link to view *****/ fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (Inf_ActionsSeeInfo[InfoType],NULL, - "eye-on64x64.png",Txt_View); + "eye-on64x64.png", + Txt_View,Txt_View); fprintf (Gbl.F.Out,"
"); /***** Get info source from database *****/ diff --git a/swad_institution.c b/swad_institution.c index 2d3575e89..49e70d1b2 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -261,7 +261,8 @@ static void Ins_Configuration (bool PrintView) fprintf (Gbl.F.Out,"
"); /* Link to print view */ - Lay_PutContextualLink (ActPrnInsInf,NULL,"print64x64.png",Txt_Print); + Lay_PutContextualLink (ActPrnInsInf,NULL,"print64x64.png", + Txt_Print,Txt_Print); /* Link to upload logo */ if (Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM) diff --git a/swad_layout.c b/swad_layout.c index 986caf034..011233ee3 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -922,7 +922,8 @@ void Lay_PutFormToView (Act_Action_t Action) extern const char *Txt_View; fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (Action,NULL,"eye-on64x64.png",Txt_View); + Lay_PutContextualLink (Action,NULL,"eye-on64x64.png", + Txt_View,Txt_View); fprintf (Gbl.F.Out,"
"); } @@ -935,7 +936,8 @@ void Lay_PutFormToEdit (Act_Action_t Action) extern const char *Txt_Edit; fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (Action,NULL,"edit64x64.png",Txt_Edit); + Lay_PutContextualLink (Action,NULL,"edit64x64.png", + Txt_Edit,Txt_Edit); fprintf (Gbl.F.Out,"
"); } @@ -944,27 +946,26 @@ void Lay_PutFormToEdit (Act_Action_t Action) /*****************************************************************************/ void Lay_PutContextualLink (Act_Action_t NextAction,void (*FuncParams) (), - const char *Icon,const char *Title) + const char *Icon, + const char *Title,const char *Text) { extern const char *The_ClassFormBold[The_NUM_THEMES]; - // fprintf (Gbl.F.Out,"
"); - Act_FormStart (NextAction); if (FuncParams) FuncParams (); - Lay_PutIconLink (Icon,Title,The_ClassFormBold[Gbl.Prefs.Theme],Title); + Lay_PutIconLink (Icon,Title,Text, + Text ? The_ClassFormBold[Gbl.Prefs.Theme] : + NULL); Act_FormEnd (); - - // fprintf (Gbl.F.Out,"
"); } /*****************************************************************************/ /****************** Show an icon with a link (without text) ******************/ /*****************************************************************************/ -void Lay_PutIconLink (const char *Icon,const char *Title, - const char *LinkStyle,const char *Text) +void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text, + const char *LinkStyle) { Act_LinkFormSubmit (Title,LinkStyle); Lay_PutIconWithText (Icon,Title,Text); diff --git a/swad_layout.h b/swad_layout.h index 12f638a1c..0507c9435 100644 --- a/swad_layout.h +++ b/swad_layout.h @@ -74,9 +74,10 @@ void Lay_WriteTitle (const char *Title); void Lay_PutFormToView (Act_Action_t Action); void Lay_PutFormToEdit (Act_Action_t Action); void Lay_PutContextualLink (Act_Action_t NextAction,void (*FuncParams) (), - const char *Icon,const char *Title); -void Lay_PutIconLink (const char *Icon,const char *Title, - const char *LinkStyle,const char *Text); + const char *Icon, + const char *Title,const char *Text); +void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text, + const char *LinkStyle); void Lay_PutIconWithText (const char *Icon,const char *Alt,const char *Text); void Lay_PutCalculateIconWithText (const char *Alt,const char *Text); diff --git a/swad_link.c b/swad_link.c index 13113955a..305d38b7d 100644 --- a/swad_link.c +++ b/swad_link.c @@ -159,7 +159,8 @@ static void Lnk_PutFormToEditLinks (void) extern const char *Txt_Edit; fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActEdiLnk,NULL,"edit64x64.png",Txt_Edit); + Lay_PutContextualLink (ActEdiLnk,NULL,"edit64x64.png", + Txt_Edit,Txt_Edit); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_logo.c b/swad_logo.c index e4ba7a23f..70db211f6 100644 --- a/swad_logo.c +++ b/swad_logo.c @@ -219,8 +219,11 @@ void Log_PutFormToChangeLogo (Sco_Scope_t Scope) LogoExists = Fil_CheckIfPathExists (PathLogo); /***** Link for changing / uploading the logo *****/ - Lay_PutContextualLink (Action,NULL,Icon,LogoExists ? Txt_Change_logo : - Txt_Upload_logo); + Lay_PutContextualLink (Action,NULL,Icon, + LogoExists ? Txt_Change_logo : + Txt_Upload_logo, + LogoExists ? Txt_Change_logo : + Txt_Upload_logo); } /*****************************************************************************/ diff --git a/swad_mail.c b/swad_mail.c index 1d76f2511..f22b0e581 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -176,7 +176,8 @@ static void Mai_PutFormToEditMailDomains (void) extern const char *Txt_Edit; fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActEdiMai,NULL,"edit64x64.png",Txt_Edit); + Lay_PutContextualLink (ActEdiMai,NULL,"edit64x64.png", + Txt_Edit,Txt_Edit); fprintf (Gbl.F.Out,"
"); } @@ -919,14 +920,15 @@ void Mai_PutLinkToChangeOtherUsrEmail (void) /***** Link for changing the password *****/ if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me - Lay_PutContextualLink (ActFrmUsrAcc,NULL, - "msg64x64.gif",Txt_Change_email); + Lay_PutContextualLink (ActFrmUsrAcc,NULL,"msg64x64.gif", + Txt_Change_email,Txt_Change_email); else // Not me Lay_PutContextualLink ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActFrmMaiStd : (Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER ? ActFrmMaiTch : ActFrmMaiOth), Usr_PutParamOtherUsrCodEncrypted, - "msg64x64.gif",Txt_Change_email); + "msg64x64.gif", + Txt_Change_email,Txt_Change_email); } /*****************************************************************************/ diff --git a/swad_message.c b/swad_message.c index e327eb58e..aa0ab565e 100644 --- a/swad_message.c +++ b/swad_message.c @@ -1698,7 +1698,8 @@ static void Msg_PutLinkToViewBannedUsers(void) { extern const char *Txt_Banned_users; - Lay_PutContextualLink (ActLstBanUsr,NULL,"stop16x16.gif",Txt_Banned_users); + Lay_PutContextualLink (ActLstBanUsr,NULL,"stop16x16.gif", + Txt_Banned_users,Txt_Banned_users); } /*****************************************************************************/ @@ -2228,7 +2229,8 @@ void Msg_ShowFormDelSentOrRecMsgs (Msg_TypeOfMessages_t TypeOfMessages,unsigned Lay_PutContextualLink ((TypeOfMessages == Msg_MESSAGES_RECEIVED) ? ActReqDelAllRcvMsg : ActReqDelAllSntMsg, Msg_PutHiddenParamsMsgsFilters, - "remove-on64x64.png",Gbl.Title); + "remove-on64x64.png", + Gbl.Title,Gbl.Title); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_notice.c b/swad_notice.c index b43415fe2..4a630bffa 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -213,7 +213,8 @@ void Not_ListFullNotices (void) if (ICanEditNotices) { fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActWriNot,NULL,"plus64x64.png",Txt_New_notice); + Lay_PutContextualLink (ActWriNot,NULL,"plus64x64.png", + Txt_New_notice,Txt_New_notice); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_notification.c b/swad_notification.c index aeb6f25e1..fdea83307 100644 --- a/swad_notification.c +++ b/swad_notification.c @@ -1642,7 +1642,8 @@ static void Ntf_PutLinkToChangePrefs (void) { extern const char *Txt_Change_preferences; - Lay_PutContextualLink (ActEdiPrf,NULL,"heart16x16.gif",Txt_Change_preferences); + Lay_PutContextualLink (ActEdiPrf,NULL,"heart16x16.gif", + Txt_Change_preferences,Txt_Change_preferences); } /*****************************************************************************/ diff --git a/swad_password.c b/swad_password.c index 8c45dded1..cdf147925 100644 --- a/swad_password.c +++ b/swad_password.c @@ -218,7 +218,8 @@ void Pwd_PutLinkToSendNewPasswd (void) extern const char *Txt_Forgotten_password; Lay_PutContextualLink (ActReqSndNewPwd,Pwd_PutLinkToSendNewPasswdParams, - "key64x64.gif",Txt_Forgotten_password); + "key64x64.gif", + Txt_Forgotten_password,Txt_Forgotten_password); } static void Pwd_PutLinkToSendNewPasswdParams (void) @@ -842,7 +843,8 @@ void Pwd_PutLinkToChangeMyPassword (void) extern const char *Txt_Change_password; /***** Link for changing the password *****/ - Lay_PutContextualLink (ActFrmChgMyPwd,NULL,"key64x64.gif",Txt_Change_password); + Lay_PutContextualLink (ActFrmChgMyPwd,NULL,"key64x64.gif", + Txt_Change_password,Txt_Change_password); } /*****************************************************************************/ @@ -860,8 +862,8 @@ void Pwd_PutLinkToChangeOtherUsrPassword (void) Lay_PutContextualLink ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActFrmPwdStd : (Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER ? ActFrmPwdTch : ActFrmPwdOth), - Usr_PutParamOtherUsrCodEncrypted, - "key64x64.gif",Txt_Change_password); + Usr_PutParamOtherUsrCodEncrypted,"key64x64.gif", + Txt_Change_password,Txt_Change_password); } /*****************************************************************************/ diff --git a/swad_photo.c b/swad_photo.c index 1c7a0cc92..9a92322a9 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -174,6 +174,8 @@ void Pho_PutLinkToChangeMyPhoto (void) /***** Link for changing / uploading the photo *****/ Lay_PutContextualLink (ActReqMyPho,NULL,"photo64x64.gif", + Gbl.Usrs.Me.MyPhotoExists ? Txt_Change_photo : + Txt_Upload_photo, Gbl.Usrs.Me.MyPhotoExists ? Txt_Change_photo : Txt_Upload_photo); } @@ -200,8 +202,11 @@ void Pho_PutLinkToChangeOtherUsrPhoto (void) (Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER ? ActReqTchPho : ActReqOthPho), // Guest, visitor or admin Usr_PutParamOtherUsrCodEncrypted, - "photo64x64.gif",PhotoExists ? Txt_Change_photo : - Txt_Upload_photo); + "photo64x64.gif", + PhotoExists ? Txt_Change_photo : + Txt_Upload_photo, + PhotoExists ? Txt_Change_photo : + Txt_Upload_photo); } } @@ -214,7 +219,8 @@ static void Pho_PutLinkToRemoveMyPhoto (void) extern const char *Txt_Remove_photo; /***** Link for removing the photo *****/ - Lay_PutContextualLink (ActRemMyPho,NULL,"remove-on64x64.png",Txt_Remove_photo); + Lay_PutContextualLink (ActRemMyPho,NULL,"remove-on64x64.png", + Txt_Remove_photo,Txt_Remove_photo); } /*****************************************************************************/ @@ -230,7 +236,8 @@ static void Pho_PutLinkToRemoveOtherUsrPhoto (const struct UsrData *UsrDat) (UsrDat->RoleInCurrentCrsDB == Rol_TEACHER ? ActRemTchPho : ActRemOthPho), // Guest, visitor or admin Usr_PutParamOtherUsrCodEncrypted, - "remove-on64x64.png",Txt_Remove_photo); + "remove-on64x64.png", + Txt_Remove_photo,Txt_Remove_photo); } /*****************************************************************************/ @@ -1750,7 +1757,8 @@ static void Pho_PutLinkToPrintViewOfDegreeStats (void) fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (ActPrnPhoDeg,Pho_PutLinkToPrintViewOfDegreeStatsParams, - "print64x64.png",Txt_Print); + "print64x64.png", + Txt_Print,Txt_Print); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_place.c b/swad_place.c index 8387b6c0e..1457f3487 100644 --- a/swad_place.c +++ b/swad_place.c @@ -203,7 +203,8 @@ static void Plc_PutFormToEditPlcs (void) extern const char *Txt_Edit; fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActEdiPlc,NULL,"edit64x64.png",Txt_Edit); + Lay_PutContextualLink (ActEdiPlc,NULL,"edit64x64.png", + Txt_Edit,Txt_Edit); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_plugin.c b/swad_plugin.c index f314454be..8c6347c44 100644 --- a/swad_plugin.c +++ b/swad_plugin.c @@ -155,7 +155,8 @@ static void Plg_PutFormToEditPlugins (void) extern const char *Txt_Edit; fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActEdiPlg,NULL,"edit64x64.png",Txt_Edit); + Lay_PutContextualLink (ActEdiPlg,NULL,"edit64x64.png", + Txt_Edit,Txt_Edit); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_privacy.c b/swad_privacy.c index 96ec1dc10..fd26b3bc2 100644 --- a/swad_privacy.c +++ b/swad_privacy.c @@ -72,7 +72,8 @@ void Pri_PutLinkToChangeMyPrivacy (void) extern const char *Txt_Privacy; /***** Link to edit my privacy *****/ - Lay_PutContextualLink (ActEdiPri,NULL,"lock64x64.png",Txt_Privacy); + Lay_PutContextualLink (ActEdiPri,NULL,"lock64x64.png", + Txt_Privacy,Txt_Privacy); } /*****************************************************************************/ diff --git a/swad_record.c b/swad_record.c index fefd143a1..98f98bb60 100644 --- a/swad_record.c +++ b/swad_record.c @@ -859,7 +859,8 @@ void Rec_PutLinkToEditRecordFields (void) extern const char *Txt_Edit_record_fields; /***** Link to edit record fields *****/ - Lay_PutContextualLink (ActEdiRecFie,NULL,"edit64x64.png",Txt_Edit_record_fields); + Lay_PutContextualLink (ActEdiRecFie,NULL,"edit64x64.png", + Txt_Edit_record_fields,Txt_Edit_record_fields); } /*****************************************************************************/ @@ -3315,8 +3316,8 @@ static void Rec_PutLinkToChangeMyInsCtrDpt (void) extern const char *Txt_Edit_my_institution; /***** Link to edit my institution, centre, department... *****/ - Lay_PutContextualLink (ActReqEdiMyIns,NULL, - "ins64x64.gif",Txt_Edit_my_institution); + Lay_PutContextualLink (ActReqEdiMyIns,NULL,"ins64x64.gif", + Txt_Edit_my_institution,Txt_Edit_my_institution); } /*****************************************************************************/ @@ -3328,8 +3329,8 @@ static void Rec_PutLinkToChangeMySocialNetworks (void) extern const char *Txt_Edit_my_webs_networks; /***** Link to edit my social networks *****/ - Lay_PutContextualLink (ActReqEdiMyNet,NULL, - "earth64x64.gif",Txt_Edit_my_webs_networks); + Lay_PutContextualLink (ActReqEdiMyNet,NULL,"earth64x64.gif", + Txt_Edit_my_webs_networks,Txt_Edit_my_webs_networks); } /*****************************************************************************/ diff --git a/swad_survey.c b/swad_survey.c index fcf4b2d67..f92fb4056 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -703,7 +703,8 @@ static void Svy_PutFormToCreateNewSvy (void) fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (ActFrmNewSvy,Svy_PutFormToCreateNewSvyParams, - "plus64x64.png",Txt_New_survey); + "plus64x64.png", + Txt_New_survey,Txt_New_survey); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_syllabus.c b/swad_syllabus.c index 31b2ba277..cc25d6cd2 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -201,7 +201,8 @@ void Syl_EditSyllabus (void) /***** Put link to view *****/ fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (Inf_ActionsSeeInfo[InfoType],NULL, - "eye-on64x64.png",Txt_View); + "eye-on64x64.png", + Txt_View,Txt_View); fprintf (Gbl.F.Out,"
"); } diff --git a/swad_test.c b/swad_test.c index 9765e3d06..3246a91e5 100644 --- a/swad_test.c +++ b/swad_test.c @@ -320,7 +320,8 @@ static void Tst_PutFormToSeeResultsOfUsersTests (void) Lay_PutContextualLink (Gbl.Usrs.Me.LoggedRole == Rol_STUDENT ? ActReqSeeMyTstExa : ActReqSeeUsrTstExa, - NULL,"file64x64.gif",Txt_Results_tests); + NULL,"file64x64.gif", + Txt_Results_tests,Txt_Results_tests); } /*****************************************************************************/ @@ -331,7 +332,8 @@ static void Tst_PutFormToEdit (void) { extern const char *Txt_Edit; - Lay_PutContextualLink (ActEdiTstQst,NULL,"edit64x64.png",Txt_Edit); + Lay_PutContextualLink (ActEdiTstQst,NULL,"edit64x64.png", + Txt_Edit,Txt_Edit); } /*****************************************************************************/ @@ -342,7 +344,8 @@ static void Tst_PutFormToConfigure (void) { extern const char *Txt_Configure; - Lay_PutContextualLink (ActCfgTst,NULL,"configtest16x16.gif",Txt_Configure); + Lay_PutContextualLink (ActCfgTst,NULL,"configtest16x16.gif", + Txt_Configure,Txt_Configure); } /*****************************************************************************/ diff --git a/swad_timetable.c b/swad_timetable.c index 74b9a0293..9ec079c71 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -265,15 +265,18 @@ void TT_ShowClassTimeTable (void) if (PutEditCrsTT) Lay_PutContextualLink (ActEdiCrsTT,Grp_PutParamWhichGrps, - "edit64x64.png",Txt_Edit); + "edit64x64.png", + Txt_Edit,Txt_Edit); if (PutEditOfficeHours) - Lay_PutContextualLink (ActEdiTut,NULL,"edit64x64.png",Txt_Edit_office_hours); + Lay_PutContextualLink (ActEdiTut,NULL,"edit64x64.png", + Txt_Edit_office_hours,Txt_Edit_office_hours); if (!PrintView) Lay_PutContextualLink (TimeTableType == TT_COURSE_TIMETABLE ? ActPrnCrsTT : ActPrnMyTT, - Grp_PutParamWhichGrps,"print64x64.png",Txt_Print); + Grp_PutParamWhichGrps,"print64x64.png", + Txt_Print,Txt_Print); fprintf (Gbl.F.Out,"
"); } @@ -339,7 +342,8 @@ void TT_EditCrsTimeTable (void) /***** Link (form) to see my timetable *****/ fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActSeeCrsTT,NULL,"clock16x16.gif",Txt_Show_timetable); + Lay_PutContextualLink (ActSeeCrsTT,NULL,"clock16x16.gif", + Txt_Show_timetable,Txt_Show_timetable); fprintf (Gbl.F.Out,"
"); /***** Editable time table *****/ @@ -359,7 +363,8 @@ void TT_ShowMyTutTimeTable (void) /***** Link (form) to see my timetable *****/ fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActSeeMyTT,NULL,"clock16x16.gif",Txt_Show_timetable); + Lay_PutContextualLink (ActSeeMyTT,NULL,"clock16x16.gif", + Txt_Show_timetable,Txt_Show_timetable); fprintf (Gbl.F.Out,"
"); /***** Time table *****/ diff --git a/swad_user.c b/swad_user.c index 3bbc20c55..e19570982 100644 --- a/swad_user.c +++ b/swad_user.c @@ -1426,7 +1426,8 @@ void Usr_WriteFormLogin (void) fprintf (Gbl.F.Out,"
"); /* Link to create a new account */ - Lay_PutContextualLink (ActFrmUsrAcc,NULL,"arroba64x64.gif",Txt_Create_account); + Lay_PutContextualLink (ActFrmUsrAcc,NULL,"arroba64x64.gif", + Txt_Create_account,Txt_Create_account); /* Link to enter from external site */ if (Cfg_EXTERNAL_LOGIN_URL[0] && @@ -2573,7 +2574,8 @@ void Usr_ShowFormsLogoutAndRole (void) /***** Link to log out *****/ fprintf (Gbl.F.Out,"
"); - Lay_PutContextualLink (ActLogOut,NULL,"logout64x64.png",Txt_Log_out); + Lay_PutContextualLink (ActLogOut,NULL,"logout64x64.png", + Txt_Log_out,Txt_Log_out); fprintf (Gbl.F.Out,"
"); /***** Write message with my new logged role *****/ @@ -6512,7 +6514,8 @@ static void Usr_PutLinkToSeeAdmins (void) extern const char *Txt_See_administrators; /***** Put form to list admins *****/ - Lay_PutContextualLink (ActLstOth,NULL,"adm16x16.gif",Txt_See_administrators); + Lay_PutContextualLink (ActLstOth,NULL,"adm16x16.gif", + Txt_See_administrators,Txt_See_administrators); } /*****************************************************************************/ @@ -6524,7 +6527,8 @@ static void Usr_PutLinkToSeeGuests (void) extern const char *Txt_See_guests; /***** Put form to list guests *****/ - Lay_PutContextualLink (ActLstGst,NULL,"usrs16x16.gif",Txt_See_guests); + Lay_PutContextualLink (ActLstGst,NULL,"usrs16x16.gif", + Txt_See_guests,Txt_See_guests); } /*****************************************************************************/ @@ -6601,12 +6605,14 @@ void Usr_SeeGuests (void) case Usr_CLASS_PHOTO: /***** Link to print view *****/ Lay_PutContextualLink (ActPrnGstPho,Usr_PutLinkToShowGuestsAllDataParams, - "print64x64.png",Txt_Print); + "print64x64.png", + Txt_Print,Txt_Print); break; case Usr_LIST: /****** Link to show all the data ******/ Lay_PutContextualLink (ActLstGstAll,Usr_PutLinkToShowGuestsAllDataParams, - "table16x16.gif",Txt_Show_all_data); + "table16x16.gif", + Txt_Show_all_data,Txt_Show_all_data); break; } fprintf (Gbl.F.Out,"
"); @@ -6786,7 +6792,8 @@ void Usr_SeeStudents (void) /***** Link to print view *****/ fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (ActPrnStdPho,Usr_PutLinkToShowStdsAllDataParams, - "print64x64.png",Txt_Print); + "print64x64.png", + Txt_Print,Txt_Print); fprintf (Gbl.F.Out,"
"); break; case Usr_LIST: @@ -6795,7 +6802,8 @@ void Usr_SeeStudents (void) /****** Link to show all the data ******/ fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (ActLstStdAll,Usr_PutLinkToShowStdsAllDataParams, - "table16x16.gif",Txt_Show_all_data); + "table16x16.gif", + Txt_Show_all_data,Txt_Show_all_data); fprintf (Gbl.F.Out,"
"); } break; @@ -6953,7 +6961,8 @@ void Usr_SeeTeachers (void) case Usr_CLASS_PHOTO: fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (ActPrnTchPho,Usr_PutLinkToShowTchsAllDataParams, - "print64x64.png",Txt_Print); + "print64x64.png", + Txt_Print,Txt_Print); fprintf (Gbl.F.Out,"
"); break; case Usr_LIST: @@ -6962,7 +6971,8 @@ void Usr_SeeTeachers (void) /****** Link to show all the data ******/ fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (ActLstTchAll,Usr_PutLinkToShowTchsAllDataParams, - "table16x16.gif",Txt_Show_all_data); + "table16x16.gif", + Txt_Show_all_data,Txt_Show_all_data); fprintf (Gbl.F.Out,"
"); } break; @@ -7049,8 +7059,8 @@ static void Usr_PutLinkToListOfficialStudents (void) Gbl.Imported.ExternalSesId[0] && Gbl.Imported.ExternalRole == Rol_TEACHER) // ...as a teacher /***** Link to list official students *****/ - Lay_PutContextualLink (ActGetExtLstStd,NULL, - "list16x16.gif",Txt_Official_students); + Lay_PutContextualLink (ActGetExtLstStd,NULL,"list16x16.gif", + Txt_Official_students,Txt_Official_students); } /*****************************************************************************/ diff --git a/swad_zip.c b/swad_zip.c index ecfb6f4d1..ed965d691 100644 --- a/swad_zip.c +++ b/swad_zip.c @@ -118,7 +118,8 @@ void ZIP_PutButtonToCreateZIPAsgWrk (void) fprintf (Gbl.F.Out,"
"); Lay_PutContextualLink (ActAdmAsgWrkCrs,ZIP_PutButtonToCreateZIPAsgWrkParams, - "download16x16.gif",Txt_Create_ZIP_file); + "download16x16.gif", + Txt_Create_ZIP_file,Txt_Create_ZIP_file); fprintf (Gbl.F.Out,"
"); }