Version 15.239

This commit is contained in:
Antonio Cañas Vargas 2016-07-01 16:32:42 +02:00
parent e906a6c136
commit 70a93af3c9
51 changed files with 470 additions and 231 deletions

View File

@ -449,7 +449,7 @@ static void ID_PutButtonToReqConfirmID (struct UsrData *UsrDat,unsigned NumID)
fprintf (Gbl.F.Out,"<input type=\"hidden\" name=\"UsrID\" value=\"%s\" />",
UsrDat->IDs.List[NumID].ID);
Lay_PutIconLink ("ok_on16x16.gif",Txt_Confirm_ID,Txt_Confirm_ID,
The_ClassFormBold[Gbl.Prefs.Theme]);
The_ClassFormBold[Gbl.Prefs.Theme],NULL);
Act_FormEnd ();
}
@ -483,14 +483,16 @@ void ID_PutLinkToChangeUsrIDs (void)
if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me
Lay_PutContextualLink (ActFrmUsrAcc,NULL,
"arroba64x64.gif",
Txt_Change_IDs,Txt_Change_IDs);
Txt_Change_IDs,Txt_Change_IDs,
NULL);
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,Txt_Change_IDs);
Txt_Change_IDs,Txt_Change_IDs,
NULL);
}
/*****************************************************************************/

View File

@ -76,9 +76,11 @@ void QR_PutLinkToPrintQRCode (const char *Nickname,bool PrintText)
/***** Link to print QR *****/
Gbl.Usrs.NicknameForQR = Nickname;
Lay_PutContextualLink (ActPrnUsrQR,QR_PutParamQRString,"qr64x64.gif",
Lay_PutContextualLink (ActPrnUsrQR,QR_PutParamQRString,
"qr64x64.gif",
Txt_QR_code,PrintText ? Txt_QR_code :
NULL);
NULL,
NULL);
}
/*****************************************************************************/

View File

@ -96,7 +96,8 @@ void Acc_PutLinkToCreateAccount (void)
Lay_PutContextualLink (ActFrmUsrAcc,NULL,
"arroba64x64.gif",
Txt_Create_account,Txt_Create_account);
Txt_Create_account,Txt_Create_account,
NULL);
}
/*****************************************************************************/
@ -271,7 +272,8 @@ static void Acc_PutLinkToRemoveMyAccount (void)
Lay_PutContextualLink (ActReqRemMyAcc,Acc_PutLinkToRemoveMyAccountParams,
"remove-on64x64.png",
Txt_Remove_account,Txt_Remove_account);
Txt_Remove_account,Txt_Remove_account,
NULL);
}
static void Acc_PutLinkToRemoveMyAccountParams (void)

View File

@ -4690,6 +4690,23 @@ void Act_LinkFormSubmitId (const char *Title,const char *LinkStyle,const char *I
Id);
}
void Act_LinkFormSubmitFunction (const char *Title,const char *LinkStyle,const char *Function)
{
fprintf (Gbl.F.Out,"<a href=\"\"");
if (Title)
if (Title[0])
fprintf (Gbl.F.Out," title=\"%s\"",Title);
if (LinkStyle)
if (LinkStyle[0])
fprintf (Gbl.F.Out," class=\"%s\"",LinkStyle);
fprintf (Gbl.F.Out," onclick=\""
"%s;"
"document.getElementById('%s').submit();"
"return false;\">",
Function,
Gbl.Form.Id);
}
void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle)
{
fprintf (Gbl.F.Out,"<a href=\"\"");
@ -4699,16 +4716,6 @@ void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle)
if (LinkStyle)
if (LinkStyle[0])
fprintf (Gbl.F.Out," class=\"%s\"",LinkStyle);
/*
fprintf (Gbl.F.Out," onclick=\""
"document.getElementById('update_%d').style.display='none';" // Icon to be hidden on click
"document.getElementById('updating_%d').style.display='';" // Icon to be shown on click
"document.getElementById('%s').submit();"
"return false;\">",
Gbl.Form.Num,
Gbl.Form.Num,
Gbl.Form.Id);
*/
fprintf (Gbl.F.Out," onclick=\""
"AnimateIcon(%d);"
"document.getElementById('%s').submit();"

View File

@ -1507,6 +1507,7 @@ void Act_FormEnd (void);
void Act_LinkFormSubmit (const char *Title,const char *LinkStyle);
void Act_LinkFormSubmitUnique (const char *Title,const char *LinkStyle);
void Act_LinkFormSubmitId (const char *Title,const char *LinkStyle,const char *Id);
void Act_LinkFormSubmitFunction (const char *Title,const char *LinkStyle,const char *Function);
void Act_LinkFormSubmitAnimated (const char *Title,const char *LinkStyle);
void Act_SetUniqueId (char UniqueId[Act_MAX_LENGTH_ID]);

View File

@ -175,8 +175,10 @@ static void Ann_PutIconToAddNewAnnouncement (void)
{
extern const char *Txt_New_announcement;
Lay_PutContextualLink (ActWriAnn,NULL,"plus64x64.png",
Txt_New_announcement,NULL);
Lay_PutContextualLink (ActWriAnn,NULL,
"plus64x64.png",
Txt_New_announcement,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -219,7 +219,9 @@ static void Asg_PutIconToCreateNewAsg (void)
/***** Put form to create a new assignment *****/
Lay_PutContextualLink (ActFrmNewAsg,Asg_PutParamsToCreateNewAsg,
"plus64x64.png",Txt_New_assignment,NULL);
"plus64x64.png",
Txt_New_assignment,NULL,
NULL);
}
/*****************************************************************************/
@ -516,20 +518,28 @@ static void Asg_PutFormsToRemEditOneAsg (long AsgCod,bool Hidden)
Gbl.Asgs.AsgCodToEdit = AsgCod; // Used as parameter in contextual links
/***** Put form to remove assignment *****/
Lay_PutContextualLink (ActReqRemAsg,Asg_PutParams,"remove-on64x64.png",
Txt_Remove,NULL);
Lay_PutContextualLink (ActReqRemAsg,Asg_PutParams,
"remove-on64x64.png",
Txt_Remove,NULL,
NULL);
/***** Put form to hide/show assignment *****/
if (Hidden)
Lay_PutContextualLink (ActShoAsg,Asg_PutParams,"eye-slash-on64x64.png",
Txt_Show,NULL);
Lay_PutContextualLink (ActShoAsg,Asg_PutParams,
"eye-slash-on64x64.png",
Txt_Show,NULL,
NULL);
else
Lay_PutContextualLink (ActHidAsg,Asg_PutParams,"eye-on64x64.png",
Txt_Hide,NULL);
Lay_PutContextualLink (ActHidAsg,Asg_PutParams,
"eye-on64x64.png",
Txt_Hide,NULL,
NULL);
/***** Put form to edit assignment *****/
Lay_PutContextualLink (ActEdiOneAsg,Asg_PutParams,"edit64x64.png",
Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiOneAsg,Asg_PutParams,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
fprintf (Gbl.F.Out,"</div>");
}

View File

@ -295,7 +295,9 @@ static void Att_PutIconToCreateNewAttEvent (void)
/***** Put form to create a new attendance event *****/
Lay_PutContextualLink (ActFrmNewAtt,Att_PutParamsToCreateNewAttEvent,
"plus64x64.png",Txt_New_event,NULL);
"plus64x64.png",
Txt_New_event,NULL,
NULL);
}
/*****************************************************************************/
@ -520,7 +522,8 @@ static void Att_PutFormToListMyAttendance (void)
Lay_PutContextualLink (ActSeeLstMyAtt,NULL,
"list64x64.gif",
Txt_Attendance_list,Txt_Attendance_list);
Txt_Attendance_list,Txt_Attendance_list,
NULL);
}
/*****************************************************************************/
@ -533,7 +536,8 @@ static void Att_PutFormToListStdsAttendance (void)
Lay_PutContextualLink (ActReqLstStdAtt,Att_PutFormToListStdsParams,
"list64x64.gif",
Txt_Attendance_list,Txt_Attendance_list);
Txt_Attendance_list,Txt_Attendance_list,
NULL);
}
static void Att_PutFormToListStdsParams (void)
@ -558,20 +562,28 @@ static void Att_PutFormsToRemEditOneAttEvent (long AttCod,bool Hidden)
Gbl.AttEvents.AttCodToEdit = AttCod; // Used as parameters in contextual links
/***** Put form to remove attendance event *****/
Lay_PutContextualLink (ActReqRemAtt,Att_PutParams,"remove-on64x64.png",
Txt_Remove,NULL);
Lay_PutContextualLink (ActReqRemAtt,Att_PutParams,
"remove-on64x64.png",
Txt_Remove,NULL,
NULL);
/***** Put form to hide/show attendance event *****/
if (Hidden)
Lay_PutContextualLink (ActShoAtt,Att_PutParams,"eye-slash-on64x64.png",
Txt_Show,NULL);
Lay_PutContextualLink (ActShoAtt,Att_PutParams,
"eye-slash-on64x64.png",
Txt_Show,NULL,
NULL);
else
Lay_PutContextualLink (ActHidAtt,Att_PutParams,"eye-on64x64.png",
Txt_Hide,NULL);
Lay_PutContextualLink (ActHidAtt,Att_PutParams,
"eye-on64x64.png",
Txt_Hide,NULL,
NULL);
/***** Put form to edit attendance event *****/
Lay_PutContextualLink (ActEdiOneAtt,Att_PutParams,"edit64x64.png",
Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiOneAtt,Att_PutParams,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
fprintf (Gbl.F.Out,"</div>");
}
@ -2885,7 +2897,9 @@ static void Att_PutIconToPrintMyList (void)
/***** Link to print view *****/
Lay_PutContextualLink (ActPrnLstMyAtt,Att_PutFormToPrintMyListParams,
"print64x64.png",Txt_Print,NULL);
"print64x64.png",
Txt_Print,NULL,
NULL);
}
static void Att_PutFormToPrintMyListParams (void)
@ -2906,7 +2920,9 @@ static void Att_PutIconToPrintStdsList (void)
/***** Link to print view *****/
Lay_PutContextualLink (ActPrnLstStdAtt,Att_PutParamsToPrintStdsList,
"print64x64.png",Txt_Print,NULL);
"print64x64.png",
Txt_Print,NULL,
NULL);
}
static void Att_PutParamsToPrintStdsList (void)

View File

@ -128,7 +128,10 @@ static void Ban_PutFormToEditBanners (void)
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
/***** Link to edit banners *****/
Lay_PutContextualLink (ActEdiBan,NULL,"edit64x64.png",Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiBan,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -286,6 +286,9 @@ static void Cal_PutIconToPrintCalendar (void)
{
extern const char *Txt_Print;
Lay_PutContextualLink (ActPrnCal,NULL,"print64x64.png",Txt_Print,NULL);
Lay_PutContextualLink (ActPrnCal,NULL,
"print64x64.png",
Txt_Print,NULL,
NULL);
}

View File

@ -563,7 +563,10 @@ static void Ctr_PutIconsToPrintAndUpload (void)
extern const char *Txt_Print;
/***** Link to print info about centre *****/
Lay_PutContextualLink (ActPrnCtrInf,NULL,"print64x64.png",Txt_Print,NULL);
Lay_PutContextualLink (ActPrnCtrInf,NULL,
"print64x64.png",
Txt_Print,NULL,
NULL);
if (Gbl.Usrs.Me.LoggedRole >= Rol_CTR_ADM)
{
@ -596,8 +599,8 @@ static void Ctr_PutIconToChangePhoto (void)
Lay_PutContextualLink (ActReqCtrPho,NULL,
"photo64x64.gif",
PhotoExists ? Txt_Change_photo :
Txt_Upload_photo,
NULL);
Txt_Upload_photo,NULL,
NULL);
}
/*****************************************************************************/
@ -682,7 +685,10 @@ static void Ctr_PutIconToEditFrames (void)
{
extern const char *Txt_Edit;
Lay_PutContextualLink (ActEdiCtr,NULL,"edit64x64.png",Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiCtr,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -133,13 +133,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.238.1 (2016-07-01)"
#define Log_PLATFORM_VERSION "SWAD 15.239 (2016-07-01)"
#define CSS_FILE "swad15.229.css"
#define JS_FILE "swad15.238.1.js"
// 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.239: Jul 01, 2015 Code refactoring related to contextual menus. (203531 lines)
Version 15.238.1: Jul 01, 2015 New javascript function to animate icon. (203292 lines)
Version 15.238: Jul 01, 2015 Hidden fields in in selectors of class photo / list with message subject and content. (203274 lines)
Version 15.237.3: Jul 01, 2015 Fixed bug in messages. (203257 lines)

View File

@ -134,8 +134,10 @@ void Con_PutLinkToLastClicks (void)
{
extern const char *Txt_Last_clicks;
Lay_PutContextualLink (ActLstClk,NULL,"mouse-pointer64x64.png",
Txt_Last_clicks,Txt_Last_clicks);
Lay_PutContextualLink (ActLstClk,NULL,
"mouse-pointer64x64.png",
Txt_Last_clicks,Txt_Last_clicks,
NULL);
}
/*****************************************************************************/

View File

@ -463,7 +463,10 @@ static void Cty_PutIconToPrint (void)
{
extern const char *Txt_Print;
Lay_PutContextualLink (ActPrnCtyInf,NULL,"print64x64.png",Txt_Print,NULL);
Lay_PutContextualLink (ActPrnCtyInf,NULL,
"print64x64.png",
Txt_Print,NULL,
NULL);
}
/*****************************************************************************/
@ -692,7 +695,10 @@ static void Cty_PutIconToEditCountries (void)
{
extern const char *Txt_Edit;
Lay_PutContextualLink (ActEdiCty,NULL,"edit64x64.png",Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiCty,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -401,7 +401,10 @@ static void Crs_PutIconToPrint (void)
{
extern const char *Txt_Print;
Lay_PutContextualLink (ActPrnCrsInf,NULL,"print64x64.png",Txt_Print,NULL);
Lay_PutContextualLink (ActPrnCrsInf,NULL,
"print64x64.png",
Txt_Print,NULL,
NULL);
}
/*****************************************************************************/
@ -1155,7 +1158,10 @@ static void Crs_PutIconToEditCourses (void)
{
extern const char *Txt_Edit;
Lay_PutContextualLink (ActEdiCrs,NULL,"edit64x64.png",Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiCrs,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/
@ -2889,7 +2895,8 @@ static void Crs_PutLinkToSearchCourses (void)
ActSysReqSch)))),
Sch_PutLinkToSearchCoursesParams,
"search64x64.gif",
Txt_Search_courses,Txt_Search_courses);
Txt_Search_courses,Txt_Search_courses,
NULL);
}
static void Sch_PutLinkToSearchCoursesParams (void) // TODO: Move to search module
@ -2907,8 +2914,10 @@ 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,Txt_My_courses);
Lay_PutContextualLink (ActMyCrs,NULL,
"hierarchy64x64.gif",
Txt_My_courses,Txt_My_courses,
NULL);
}
/*****************************************************************************/

View File

@ -477,7 +477,10 @@ static void Deg_PutIconsToPrintAndUpload (void)
extern const char *Txt_Print;
/***** Link to print info about degree *****/
Lay_PutContextualLink (ActPrnDegInf,NULL,"print64x64.png",Txt_Print,NULL);
Lay_PutContextualLink (ActPrnDegInf,NULL,
"print64x64.png",
Txt_Print,NULL,
NULL);
if (Gbl.Usrs.Me.LoggedRole >= Rol_DEG_ADM)
/***** Link to upload logo of degree *****/
@ -1627,7 +1630,10 @@ static void Deg_PutIconToEditDegrees (void)
{
extern const char *Txt_Edit;
Lay_PutContextualLink (ActEdiDeg,NULL,"edit64x64.png",Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiDeg,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -257,7 +257,10 @@ static void DT_PutIconToEditDegTypes (void)
{
extern const char *Txt_Edit;
Lay_PutContextualLink (ActEdiDegTyp,NULL,"edit64x64.png",Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiDegTyp,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -211,7 +211,10 @@ static void Dpt_PutIconToEditDpts (void)
{
extern const char *Txt_Edit;
Lay_PutContextualLink (ActEdiDpt,NULL,"edit64x64.png",Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiDpt,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -113,8 +113,10 @@ void Dup_PutLinkToListDupUsrs (void)
extern const char *Txt_Duplicate_USERS;
/***** Put form to remove old users *****/
Lay_PutContextualLink (ActLstDupUsr,NULL,"usrs64x64.gif",
Txt_Duplicate_USERS,Txt_Duplicate_USERS);
Lay_PutContextualLink (ActLstDupUsr,NULL,
"usrs64x64.gif",
Txt_Duplicate_USERS,Txt_Duplicate_USERS,
NULL);
}
/*****************************************************************************/

View File

@ -156,8 +156,10 @@ void Enr_PutLinkToRequestSignUp (void)
extern const char *Txt_Sign_up;
/***** Show the form *****/
Lay_PutContextualLink (ActReqSignUp,NULL,"enrollmentrequest64x64.gif",
Txt_Sign_up,Txt_Sign_up);
Lay_PutContextualLink (ActReqSignUp,NULL,
"enrollmentrequest64x64.gif",
Txt_Sign_up,Txt_Sign_up,
NULL);
}
/*****************************************************************************/
@ -696,8 +698,10 @@ 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,Txt_Eliminate_old_users);
Lay_PutContextualLink (ActReqRemOldUsr,NULL,
"remove-on64x64.png",
Txt_Eliminate_old_users,Txt_Eliminate_old_users,
NULL);
}
/*****************************************************************************/
@ -1790,7 +1794,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,Txt_Remove_all_students);
Txt_Remove_all_students,Txt_Remove_all_students,
NULL);
}
/*****************************************************************************/
@ -2946,12 +2951,13 @@ void Enr_PutLinkToAdminOneUsr (Act_Action_t NextAction)
{
extern const char *Txt_Admin_me;
extern const char *Txt_Admin_one_user;
const char *TitleText = Enr_CheckIfICanAdminOtherUsrs () ? Txt_Admin_one_user :
Txt_Admin_me;
Lay_PutContextualLink (NextAction,NULL,"config64x64.gif",
Enr_CheckIfICanAdminOtherUsrs () ? Txt_Admin_one_user :
Txt_Admin_me,
Enr_CheckIfICanAdminOtherUsrs () ? Txt_Admin_one_user :
Txt_Admin_me);
Lay_PutContextualLink (NextAction,NULL,
"config64x64.gif",
TitleText,TitleText,
NULL);
}
/*****************************************************************************/
@ -2962,14 +2968,14 @@ void Enr_PutLinkToAdminSeveralUsrs (Rol_Role_t Role)
{
extern const char *Txt_Admin_several_students;
extern const char *Txt_Admin_several_teachers;
const char *TitleText = (Role == Rol_STUDENT) ? Txt_Admin_several_students :
Txt_Admin_several_teachers;
Lay_PutContextualLink (Role == Rol_STUDENT ? ActReqEnrSevStd :
ActReqEnrSevTch,
NULL,"config64x64.gif",
Role == Rol_STUDENT ? Txt_Admin_several_students :
Txt_Admin_several_teachers,
Role == Rol_STUDENT ? Txt_Admin_several_students :
Txt_Admin_several_teachers);
TitleText,TitleText,
NULL);
}
/*****************************************************************************/

View File

@ -607,7 +607,10 @@ static void Exa_PutIconToCreateNewExamAnnouncement (void)
{
extern const char *Txt_New_announcement_OF_EXAM;
Lay_PutContextualLink (ActEdiExaAnn,NULL,"plus64x64.png",Txt_New_announcement_OF_EXAM,NULL);
Lay_PutContextualLink (ActEdiExaAnn,NULL,
"plus64x64.png",
Txt_New_announcement_OF_EXAM,NULL,
NULL);
}
/*****************************************************************************/
@ -1361,17 +1364,23 @@ static void Exa_PutIconsExamAnnouncement (void)
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
{
/***** Link to remove this exam announcement *****/
Lay_PutContextualLink (ActRemExaAnn,Exa_PutParamExaCodToEdit,"remove-on64x64.png",
Txt_Remove,NULL);
Lay_PutContextualLink (ActRemExaAnn,Exa_PutParamExaCodToEdit,
"remove-on64x64.png",
Txt_Remove,NULL,
NULL);
/***** Link to edit this exam announcement *****/
Lay_PutContextualLink (ActEdiExaAnn,Exa_PutParamExaCodToEdit,"edit64x64.png",
Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiExaAnn,Exa_PutParamExaCodToEdit,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/***** Link to print view *****/
Lay_PutContextualLink (ActPrnExaAnn,Exa_PutParamExaCodToEdit,"print64x64.png",
Txt_Print,NULL);
Lay_PutContextualLink (ActPrnExaAnn,Exa_PutParamExaCodToEdit,
"print64x64.png",
Txt_Print,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -3670,7 +3670,9 @@ static void Brw_PutIconToEditFileBrowser (void)
if (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type] != ActUnk)
Lay_PutContextualLink (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type],
Brw_PutParamsContextualLink,
"edit64x64.png",Txt_Edit,NULL);
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/
@ -3684,7 +3686,9 @@ static void Brw_PutIconToSeeFileBrowser (void)
if (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type] != ActUnk)
Lay_PutContextualLink (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type],
Brw_PutParamsContextualLink,
"eye-on64x64.png",Txt_View,NULL);
"eye-on64x64.png",
Txt_View,NULL,
NULL);
}
/*****************************************************************************/
@ -11799,7 +11803,8 @@ static void Brw_PutFormToAskRemOldFiles (void)
Lay_PutContextualLink (ActReqRemOldBrf,Brw_PutParamsContextualLink,
"remove-on64x64.png",
Txt_Remove_old_files,Txt_Remove_old_files);
Txt_Remove_old_files,Txt_Remove_old_files,
NULL);
}
/*****************************************************************************/

View File

@ -89,7 +89,8 @@ void Fol_PutLinkWhoToFollow (void)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Lay_PutContextualLink (ActSeeSocPrf,NULL,
"follow64x64.png",
Txt_Who_to_follow,Txt_Who_to_follow);
Txt_Who_to_follow,Txt_Who_to_follow,
NULL);
fprintf (Gbl.F.Out,"</div>");
}

View File

@ -1615,7 +1615,10 @@ static void Grp_PutIconToEditGroups (void)
{
extern const char *Txt_Edit;
Lay_PutContextualLink (ActReqEdiGrp,NULL,"edit64x64.png",Txt_Edit,NULL);
Lay_PutContextualLink (ActReqEdiGrp,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -197,7 +197,10 @@ static void Hld_PutIconToEditHlds (void)
{
extern const char *Txt_Edit;
Lay_PutContextualLink (ActEdiHld,NULL,"edit64x64.png",Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiHld,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -431,7 +431,9 @@ void Inf_PutIconToEditInfo (void)
extern const char *Txt_Edit;
Lay_PutContextualLink (Inf_ActionsEditInfo[Gbl.CurrentCrs.Info.Type],NULL,
"edit64x64.png",Txt_Edit,NULL);
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -500,7 +500,10 @@ static void Ins_PutIconsToPrintAndUpload (void)
extern const char *Txt_Print;
/***** Link to print info about institution *****/
Lay_PutContextualLink (ActPrnInsInf,NULL,"print64x64.png",Txt_Print,NULL);
Lay_PutContextualLink (ActPrnInsInf,NULL,
"print64x64.png",
Txt_Print,NULL,
NULL);
if (Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM)
/***** Link to upload logo of institution *****/
@ -588,7 +591,10 @@ static void Ins_PutIconToEditInstitutions (void)
{
extern const char *Txt_Edit;
Lay_PutContextualLink (ActEdiIns,NULL,"edit64x64.png",Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiIns,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -1007,18 +1007,8 @@ static void Lay_ShowRightColumn (void)
void Lay_PutContextualLink (Act_Action_t NextAction,
void (*FuncParams) (),
const char *Icon,
const char *Title,const char *Text)
{
Lay_PutContextualLinkAnchor (NextAction,NULL,
FuncParams,
Icon,
Title,Text);
}
void Lay_PutContextualLinkAnchor (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (),
const char *Icon,
const char *Title,const char *Text)
const char *Title,const char *Text,
const char *Function)
{
extern const char *The_ClassFormBold[The_NUM_THEMES];
@ -1026,15 +1016,13 @@ void Lay_PutContextualLinkAnchor (Act_Action_t NextAction,const char *Anchor,
fprintf (Gbl.F.Out," "); // This space is necessary to enable
// jumping to the next line on narrow screens
if (Anchor)
Act_FormStartAnchor (NextAction,Anchor);
else
Act_FormStart (NextAction);
Act_FormStart (NextAction);
if (FuncParams)
FuncParams ();
Lay_PutIconLink (Icon,Title,Text,
Text ? The_ClassFormBold[Gbl.Prefs.Theme] :
NULL);
NULL,
Function);
Act_FormEnd ();
if (Text)
@ -1047,9 +1035,12 @@ void Lay_PutContextualLinkAnchor (Act_Action_t NextAction,const char *Anchor,
/*****************************************************************************/
void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text,
const char *LinkStyle)
const char *LinkStyle,const char *Function)
{
Act_LinkFormSubmit (Title,LinkStyle);
if (Function)
Act_LinkFormSubmitFunction (Title,LinkStyle,Function);
else
Act_LinkFormSubmit (Title,LinkStyle);
Lay_PutIconWithText (Icon,Title,Text);
fprintf (Gbl.F.Out,"</a>");
}

View File

@ -74,13 +74,10 @@ void Lay_WriteTitle (const char *Title);
void Lay_PutContextualLink (Act_Action_t NextAction,
void (*FuncParams) (),
const char *Icon,
const char *Title,const char *Text);
void Lay_PutContextualLinkAnchor (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (),
const char *Icon,
const char *Title,const char *Text);
const char *Title,const char *Text,
const char *Function);
void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text,
const char *LinkStyle);
const char *LinkStyle,const char *Function);
void Lay_PutIconWithText (const char *Icon,const char *Alt,const char *Text);
void Lay_PutCalculateIcon (const char *Alt);
void Lay_PutCalculateIconWithText (const char *Alt,const char *Text);

View File

@ -102,7 +102,10 @@ static void Lnk_PutIconToEditLinks (void)
{
extern const char *Txt_Edit;
Lay_PutContextualLink (ActEdiLnk,NULL,"edit64x64.png",Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiLnk,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -213,9 +213,10 @@ void Log_PutIconToChangeLogo (Sco_Scope_t Scope)
LogoExists = Fil_CheckIfPathExists (PathLogo);
/***** Link for changing / uploading the logo *****/
Lay_PutContextualLink (Action,NULL,"logo64x64.png",
Lay_PutContextualLink (Action,NULL,
"logo64x64.png",
LogoExists ? Txt_Change_logo :
Txt_Upload_logo,
Txt_Upload_logo,NULL,
NULL);
}
@ -271,8 +272,10 @@ void Log_RequestLogo (Sco_Scope_t Scope)
{
/***** Form to remove photo *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
Lay_PutContextualLink (ActionRem,NULL,"remove-on64x64.png",
Txt_Remove_logo,Txt_Remove_logo);
Lay_PutContextualLink (ActionRem,NULL,
"remove-on64x64.png",
Txt_Remove_logo,Txt_Remove_logo,
NULL);
fprintf (Gbl.F.Out,"</div>");
}

View File

@ -174,7 +174,10 @@ static void Mai_PutIconToEditMailDomains (void)
{
extern const char *Txt_Edit;
Lay_PutContextualLink (ActEdiMai,NULL,"edit64x64.png",Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiMai,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/
@ -1046,15 +1049,18 @@ 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,Txt_Change_email);
Lay_PutContextualLink (ActFrmUsrAcc,NULL,
"msg64x64.gif",
Txt_Change_email,Txt_Change_email,
NULL);
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,Txt_Change_email);
Txt_Change_email,Txt_Change_email,
NULL);
}
/*****************************************************************************/

View File

@ -339,7 +339,8 @@ static void Msg_PutLinkToShowMorePotentialRecipients (void)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Lay_PutContextualLink (ActReqMsgUsr,Msg_PutParamsShowMorePotentialRecipients,
"usrs64x64.gif",
Txt_Show_more_recipients,Txt_Show_more_recipients);
Txt_Show_more_recipients,Txt_Show_more_recipients,
NULL);
fprintf (Gbl.F.Out,"</div>");
}
@ -1807,8 +1808,10 @@ static void Msg_PutLinkToViewBannedUsers(void)
{
extern const char *Txt_Banned_users;
Lay_PutContextualLink (ActLstBanUsr,NULL,"stop16x16.gif",
Txt_Banned_users,Txt_Banned_users);
Lay_PutContextualLink (ActLstBanUsr,NULL,
"stop16x16.gif",
Txt_Banned_users,Txt_Banned_users,
NULL);
}
/*****************************************************************************/
@ -2317,7 +2320,9 @@ static void Msg_PutIconToRemoveOneRcvMsg (void)
extern const char *Txt_Remove_this_message;
Lay_PutContextualLink (ActReqDelAllRcvMsg,Msg_PutHiddenParamsMsgsFilters,
"remove-on64x64.png",Txt_Remove_this_message,NULL);
"remove-on64x64.png",
Txt_Remove_this_message,NULL,
NULL);
}
/*****************************************************************************/
@ -2329,7 +2334,9 @@ static void Msg_PutIconToRemoveSevRcvMsgs (void)
extern const char *Txt_Remove_these_messages;
Lay_PutContextualLink (ActReqDelAllRcvMsg,Msg_PutHiddenParamsMsgsFilters,
"remove-on64x64.png",Txt_Remove_these_messages,NULL);
"remove-on64x64.png",
Txt_Remove_these_messages,NULL,
NULL);
}
/*****************************************************************************/
@ -2341,7 +2348,9 @@ static void Msg_PutIconToRemoveOneSntMsg (void)
extern const char *Txt_Remove_this_message;
Lay_PutContextualLink (ActReqDelAllSntMsg,Msg_PutHiddenParamsMsgsFilters,
"remove-on64x64.png",Txt_Remove_this_message,NULL);
"remove-on64x64.png",
Txt_Remove_this_message,NULL,
NULL);
}
/*****************************************************************************/
@ -2353,7 +2362,9 @@ static void Msg_PutIconToRemoveSevSntMsgs (void)
extern const char *Txt_Remove_these_messages;
Lay_PutContextualLink (ActReqDelAllSntMsg,Msg_PutHiddenParamsMsgsFilters,
"remove-on64x64.png",Txt_Remove_these_messages,NULL);
"remove-on64x64.png",
Txt_Remove_these_messages,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -269,8 +269,10 @@ void Net_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,Txt_Edit_my_webs_networks);
Lay_PutContextualLink (ActReqEdiMyNet,NULL,
"earth64x64.gif",
Txt_Edit_my_webs_networks,Txt_Edit_my_webs_networks,
NULL);
}
/*****************************************************************************/

View File

@ -491,7 +491,10 @@ static void Not_PutIconToAddNewNotice (void)
{
extern const char *Txt_New_notice;
Lay_PutContextualLink (ActWriNot,NULL,"plus64x64.png",Txt_New_notice,NULL);
Lay_PutContextualLink (ActWriNot,NULL,
"plus64x64.png",
Txt_New_notice,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -341,12 +341,17 @@ void Ntf_ShowMyNotifications (void)
/***** Buttons to change preferences and to mark all notifications as seen *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
// Put form to change notification preferences
Lay_PutContextualLink (ActEdiPrf,NULL,"heart64x64.gif",
Txt_Change_preferences,Txt_Change_preferences);
Lay_PutContextualLink (ActEdiPrf,NULL,
"heart64x64.gif",
Txt_Change_preferences,Txt_Change_preferences,
NULL);
if (NumNotifications)
// Put form to change notification preferences
Lay_PutContextualLink (ActMrkNtfSee,NULL,"eye-on64x64.png",
Txt_Mark_all_notifications_as_read,Txt_Mark_all_notifications_as_read);
Lay_PutContextualLink (ActMrkNtfSee,NULL,
"eye-on64x64.png",
Txt_Mark_all_notifications_as_read,
Txt_Mark_all_notifications_as_read,
NULL);
fprintf (Gbl.F.Out,"</div>");
/***** Write form to show all notifications *****/

View File

@ -219,7 +219,8 @@ void Pwd_PutLinkToSendNewPasswd (void)
Lay_PutContextualLink (ActReqSndNewPwd,Pwd_PutLinkToSendNewPasswdParams,
"key64x64.gif",
Txt_Forgotten_password,Txt_Forgotten_password);
Txt_Forgotten_password,Txt_Forgotten_password,
NULL);
}
static void Pwd_PutLinkToSendNewPasswdParams (void)
@ -843,8 +844,10 @@ void Pwd_PutLinkToChangeMyPassword (void)
extern const char *Txt_Change_password;
/***** Link for changing the password *****/
Lay_PutContextualLink (ActFrmChgMyPwd,NULL,"key64x64.gif",
Txt_Change_password,Txt_Change_password);
Lay_PutContextualLink (ActFrmChgMyPwd,NULL,
"key64x64.gif",
Txt_Change_password,Txt_Change_password,
NULL);
}
/*****************************************************************************/
@ -862,8 +865,10 @@ 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,Txt_Change_password);
Usr_PutParamOtherUsrCodEncrypted,
"key64x64.gif",
Txt_Change_password,Txt_Change_password,
NULL);
}
/*****************************************************************************/

View File

@ -179,13 +179,13 @@ void Pho_PutLinkToChangeMyPhoto (void)
{
extern const char *Txt_Change_photo;
extern const char *Txt_Upload_photo;
const char *TitleText = Gbl.Usrs.Me.MyPhotoExists ? Txt_Change_photo :
Txt_Upload_photo;
/***** 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);
TitleText,TitleText,
NULL);
}
/*****************************************************************************/
@ -198,6 +198,7 @@ void Pho_PutLinkToChangeOtherUsrPhoto (void)
extern const char *Txt_Upload_photo;
bool PhotoExists;
char PhotoURL[PATH_MAX+1];
const char *TitleText;
/***** Link for changing / uploading the photo *****/
if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me
@ -206,15 +207,15 @@ void Pho_PutLinkToChangeOtherUsrPhoto (void)
if (Pho_CheckIfICanChangeOtherUsrPhoto (&Gbl.Usrs.Other.UsrDat))
{
PhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,true);
TitleText = PhotoExists ? Txt_Change_photo :
Txt_Upload_photo;
Lay_PutContextualLink ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STUDENT ? ActReqStdPho :
(Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_TEACHER ? ActReqTchPho :
ActReqOthPho), // Guest, visitor or admin
Usr_PutParamOtherUsrCodEncrypted,
"photo64x64.gif",
PhotoExists ? Txt_Change_photo :
Txt_Upload_photo,
PhotoExists ? Txt_Change_photo :
Txt_Upload_photo);
TitleText,TitleText,
NULL);
}
}
@ -228,8 +229,10 @@ static void Pho_PutIconToRequestRemoveMyPhoto (void)
/***** Link to request the removal of my photo *****/
if (Gbl.Usrs.Me.MyPhotoExists)
Lay_PutContextualLink (ActReqRemMyPho,NULL,"remove-on64x64.png",
Txt_Remove_photo,NULL);
Lay_PutContextualLink (ActReqRemMyPho,NULL,
"remove-on64x64.png",
Txt_Remove_photo,NULL,
NULL);
}
/*****************************************************************************/
@ -250,7 +253,8 @@ static void Pho_PutIconToRequestRemoveOtherUsrPhoto (void)
ActReqRemOthPho), // Guest, visitor or admin
Usr_PutParamOtherUsrCodEncrypted,
"remove-on64x64.png",
Txt_Remove_photo,NULL);
Txt_Remove_photo,NULL,
NULL);
}
/*****************************************************************************/
@ -1874,7 +1878,9 @@ static void Pho_PutIconToPrintDegreeStats (void)
extern const char *Txt_Print;
Lay_PutContextualLink (ActPrnPhoDeg,Pho_PutLinkToPrintViewOfDegreeStatsParams,
"print64x64.png",Txt_Print,NULL);
"print64x64.png",
Txt_Print,NULL,
NULL);
}
static void Pho_PutLinkToPrintViewOfDegreeStatsParams (void)

View File

@ -202,7 +202,10 @@ static void Plc_PutIconToEditPlaces (void)
{
extern const char *Txt_Edit;
Lay_PutContextualLink (ActEdiPlc,NULL,"edit64x64.png",Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiPlc,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -154,7 +154,10 @@ static void Plg_PutIconToEditPlugins (void)
{
extern const char *Txt_Edit;
Lay_PutContextualLink (ActEdiPlg,NULL,"edit64x64.png",Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiPlg,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -238,7 +238,8 @@ void Pre_PutLinkToChangeLanguage (void)
{
Lay_PutContextualLink (ActEdiPrf,NULL,
"cty64x64.gif",
"Change language","Change language");
"Change language","Change language",
NULL);
}
/*****************************************************************************/

View File

@ -75,8 +75,10 @@ void Pri_PutLinkToChangeMyPrivacy (void)
extern const char *Txt_Privacy;
/***** Link to edit my privacy *****/
Lay_PutContextualLink (ActEdiPri,NULL,"lock64x64.png",
Txt_Privacy,Txt_Privacy);
Lay_PutContextualLink (ActEdiPri,NULL,
"lock64x64.png",
Txt_Privacy,Txt_Privacy,
NULL);
}
/*****************************************************************************/

View File

@ -143,7 +143,8 @@ void Prf_PutLinkRequestUserProfile (void)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Lay_PutContextualLink (ActReqPubPrf,NULL,
"usr64x64.gif",
Txt_View_public_profile,Txt_View_public_profile);
Txt_View_public_profile,Txt_View_public_profile,
NULL);
fprintf (Gbl.F.Out,"</div>");
}

View File

@ -924,8 +924,10 @@ 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,Txt_Edit_record_fields);
Lay_PutContextualLink (ActEdiRecFie,NULL,
"edit64x64.png",
Txt_Edit_record_fields,Txt_Edit_record_fields,
NULL);
}
/*****************************************************************************/
@ -2273,8 +2275,10 @@ static void Rec_PutIconsCommands (void)
/***** Button to edit my record card *****/
if (ItsMe)
Lay_PutContextualLink (ActReqEdiRecCom,NULL,"edit64x64.png",
Txt_Edit_my_personal_data,NULL);
Lay_PutContextualLink (ActReqEdiRecCom,NULL,
"edit64x64.png",
Txt_Edit_my_personal_data,NULL,
NULL);
/***** Button to view user's record card in course when:
- a course is selected && the user belongs to it &&
@ -2287,7 +2291,8 @@ static void Rec_PutIconsCommands (void)
ActSeeRecOneTch,
Rec_PutParamUsrCodEncrypted,
"card64x64.gif",
Txt_View_record_for_this_course,NULL);
Txt_View_record_for_this_course,NULL,
NULL);
/***** Button to admin user *****/
if (ItsMe ||
@ -2301,7 +2306,8 @@ static void Rec_PutIconsCommands (void)
ActReqMdfOth),
Rec_PutParamUsrCodEncrypted,
"config64x64.gif",
Txt_Admin_user,NULL);
Txt_Admin_user,NULL,
NULL);
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // A course is selected
Gbl.Record.UsrDat->RoleInCurrentCrsDB == Rol_STUDENT && // He/she is a student in the current course
@ -2311,21 +2317,25 @@ static void Rec_PutIconsCommands (void)
if (ItsMe) // I am a student
Lay_PutContextualLink (ActAdmAsgWrkUsr,NULL,
"folder64x64.gif",
Txt_View_works,NULL);
Txt_View_works,NULL,
NULL);
else // I am a teacher or superuser
Lay_PutContextualLink (ActAdmAsgWrkCrs,Rec_PutParamsWorks,
"folder64x64.gif",
Txt_View_works,NULL);
Txt_View_works,NULL,
NULL);
/***** Button to view user's test exams *****/
if (ItsMe)
Lay_PutContextualLink (ActSeeMyTstExa,NULL,
"file64x64.gif",
Txt_See_exams,NULL);
Txt_See_exams,NULL,
NULL);
else
Lay_PutContextualLink (ActSeeUsrTstExa,Rec_PutParamsStudent,
"file64x64.gif",
Txt_See_exams,NULL);
Txt_See_exams,NULL,
NULL);
/***** Button to view user's attendance *****/
if (IAmLoggedAsStudent ||
@ -2336,19 +2346,22 @@ static void Rec_PutIconsCommands (void)
// As student, I can see my attendance
Lay_PutContextualLink (ActSeeLstMyAtt,NULL,
"rollcall64x64.gif",
Txt_Attendance,NULL);
Txt_Attendance,NULL,
NULL);
else // IAmLoggedAsTeacher || IAmLoggedAsSysAdm
// As teacher, I can see attendance of the student
Lay_PutContextualLink (ActSeeLstStdAtt,Rec_PutParamsStudent,
"rollcall64x64.gif",
Txt_Attendance,NULL);
Txt_Attendance,NULL,
NULL);
}
}
/***** Button to send a message *****/
Lay_PutContextualLink (ActReqMsgUsr,Rec_PutParamsMsgUsr,
"msg64x64.gif",
Txt_Write_a_message,NULL);
Txt_Write_a_message,NULL,
NULL);
/***** Button to follow / unfollow *****/
if (Gbl.Record.TypeOfView == Rec_RECORD_PUBLIC &&
@ -2357,11 +2370,13 @@ static void Rec_PutIconsCommands (void)
if (Fol_CheckUsrIsFollowerOf (Gbl.Usrs.Me.UsrDat.UsrCod,Gbl.Record.UsrDat->UsrCod)) // I follow user
Lay_PutContextualLink (ActUnfUsr,Rec_PutParamUsrCodEncrypted,
"following64x64.png",
Txt_Following_unfollow,NULL);
Txt_Following_unfollow,NULL,
NULL);
else // I do not follow user
Lay_PutContextualLink (ActFolUsr,Rec_PutParamUsrCodEncrypted,
"follow64x64.png",
Txt_Follow,NULL);
Txt_Follow,NULL,
NULL);
}
fprintf (Gbl.F.Out,"</div>");
@ -3472,7 +3487,8 @@ void Rec_PutLinkToChangeMyInsCtrDpt (void)
/***** Link to edit my institution, centre, department... *****/
Lay_PutContextualLink (ActReqEdiMyIns,NULL,"ins64x64.gif",
Txt_Edit_my_institution,Txt_Edit_my_institution);
Txt_Edit_my_institution,Txt_Edit_my_institution,
NULL);
}
/*****************************************************************************/

View File

@ -591,7 +591,8 @@ void Sta_AskShowGblHits (void)
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM))
Lay_PutContextualLink (ActReqAccCrs,NULL,
"stats64x64.gif",
Txt_Visits_to_course,Txt_Visits_to_course);
Txt_Visits_to_course,Txt_Visits_to_course,
NULL);
/* Link to show last clicks in real time */
Con_PutLinkToLastClicks ();

View File

@ -303,7 +303,9 @@ static void Svy_PutIconToCreateNewSvy (void)
extern const char *Txt_New_survey;
Lay_PutContextualLink (ActFrmNewSvy,Svy_PutParamsToCreateNewSvy,
"plus64x64.png",Txt_New_survey,NULL);
"plus64x64.png",
Txt_New_survey,NULL,
NULL);
}
/*****************************************************************************/
@ -752,24 +754,34 @@ static void Svy_PutFormsToRemEditOneSvy (long SvyCod,bool Visible)
Gbl.Svys.SvyCodToEdit = SvyCod; // Used as parameters in contextual links
/***** Put form to remove survey *****/
Lay_PutContextualLink (ActReqRemSvy,Svy_PutParams,"remove-on64x64.png",
Txt_Remove,NULL);
Lay_PutContextualLink (ActReqRemSvy,Svy_PutParams,
"remove-on64x64.png",
Txt_Remove,NULL,
NULL);
/***** Put form to reset survey *****/
Lay_PutContextualLink (ActReqRstSvy,Svy_PutParams,"recycle64x64.png",
Txt_Reset,NULL);
Lay_PutContextualLink (ActReqRstSvy,Svy_PutParams,
"recycle64x64.png",
Txt_Reset,NULL,
NULL);
/***** Put form to hide/show survey *****/
if (Visible)
Lay_PutContextualLink (ActHidSvy,Svy_PutParams,"eye-on64x64.png",
Txt_Hide,NULL);
Lay_PutContextualLink (ActHidSvy,Svy_PutParams,
"eye-on64x64.png",
Txt_Hide,NULL,
NULL);
else
Lay_PutContextualLink (ActShoSvy,Svy_PutParams,"eye-slash-on64x64.png",
Txt_Show,NULL);
Lay_PutContextualLink (ActShoSvy,Svy_PutParams,
"eye-slash-on64x64.png",
Txt_Show,NULL,
NULL);
/***** Put form to edit survey *****/
Lay_PutContextualLink (ActEdiOneSvy,Svy_PutParams,"edit64x64.png",
Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiOneSvy,Svy_PutParams,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
fprintf (Gbl.F.Out,"</div>");
}
@ -2967,7 +2979,9 @@ static void Svy_PutIconToAddNewQuestion (void)
/***** Put form to create a new question *****/
Lay_PutContextualLink (ActEdiOneSvyQst,Svy_PutParams,
"plus64x64.png",Txt_New_question,NULL);
"plus64x64.png",
Txt_New_question,NULL,
NULL);
}
/*****************************************************************************/
@ -3144,7 +3158,9 @@ static void Svy_PutIconToRemoveOneQst (void)
extern const char *Txt_Remove;
Lay_PutContextualLink (ActReqRemSvyQst,Svy_PutParamsRemoveOneQst,
"remove-on64x64.png",Txt_Remove,NULL);
"remove-on64x64.png",
Txt_Remove,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -371,7 +371,8 @@ static void Tst_PutFormToSeeResultsOfUsersTests (Act_Action_t Action)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Lay_PutContextualLink (Action,NULL,"file64x64.gif",
Txt_Results_tests,Txt_Results_tests);
Txt_Results_tests,Txt_Results_tests,
NULL);
fprintf (Gbl.F.Out,"</div>");
}
@ -1301,18 +1302,24 @@ static void Tst_PutIconsToEditAndConfig (void)
/***** Put form to edit existing test questions *****/
if (Gbl.Action.Act != ActEdiTstQst)
Lay_PutContextualLink (ActEdiTstQst,NULL,"edit64x64.png",
Txt_Edit,NULL);
Lay_PutContextualLink (ActEdiTstQst,NULL,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
/***** Put form to create a new test question *****/
if (Gbl.Action.Act != ActEdiOneTstQst)
Lay_PutContextualLink (ActEdiOneTstQst,NULL,"plus64x64.png",
Txt_New_question,NULL);
Lay_PutContextualLink (ActEdiOneTstQst,NULL,
"plus64x64.png",
Txt_New_question,NULL,
NULL);
/***** Put form to go to test configuration *****/
if (Gbl.Action.Act != ActCfgTst)
Lay_PutContextualLink (ActCfgTst,NULL,"config64x64.gif",
Txt_Configure,NULL);
Lay_PutContextualLink (ActCfgTst,NULL,
"config64x64.gif",
Txt_Configure,NULL,
NULL);
}
/*****************************************************************************/
@ -5718,7 +5725,9 @@ static void Tst_PutIconToRemoveOneQst (void)
extern const char *Txt_Remove;
Lay_PutContextualLink (ActReqRemTstQst,Tst_PutParamsRemoveOneQst,
"remove-on64x64.png",Txt_Remove,NULL);
"remove-on64x64.png",
Txt_Remove,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -89,7 +89,8 @@ void TsI_PutFormToExportQuestions (void)
/***** Put a link to create a file with questions *****/
Lay_PutContextualLink (ActLstTstQst,TsI_PutParamsExportQsts,
"export16x16.gif",
Txt_Export_questions_to_XML_file,Txt_Export_questions);
Txt_Export_questions_to_XML_file,Txt_Export_questions,
NULL);
}
/*****************************************************************************/
@ -118,7 +119,8 @@ void TsI_PutFormToImportQuestions (void)
Lay_PutContextualLink (ActReqImpTstQst,NULL,
"import16x16.gif",
Txt_Import_questions_from_XML_file,
Txt_Import_questions);
Txt_Import_questions,
NULL);
}
/*****************************************************************************/

View File

@ -299,17 +299,22 @@ static void TT_PutContextualIcons (void)
if (Gbl.TimeTable.ContextualIcons.PutIconEditCrsTT)
Lay_PutContextualLink (ActEdiCrsTT,Grp_PutParamWhichGrps,
"edit64x64.png",
Txt_Edit,NULL);
Txt_Edit,NULL,
NULL);
if (Gbl.TimeTable.ContextualIcons.PutIconEditOfficeHours)
Lay_PutContextualLink (ActEdiTut,NULL,"edit64x64.png",
Txt_Edit_office_hours,NULL);
Lay_PutContextualLink (ActEdiTut,NULL,
"edit64x64.png",
Txt_Edit_office_hours,NULL,
NULL);
if (Gbl.TimeTable.ContextualIcons.PutIconPrint)
Lay_PutContextualLink (Gbl.TimeTable.Type == TT_COURSE_TIMETABLE ? ActPrnCrsTT :
ActPrnMyTT,
Grp_PutParamWhichGrps,"print64x64.png",
Txt_Print,NULL);
ActPrnMyTT,
Grp_PutParamWhichGrps,
"print64x64.png",
Txt_Print,NULL,
NULL);
}
/*****************************************************************************/
@ -364,8 +369,10 @@ static void TT_PutIconToViewCrsTT (void)
extern const char *Txt_Show_timetable;
/***** Link (form) to see course timetable *****/
Lay_PutContextualLink (ActSeeCrsTT,NULL,"clock64x64.gif",
Txt_Show_timetable,NULL);
Lay_PutContextualLink (ActSeeCrsTT,NULL,
"clock64x64.gif",
Txt_Show_timetable,NULL,
NULL);
}
/*****************************************************************************/
@ -377,8 +384,10 @@ static void TT_PutIconToViewMyTT (void)
extern const char *Txt_Show_timetable;
/***** Link (form) to see my timetable *****/
Lay_PutContextualLink (ActSeeMyTT,NULL,"clock64x64.gif",
Txt_Show_timetable,NULL);
Lay_PutContextualLink (ActSeeMyTT,NULL,
"clock64x64.gif",
Txt_Show_timetable,NULL,
NULL);
}
/*****************************************************************************/

View File

@ -1520,8 +1520,10 @@ void Usr_PutLinkToLogin (void)
{
extern const char *Txt_Log_in;
Lay_PutContextualLink (ActFrmLogIn,NULL,"login-green64x64.png",
Txt_Log_in,Txt_Log_in);
Lay_PutContextualLink (ActFrmLogIn,NULL,
"login-green64x64.png",
Txt_Log_in,Txt_Log_in,
NULL);
}
/*****************************************************************************/
@ -2661,8 +2663,10 @@ void Usr_ShowFormsLogoutAndRole (void)
/***** Link to log out *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Lay_PutContextualLink (ActLogOut,NULL,"logout-red64x64.png",
Txt_Log_out,Txt_Log_out);
Lay_PutContextualLink (ActLogOut,NULL,
"logout-red64x64.png",
Txt_Log_out,Txt_Log_out,
NULL);
fprintf (Gbl.F.Out,"</div>");
/***** Write message with my new logged role *****/
@ -6368,9 +6372,11 @@ static void Usr_PutLinkToSeeAdmins (void)
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
/***** Put form to list admins *****/
Lay_PutContextualLink (ActLstOth,NULL,"adm16x16.gif",
Lay_PutContextualLink (ActLstOth,NULL,
"adm16x16.gif",
Txt_ROLES_PLURAL_Abc[Rol_DEG_ADM][Usr_SEX_UNKNOWN],
Txt_ROLES_PLURAL_Abc[Rol_DEG_ADM][Usr_SEX_UNKNOWN]);
Txt_ROLES_PLURAL_Abc[Rol_DEG_ADM][Usr_SEX_UNKNOWN],
NULL);
}
/*****************************************************************************/
@ -6382,9 +6388,11 @@ static void Usr_PutLinkToSeeGuests (void)
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
/***** Put form to list guests *****/
Lay_PutContextualLink (ActLstGst,NULL,"usrs64x64.gif",
Lay_PutContextualLink (ActLstGst,NULL,
"usrs64x64.gif",
Txt_ROLES_PLURAL_Abc[Rol__GUEST_][Usr_SEX_UNKNOWN],
Txt_ROLES_PLURAL_Abc[Rol__GUEST_][Usr_SEX_UNKNOWN]);
Txt_ROLES_PLURAL_Abc[Rol__GUEST_][Usr_SEX_UNKNOWN],
NULL);
}
/*****************************************************************************/
@ -6832,7 +6840,9 @@ static void Usr_PutIconToPrintGsts (void)
extern const char *Txt_Print;
Lay_PutContextualLink (ActPrnGstPho,Usr_ShowGstsAllDataParams,
"print64x64.png",Txt_Print,NULL);
"print64x64.png",
Txt_Print,NULL,
NULL);
}
static void Usr_PutIconToPrintStds (void)
@ -6840,7 +6850,9 @@ static void Usr_PutIconToPrintStds (void)
extern const char *Txt_Print;
Lay_PutContextualLink (ActPrnStdPho,Usr_ShowStdsAllDataParams,
"print64x64.png",Txt_Print,NULL);
"print64x64.png",
Txt_Print,NULL,
NULL);
}
static void Usr_PutIconToPrintTchs (void)
@ -6848,7 +6860,9 @@ static void Usr_PutIconToPrintTchs (void)
extern const char *Txt_Print;
Lay_PutContextualLink (ActPrnTchPho,Usr_ShowTchsAllDataParams,
"print64x64.png",Txt_Print,NULL);
"print64x64.png",
Txt_Print,NULL,
NULL);
}
static void Usr_PutIconToShowGstsAllData (void)
@ -6856,7 +6870,9 @@ static void Usr_PutIconToShowGstsAllData (void)
extern const char *Txt_Show_all_data;
Lay_PutContextualLink (ActLstGstAll,Usr_ShowGstsAllDataParams,
"table64x64.gif",Txt_Show_all_data,NULL);
"table64x64.gif",
Txt_Show_all_data,NULL,
NULL);
}
static void Usr_PutIconToShowStdsAllData (void)
@ -6864,7 +6880,9 @@ static void Usr_PutIconToShowStdsAllData (void)
extern const char *Txt_Show_all_data;
Lay_PutContextualLink (ActLstStdAll,Usr_ShowStdsAllDataParams,
"table64x64.gif",Txt_Show_all_data,NULL);
"table64x64.gif",
Txt_Show_all_data,NULL,
NULL);
}
static void Usr_PutIconToShowTchsAllData (void)
@ -6872,7 +6890,9 @@ static void Usr_PutIconToShowTchsAllData (void)
extern const char *Txt_Show_all_data;
Lay_PutContextualLink (ActLstTchAll,Usr_ShowTchsAllDataParams,
"table64x64.gif",Txt_Show_all_data,NULL);
"table64x64.gif",
Txt_Show_all_data,NULL,
NULL);
}
static void Usr_ShowGstsAllDataParams (void)
@ -6909,8 +6929,10 @@ 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,"list64x64.gif",
Txt_Official_students,Txt_Official_students);
Lay_PutContextualLink (ActGetExtLstStd,NULL,
"list64x64.gif",
Txt_Official_students,Txt_Official_students,
NULL);
}
/*****************************************************************************/

View File

@ -120,7 +120,8 @@ void ZIP_PutButtonToCreateZIPAsgWrk (void)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Lay_PutContextualLink (ActAdmAsgWrkCrs,ZIP_PutButtonToCreateZIPAsgWrkParams,
"download64x64.png",
Txt_Create_ZIP_file,Txt_Create_ZIP_file);
Txt_Create_ZIP_file,Txt_Create_ZIP_file,
NULL);
fprintf (Gbl.F.Out,"</div>");
}