diff --git a/Makefile b/Makefile index 2c95e5c2..b52f8844 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ OBJS = swad_account.o swad_action.o swad_agenda.o swad_alert.o \ swad_announcement.o swad_assignment.o swad_attendance.o \ - swad_banner.o \ + swad_banner.o swad_box.o \ swad_calendar.o swad_centre.o swad_chat.o swad_config.o \ swad_connected.o swad_country.o swad_course.o swad_cryptography.o \ swad_database.o swad_date.o swad_degree.o swad_degree_type.o \ @@ -44,8 +44,8 @@ OBJS = swad_account.o swad_action.o swad_agenda.o swad_alert.o \ swad_MFU.o \ swad_network.o swad_nickname.o swad_notice.o swad_notification.o \ swad_pagination.o swad_parameter.o swad_password.o swad_photo.o \ - swad_place.o swad_plugin.o swad_preference.o swad_profile.o \ - swad_privacy.o \ + swad_place.o swad_plugin.o swad_preference.o swad_privacy.o \ + swad_profile.o \ swad_QR.o \ swad_record.o swad_report.o swad_role.o swad_RSS.o \ swad_scope.o swad_search.o swad_session.o swad_setup.o swad_social.o \ diff --git a/swad_ID.c b/swad_ID.c index 5724ad6d..eb560e57 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -31,6 +31,7 @@ #include // For string functions #include "swad_account.h" +#include "swad_box.h" #include "swad_database.h" #include "swad_global.h" #include "swad_ID.h" @@ -548,7 +549,7 @@ void ID_ShowFormOthIDs (void) if (Usr_ICanEditOtherUsr (&Gbl.Usrs.Other.UsrDat)) { /***** Start frame *****/ - Lay_StartRoundFrame (NULL,Txt_ID,NULL, + Box_StartBox (NULL,Txt_ID,NULL, NULL, false); // Not closable @@ -563,7 +564,7 @@ void ID_ShowFormOthIDs (void) Lay_EndTable (); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); } else Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); diff --git a/swad_MFU.c b/swad_MFU.c index cf59ea19..95fd4344 100644 --- a/swad_MFU.c +++ b/swad_MFU.c @@ -26,6 +26,7 @@ /*****************************************************************************/ #include "swad_action.h" +#include "swad_box.h" #include "swad_config.h" #include "swad_database.h" #include "swad_global.h" @@ -223,7 +224,7 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions) char TabMenuStr[MFU_MAX_BYTES_TAB + 6 + MFU_MAX_BYTES_MENU + 1]; /***** Start frame *****/ - Lay_StartRoundFrame (NULL,Txt_My_frequent_actions,NULL, + Box_StartBox (NULL,Txt_My_frequent_actions,NULL, Hlp_STATS_Frequent, false); // Not closable fprintf (Gbl.F.Out,"
"); @@ -262,7 +263,7 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions) /***** End frame *****/ fprintf (Gbl.F.Out,"
"); - Lay_EndRoundFrame (); + Box_EndBox (); } /*****************************************************************************/ diff --git a/swad_account.c b/swad_account.c index 61fcef13..e654da73 100644 --- a/swad_account.c +++ b/swad_account.c @@ -29,6 +29,7 @@ #include "swad_account.h" #include "swad_announcement.h" +#include "swad_box.h" #include "swad_calendar.h" #include "swad_database.h" #include "swad_duplicate.h" @@ -143,7 +144,7 @@ static void Acc_ShowFormCheckIfIHaveAccount (const char *Title) extern const char *Txt_Check; /***** Start frame *****/ - Lay_StartRoundFrame (NULL,Title,NULL, + Box_StartBox (NULL,Title,NULL, Hlp_PROFILE_SignUp, true); // Closable @@ -164,7 +165,7 @@ static void Acc_ShowFormCheckIfIHaveAccount (const char *Title) Act_FormEnd (); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); } /*****************************************************************************/ @@ -214,7 +215,7 @@ void Acc_CheckIfEmptyAccountExists (void) if (NumUsrs) { /***** Start frame and write message with number of accounts found *****/ - Lay_StartRoundFrameTable (NULL, + Box_StartBoxTable (NULL, (NumUsrs == 1) ? Txt_Do_you_think_you_are_this_user : Txt_Do_you_think_you_are_one_of_these_users, NULL, @@ -247,7 +248,7 @@ void Acc_CheckIfEmptyAccountExists (void) Usr_UsrDataDestructor (&UsrDat); /***** End frame *****/ - Lay_EndRoundFrameTable (); + Box_EndBoxTable (); } else { @@ -346,7 +347,7 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith /***** Form to enter some data of the new user *****/ Act_FormStart (ActCreUsrAcc); - Lay_StartRoundFrameTable (NULL,Txt_Create_account,NULL, + Box_StartBoxTable (NULL,Txt_Create_account,NULL, Hlp_PROFILE_SignUp, false, // Not closable 2); @@ -395,7 +396,7 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith Pwd_PutFormToGetNewPasswordOnce (); /***** Send button and form end *****/ - Lay_EndRoundFrameTableWithButton (Lay_CREATE_BUTTON,Txt_Create_account); + Box_EndBoxTableWithButton (Lay_CREATE_BUTTON,Txt_Create_account); Act_FormEnd (); } @@ -411,7 +412,7 @@ void Acc_ShowFormGoToRequestNewAccount (void) /***** Start frame *****/ sprintf (Gbl.Title,Txt_New_on_PLATFORM_Sign_up,Cfg_PLATFORM_SHORT_NAME); - Lay_StartRoundFrame (NULL,Gbl.Title,NULL, + Box_StartBox (NULL,Gbl.Title,NULL, Hlp_PROFILE_SignUp, false); // Not closable @@ -421,7 +422,7 @@ void Acc_ShowFormGoToRequestNewAccount (void) Act_FormEnd (); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); } /*****************************************************************************/ @@ -472,7 +473,7 @@ void Acc_ShowFormChangeMyAccount (void) fprintf (Gbl.F.Out,""); /***** Start table *****/ - Lay_StartRoundFrameTable (NULL,Txt_User_account,NULL, + Box_StartBoxTable (NULL,Txt_User_account,NULL, Hlp_PROFILE_Account, false, // Not closable 2); @@ -518,7 +519,7 @@ void Acc_ShowFormChangeMyAccount (void) ID_ShowFormChangeUsrID (&Gbl.Usrs.Me.UsrDat,true); /***** End of table *****/ - Lay_EndRoundFrameTable (); + Box_EndBoxTable (); } /*****************************************************************************/ diff --git a/swad_agenda.c b/swad_agenda.c index ed971e8a..531d0d77 100644 --- a/swad_agenda.c +++ b/swad_agenda.c @@ -31,6 +31,7 @@ #include // For string functions #include "swad_agenda.h" +#include "swad_box.h" #include "swad_database.h" #include "swad_global.h" #include "swad_group.h" @@ -146,7 +147,7 @@ void Agd_ShowMyAgenda (void) Agd_GetParams (Agd_MY_AGENDA); /***** Start frame *****/ - Lay_StartRoundFrame ("100%",Txt_My_agenda, + Box_StartBox ("100%",Txt_My_agenda, Agd_PutIconsMyFullAgenda, Hlp_PROFILE_Agenda, false); // Not closable @@ -163,7 +164,7 @@ void Agd_ShowMyAgenda (void) Agd_ShowEvents (Agd_MY_AGENDA); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); } /*****************************************************************************/ @@ -366,7 +367,7 @@ void Agd_ShowUsrAgenda (void) /***** Start frame *****/ sprintf (Gbl.Title,Txt_Public_agenda_USER,Gbl.Usrs.Other.UsrDat.FullName); ItsMe = (Gbl.Usrs.Me.UsrDat.UsrCod == Gbl.Usrs.Other.UsrDat.UsrCod); - Lay_StartRoundFrame ("100%",Gbl.Title, + Box_StartBox ("100%",Gbl.Title, ItsMe ? Agd_PutIconsMyPublicAgenda : Agd_PutIconsOtherPublicAgenda, Hlp_PROFILE_Agenda_public_agenda, @@ -379,7 +380,7 @@ void Agd_ShowUsrAgenda (void) Agd_ShowEvents (Agd_ANOTHER_AGENDA); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); } if (Error) @@ -410,7 +411,7 @@ void Agd_ShowOtherAgendaAfterLogIn (void) /***** Start frame *****/ sprintf (Gbl.Title,Txt_Public_agenda_USER,Gbl.Usrs.Other.UsrDat.FullName); ItsMe = (Gbl.Usrs.Me.UsrDat.UsrCod == Gbl.Usrs.Other.UsrDat.UsrCod); - Lay_StartRoundFrame ("100%",Gbl.Title, + Box_StartBox ("100%",Gbl.Title, ItsMe ? Agd_PutIconToViewEditMyFullAgenda : Agd_PutIconsOtherPublicAgenda, Hlp_PROFILE_Agenda_public_agenda, @@ -423,7 +424,7 @@ void Agd_ShowOtherAgendaAfterLogIn (void) Agd_ShowEvents (Agd_ANOTHER_AGENDA); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); } else Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_); @@ -533,13 +534,13 @@ static void Agd_ShowEventsToday (Agd_AgendaType_t AgendaType) switch (AgendaType) { case Agd_MY_AGENDA_TODAY: - Lay_StartRoundFrameTableShadow (NULL,Txt_Today, + Box_StartBoxTableShadow (NULL,Txt_Today, NULL, Hlp_PROFILE_Agenda, 2); break; case Agd_ANOTHER_AGENDA_TODAY: - Lay_StartRoundFrameTableShadow (NULL,Txt_Today, + Box_StartBoxTableShadow (NULL,Txt_Today, NULL, Hlp_PROFILE_Agenda_public_agenda, 2); @@ -558,7 +559,7 @@ static void Agd_ShowEventsToday (Agd_AgendaType_t AgendaType) Agd_ShowOneEvent (AgendaType,Gbl.Agenda.LstAgdCods[NumEvent]); /***** End table and frame *****/ - Lay_EndRoundFrameTable (); + Box_EndBoxTable (); } /***** Free list of events *****/ @@ -1537,7 +1538,7 @@ void Agd_RequestCreatOrEditEvent (void) Agd_PutCurrentParamsMyAgenda (); /***** Table start *****/ - Lay_StartRoundFrameTable (NULL, + Box_StartBoxTable (NULL, ItsANewEvent ? Txt_New_event : Txt_Edit_event, NULL, @@ -1598,9 +1599,9 @@ void Agd_RequestCreatOrEditEvent (void) /***** New event *****/ if (ItsANewEvent) - Lay_EndRoundFrameTableWithButton (Lay_CREATE_BUTTON,Txt_Create_event); + Box_EndBoxTableWithButton (Lay_CREATE_BUTTON,Txt_Create_event); else - Lay_EndRoundFrameTableWithButton (Lay_CONFIRM_BUTTON,Txt_Save); + Box_EndBoxTableWithButton (Lay_CONFIRM_BUTTON,Txt_Save); Act_FormEnd (); /***** Show current events, if any *****/ @@ -1945,7 +1946,7 @@ void Agd_PrintAgdQRCode (void) /***** Start frame *****/ sprintf (Gbl.Title,Txt_Where_s_USER,Gbl.Usrs.Me.UsrDat.FullName); - Lay_StartRoundFrame (NULL,Gbl.Title,NULL, + Box_StartBox (NULL,Gbl.Title,NULL, NULL, false); // Not closable @@ -1953,5 +1954,5 @@ void Agd_PrintAgdQRCode (void) QR_PrintQRCode (); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); } diff --git a/swad_announcement.c b/swad_announcement.c index 4b66cbdb..55112b0c 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -26,6 +26,7 @@ /*****************************************************************************/ #include "swad_announcement.h" +#include "swad_box.h" #include "swad_database.h" #include "swad_global.h" #include "swad_parameter.h" @@ -119,7 +120,7 @@ void Ann_ShowAllAnnouncements (void) NumAnnouncements = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get announcements"); /***** Start frame *****/ - Lay_StartRoundFrame ("550px",Txt_Announcements, + Box_StartBox ("550px",Txt_Announcements, ICanEdit ? Ann_PutIconToAddNewAnnouncement : NULL, Hlp_MESSAGES_Announcements, @@ -168,7 +169,7 @@ void Ann_ShowAllAnnouncements (void) Ann_PutButtonToAddNewAnnouncement (); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); /***** Free structure that stores the query result *****/ DB_FreeMySQLResult (&mysql_res); @@ -411,7 +412,7 @@ void Ann_ShowFormAnnouncement (void) Act_FormStart (ActRcvAnn); /***** Start frame *****/ - Lay_StartRoundFrameTable (NULL,Txt_New_announcement,NULL, + Box_StartBoxTable (NULL,Txt_New_announcement,NULL, Hlp_MESSAGES_Announcements, false, // Not closable 2); @@ -443,7 +444,7 @@ void Ann_ShowFormAnnouncement (void) ""); /***** Button to create announcement and end frame *****/ - Lay_EndRoundFrameTableWithButton (Lay_CREATE_BUTTON,Txt_Create_announcement); + Box_EndBoxTableWithButton (Lay_CREATE_BUTTON,Txt_Create_announcement); /***** End form *****/ Act_FormEnd (); diff --git a/swad_assignment.c b/swad_assignment.c index 9d9fc940..7613aec0 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -31,6 +31,7 @@ #include // For string functions #include "swad_assignment.h" +#include "swad_box.h" #include "swad_database.h" #include "swad_global.h" #include "swad_group.h" @@ -135,7 +136,7 @@ static void Asg_ShowAllAssignments (void) &Pagination); /***** Start frame *****/ - Lay_StartRoundFrame ("100%",Txt_Assignments,Asg_PutIconsListAssignments, + Box_StartBox ("100%",Txt_Assignments,Asg_PutIconsListAssignments, Hlp_ASSESSMENT_Assignments, false); // Not closable @@ -170,7 +171,7 @@ static void Asg_ShowAllAssignments (void) Enr_CheckStdsAndPutButtonToRegisterStdsInCurrentCrs (); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); /***** Write again links to pages *****/ if (Pagination.MoreThanOnePage) @@ -1171,7 +1172,7 @@ void Asg_RequestCreatOrEditAsg (void) Asg_PutParams (); /***** Table start *****/ - Lay_StartRoundFrameTable (NULL, + Box_StartBoxTable (NULL, ItsANewAssignment ? Txt_New_assignment : Txt_Edit_assignment, NULL, @@ -1234,9 +1235,9 @@ void Asg_RequestCreatOrEditAsg (void) /***** New assignment *****/ if (ItsANewAssignment) - Lay_EndRoundFrameTableWithButton (Lay_CREATE_BUTTON,Txt_Create_assignment); + Box_EndBoxTableWithButton (Lay_CREATE_BUTTON,Txt_Create_assignment); else - Lay_EndRoundFrameTableWithButton (Lay_CONFIRM_BUTTON,Txt_Save); + Box_EndBoxTableWithButton (Lay_CONFIRM_BUTTON,Txt_Save); Act_FormEnd (); /***** Show current assignments, if any *****/ @@ -1268,7 +1269,7 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod) "", The_ClassForm[Gbl.Prefs.Theme], Txt_Groups); - Lay_StartRoundFrameTable ("100%",NULL,NULL, + Box_StartBoxTable ("100%",NULL,NULL, Hlp_USERS_Groups, false, // Not closable 0); @@ -1295,7 +1296,7 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod) Grp_ListGrpsToEditAsgAttOrSvy (&Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp],AsgCod,Grp_ASSIGNMENT); /***** End table *****/ - Lay_EndRoundFrameTable (); + Box_EndBoxTable (); fprintf (Gbl.F.Out,"" ""); } diff --git a/swad_attendance.c b/swad_attendance.c index aa883235..50178897 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -32,6 +32,7 @@ #include // For string functions #include "swad_attendance.h" +#include "swad_box.h" #include "swad_database.h" #include "swad_global.h" #include "swad_group.h" @@ -222,7 +223,7 @@ static void Att_ShowAllAttEvents (void) &Pagination); /***** Start frame *****/ - Lay_StartRoundFrame ("100%",Txt_Events, + Box_StartBox ("100%",Txt_Events, ICanEdit ? Att_PutIconToCreateNewAttEvent : NULL, Hlp_USERS_Attendance, @@ -284,7 +285,7 @@ static void Att_ShowAllAttEvents (void) Att_PutButtonToCreateNewAttEvent (); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); /***** Write again links to pages *****/ if (Pagination.MoreThanOnePage) @@ -1087,7 +1088,7 @@ void Att_RequestCreatOrEditAttEvent (void) Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Gbl.AttEvents.CurrentPage); /***** Table start *****/ - Lay_StartRoundFrameTable (NULL, + Box_StartBoxTable (NULL, ItsANewAttEvent ? Txt_New_event : Txt_Edit_event, NULL, @@ -1158,9 +1159,9 @@ void Att_RequestCreatOrEditAttEvent (void) /***** Button and end frame *****/ if (ItsANewAttEvent) - Lay_EndRoundFrameTableWithButton (Lay_CREATE_BUTTON,Txt_Create_event); + Box_EndBoxTableWithButton (Lay_CREATE_BUTTON,Txt_Create_event); else - Lay_EndRoundFrameTableWithButton (Lay_CONFIRM_BUTTON,Txt_Save); + Box_EndBoxTableWithButton (Lay_CONFIRM_BUTTON,Txt_Save); /***** End form *****/ Act_FormEnd (); @@ -1193,7 +1194,7 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod) "" "", The_ClassForm[Gbl.Prefs.Theme],Txt_Groups); - Lay_StartRoundFrameTable ("100%",NULL,NULL, + Box_StartBoxTable ("100%",NULL,NULL, NULL, false, // Not closable 0); @@ -1220,7 +1221,7 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod) Grp_ListGrpsToEditAsgAttOrSvy (&Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp],AttCod,Grp_ATT_EVENT); /***** End table *****/ - Lay_EndRoundFrameTable (); + Box_EndBoxTable (); fprintf (Gbl.F.Out,"" ""); } @@ -1826,13 +1827,13 @@ void Att_SeeOneAttEvent (void) Gbl.AttEvents.CurrentPage = Pag_GetParamPagNum (Pag_ATT_EVENTS); /***** Show attendance *****/ - Lay_StartRoundFrameTable (NULL,Txt_Event,NULL, + Box_StartBoxTable (NULL,Txt_Event,NULL, Hlp_USERS_Attendance, false, // Not closable 2); Att.AttCod = Gbl.AttEvents.AttCod; Att_ShowOneAttEvent (&Att,true); - Lay_EndRoundFrameTable (); + Box_EndBoxTable (); switch (Gbl.Usrs.Me.Role.Logged) { @@ -1875,7 +1876,7 @@ static void Att_ListAttOnlyMeAsStudent (struct AttendanceEvent *Att) /***** List students' data *****/ /* Header */ - Lay_StartRoundFrameTable (NULL,NULL,NULL, + Box_StartBoxTable (NULL,NULL,NULL, Hlp_USERS_Attendance, false, // Not closable 2); @@ -1903,7 +1904,7 @@ static void Att_ListAttOnlyMeAsStudent (struct AttendanceEvent *Att) Att_WriteRowStdToCallTheRoll (1,&Gbl.Usrs.Me.UsrDat,Att); /* Footer */ - Lay_EndRoundFrameTable (); + Box_EndBoxTable (); if (Att->Open) { @@ -1936,7 +1937,7 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att) Usr_GetListUsrs (Sco_SCOPE_CRS,Rol_STD); /***** Start frame *****/ - Lay_StartRoundFrame (NULL,Txt_Attendance,NULL, + Box_StartBox (NULL,Txt_Attendance,NULL, Hlp_USERS_Attendance, false); // Not closable @@ -2015,7 +2016,7 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att) Lay_EndSection (); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); /***** Free memory for students list *****/ Usr_FreeUsrsList (Rol_STD); @@ -2674,7 +2675,7 @@ void Usr_ReqListStdsAttendanceCrs (void) Usr_GetListUsrs (Sco_SCOPE_CRS,Rol_STD); /***** Start frame *****/ - Lay_StartRoundFrame (NULL,Txt_ROLES_PLURAL_Abc[Rol_STD][Usr_SEX_UNKNOWN], + Box_StartBox (NULL,Txt_ROLES_PLURAL_Abc[Rol_STD][Usr_SEX_UNKNOWN], NULL, Hlp_USERS_Attendance_attendance_list, false); // Not closable @@ -2723,7 +2724,7 @@ void Usr_ReqListStdsAttendanceCrs (void) Lay_EndSection (); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); /***** Free memory for students list *****/ Usr_FreeUsrsList (Rol_STD); @@ -3106,7 +3107,7 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView) } /***** Start frame *****/ - Lay_StartRoundFrameTable (NULL,Txt_Events,NULL, + Box_StartBoxTable (NULL,Txt_Events,NULL, TypeOfView == Att_PRINT_VIEW ? NULL : Hlp_USERS_Attendance_attendance_list, false, // Not closable @@ -3187,7 +3188,7 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView) } /***** End frame *****/ - Lay_EndRoundFrameTable (); + Box_EndBoxTable (); /***** End form *****/ if (TypeOfView == Att_NORMAL_VIEW_ONLY_ME || @@ -3218,7 +3219,7 @@ static void Att_ListStdsAttendanceTable (Att_TypeOfView_t TypeOfView, Usr_UsrDataConstructor (&UsrDat); /***** Start frame *****/ - Lay_StartRoundFrame (NULL,Txt_Attendance, + Box_StartBox (NULL,Txt_Attendance, (TypeOfView == Att_NORMAL_VIEW_ONLY_ME) ? Att_PutIconToPrintMyList : ((TypeOfView == Att_NORMAL_VIEW_STUDENTS) ? Att_PutIconToPrintStdsList : NULL), @@ -3283,7 +3284,7 @@ static void Att_ListStdsAttendanceTable (Att_TypeOfView_t TypeOfView, Att_PutButtonToShowDetails (); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat); @@ -3441,7 +3442,7 @@ static void Att_ListStdsWithAttEventsDetails (Att_TypeOfView_t TypeOfView, Usr_UsrDataConstructor (&UsrDat); /***** Start frame *****/ - Lay_StartRoundFrameTable (NULL,Txt_Details,NULL, + Box_StartBoxTable (NULL,Txt_Details,NULL, TypeOfView == Att_PRINT_VIEW ? NULL : Hlp_USERS_Attendance_attendance_list, false, // Not closable @@ -3462,7 +3463,7 @@ static void Att_ListStdsWithAttEventsDetails (Att_TypeOfView_t TypeOfView, } /***** End frame *****/ - Lay_EndRoundFrameTable (); + Box_EndBoxTable (); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat); diff --git a/swad_banner.c b/swad_banner.c index ea3d4908..66439aa5 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -30,6 +30,7 @@ #include // For string functions #include "swad_banner.h" +#include "swad_box.h" #include "swad_constant.h" #include "swad_database.h" #include "swad_global.h" @@ -115,7 +116,7 @@ void Ban_SeeBanners (void) " ORDER BY ShortName"); /***** Start frame *****/ - Lay_StartRoundFrame (NULL,Txt_Banners,Ban_PutFormToEditBanners, + Box_StartBox (NULL,Txt_Banners,Ban_PutFormToEditBanners, Hlp_SYSTEM_Banners, false); // Not closable @@ -134,7 +135,7 @@ void Ban_SeeBanners (void) } /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); /***** Free list of banners *****/ Ban_FreeListBanners (); @@ -206,7 +207,7 @@ void Ban_EditBanners (void) " FROM banners ORDER BY ShortName"); /***** Start frame *****/ - Lay_StartRoundFrame (NULL,Txt_Banners,Ban_PutIconToViewBanners, + Box_StartBox (NULL,Txt_Banners,Ban_PutIconToViewBanners, Hlp_SYSTEM_Banners_edit, false); // Not closable @@ -218,7 +219,7 @@ void Ban_EditBanners (void) Ban_ListBannersForEdition (); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); /***** Free list of banners *****/ Ban_FreeListBanners (); @@ -831,7 +832,7 @@ static void Ban_PutFormToCreateBanner (void) Act_FormStart (ActNewBan); /***** Start of frame *****/ - Lay_StartRoundFrameTable (NULL,Txt_New_banner,NULL, + Box_StartBoxTable (NULL,Txt_New_banner,NULL, Hlp_SYSTEM_Banners_edit, false, // Not closable 2); @@ -882,7 +883,7 @@ static void Ban_PutFormToCreateBanner (void) Cns_MAX_CHARS_WWW,Ban->WWW); /***** Send button and end frame *****/ - Lay_EndRoundFrameTableWithButton (Lay_CREATE_BUTTON,Txt_Create_banner); + Box_EndBoxTableWithButton (Lay_CREATE_BUTTON,Txt_Create_banner); /***** End of form *****/ Act_FormEnd (); diff --git a/swad_calendar.c b/swad_calendar.c index b3728997..71e88b82 100644 --- a/swad_calendar.c +++ b/swad_calendar.c @@ -27,9 +27,10 @@ #include // For string functions -#include "swad_exam.h" +#include "swad_box.h" #include "swad_calendar.h" #include "swad_database.h" +#include "swad_exam.h" #include "swad_global.h" #include "swad_parameter.h" #include "swad_preference.h" @@ -83,11 +84,11 @@ void Cal_PutIconsToSelectFirstDayOfWeek (void) extern const char *Hlp_PROFILE_Preferences_calendar; extern const char *Txt_Calendar; - Lay_StartRoundFrame (NULL,Txt_Calendar,Cal_PutIconsFirstDayOfWeek, + Box_StartBox (NULL,Txt_Calendar,Cal_PutIconsFirstDayOfWeek, Hlp_PROFILE_Preferences_calendar, false); // Not closable Cal_ShowFormToSelFirstDayOfWeek (ActChg1stDay,NULL,"ICO25x25B"); - Lay_EndRoundFrame (); + Box_EndBox (); } /*****************************************************************************/ @@ -314,7 +315,7 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar, } /***** Start frame *****/ - Lay_StartRoundFrame (NULL,NULL,FunctionToDrawContextualIcons, + Box_StartBox (NULL,NULL,FunctionToDrawContextualIcons, PrintView ? NULL : Hlp_Calendar, false); // Not closable @@ -352,7 +353,7 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar, ParamsStr); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); } /*****************************************************************************/ diff --git a/swad_centre.c b/swad_centre.c index 27aac482..105ce000 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -32,6 +32,7 @@ #include // For the macro WEXITSTATUS #include // For unlink +#include "swad_box.h" #include "swad_centre.h" #include "swad_constant.h" #include "swad_database.h" @@ -165,7 +166,7 @@ void Ctr_SeeCtrWithPendingDegs (void) if ((NumCtrs = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get centres with pending degrees"))) { /***** Write heading *****/ - Lay_StartRoundFrameTable (NULL,Txt_Centres_with_pending_degrees,NULL, + Box_StartBoxTable (NULL,Txt_Centres_with_pending_degrees,NULL, Hlp_SYSTEM_Hierarchy_pending, false, // Not closable 2); @@ -214,7 +215,7 @@ void Ctr_SeeCtrWithPendingDegs (void) Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } - Lay_EndRoundFrameTable (); + Box_EndBoxTable (); } else Ale_ShowAlert (Ale_INFO,Txt_There_are_no_centres_with_requests_for_degrees_to_be_confirmed); @@ -309,7 +310,7 @@ static void Ctr_Configuration (bool PrintView) PhotoExists = Fil_CheckIfPathExists (PathPhoto); /***** Start frame *****/ - Lay_StartRoundFrame (NULL,NULL, + Box_StartBox (NULL,NULL, PrintView ? NULL : Ctr_PutIconsToPrintAndUpload, PrintView ? NULL : @@ -632,7 +633,7 @@ static void Ctr_Configuration (bool PrintView) Lay_EndTable (); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); } } @@ -746,7 +747,7 @@ static void Ctr_ListCentres (void) /***** Start frame *****/ sprintf (Gbl.Title,Txt_Centres_of_INSTITUTION_X,Gbl.CurrentIns.Ins.FullName); - Lay_StartRoundFrame (NULL,Gbl.Title,Ctr_PutIconsListCentres, + Box_StartBox (NULL,Gbl.Title,Ctr_PutIconsListCentres, Hlp_INSTITUTION_Centres, false); // Not closable @@ -778,7 +779,7 @@ static void Ctr_ListCentres (void) } /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); } /*****************************************************************************/ @@ -939,7 +940,7 @@ void Ctr_EditCentres (void) /***** Start frame *****/ sprintf (Gbl.Title,Txt_Centres_of_INSTITUTION_X, Gbl.CurrentIns.Ins.FullName); - Lay_StartRoundFrame (NULL,Gbl.Title,Ctr_PutIconsEditingCentres, + Box_StartBox (NULL,Gbl.Title,Ctr_PutIconsEditingCentres, Hlp_INSTITUTION_Centres, false); // Not closable @@ -951,7 +952,7 @@ void Ctr_EditCentres (void) Ctr_ListCentresForEdition (); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); /***** Free list of centres *****/ Ctr_FreeListCentres (); @@ -2221,7 +2222,7 @@ void Ctr_RequestPhoto (void) Act_FormStart (ActRecCtrPho); /***** Start frame *****/ - Lay_StartRoundFrame (NULL,Txt_Photo,NULL, + Box_StartBox (NULL,Txt_Photo,NULL, NULL, false); // Not closable @@ -2248,7 +2249,7 @@ void Ctr_RequestPhoto (void) Gbl.Form.Id); /***** End frame *****/ - Lay_EndRoundFrame (); + Box_EndBox (); /***** End form *****/ Act_FormEnd (); @@ -2417,7 +2418,7 @@ static void Ctr_PutFormToCreateCentre (void) Lay_ShowErrorAndExit ("You can not edit centres."); /***** Start frame *****/ - Lay_StartRoundFrameTable (NULL,Txt_New_centre,NULL, + Box_StartBoxTable (NULL,Txt_New_centre,NULL, NULL, false, // Not closable 2); @@ -2508,7 +2509,7 @@ static void Ctr_PutFormToCreateCentre (void) ""); /***** Send button and end of frame *****/ - Lay_EndRoundFrameTableWithButton (Lay_CREATE_BUTTON,Txt_Create_centre); + Box_EndBoxTableWithButton (Lay_CREATE_BUTTON,Txt_Create_centre); /***** End form *****/ Act_FormEnd (); @@ -2895,7 +2896,7 @@ unsigned Ctr_ListCtrsFound (const char *Query) sprintf (Gbl.Title,"%u %s", NumCtrs,(NumCtrs == 1) ? Txt_centre : Txt_centres); - Lay_StartRoundFrameTable (NULL,Gbl.Title,NULL, + Box_StartBoxTable (NULL,Gbl.Title,NULL, NULL, false, // Not closable 2); @@ -2920,7 +2921,7 @@ unsigned Ctr_ListCtrsFound (const char *Query) } /***** End table *****/ - Lay_EndRoundFrameTable (); + Box_EndBoxTable (); } /***** Free structure that stores the query result *****/ diff --git a/swad_changelog.h b/swad_changelog.h index 5c75099d..e17f4e9a 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -243,13 +243,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.238 (2017-06-10)" +#define Log_PLATFORM_VERSION "SWAD 16.239 (2017-06-10)" #define CSS_FILE "swad16.235.1.css" #define JS_FILE "swad16.206.3.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 16.239: Jun 10, 2017 New module swad_box to draw boxes. (221970 lines) Version 16.238: Jun 10, 2017 Icon to close frames. (221803 lines) Version 16.237: Jun 09, 2017 Code refactoring related to users belonging to a course. Changes in permissions to access students by non-editing teachers. (221303 lines) diff --git a/swad_chat.c b/swad_chat.c index 1e7e70e7..6da4692c 100644 --- a/swad_chat.c +++ b/swad_chat.c @@ -30,6 +30,7 @@ #include // For sprintf #include +#include "swad_box.h" #include "swad_chat.h" #include "swad_config.h" #include "swad_database.h" @@ -123,7 +124,7 @@ void Cht_ShowListOfAvailableChatRooms (void) Usr_GetMyDegrees (); /***** Table start *****/ - Lay_StartRoundFrame (NULL,Txt_Chat_rooms,NULL, + Box_StartBox (NULL,Txt_Chat_rooms,NULL, NULL, false); // Not closable fprintf (Gbl.F.Out,"
    "); @@ -238,7 +239,7 @@ void Cht_ShowListOfAvailableChatRooms (void) /***** End table *****/ fprintf (Gbl.F.Out,"
"); - Lay_EndRoundFrame (); + Box_EndBox (); } /*****************************************************************************/ @@ -263,7 +264,7 @@ void Cht_ShowListOfChatRoomsWithUsrs (void) if (NumRows > 0) // If not empty chat rooms found { /***** Table start *****/ - Lay_StartRoundFrameTable (NULL,Txt_Rooms_with_users,NULL, + Box_StartBoxTable (NULL,Txt_Rooms_with_users,NULL, NULL, false, // Not closable 2); @@ -297,7 +298,7 @@ void Cht_ShowListOfChatRoomsWithUsrs (void) } /***** End table *****/ - Lay_EndRoundFrameTable (); + Box_EndBoxTable (); } /***** Free structure that stores the query result *****/ diff --git a/swad_connected.c b/swad_connected.c index c8e560ef..dbffcdf2 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -31,6 +31,7 @@ #include // For fprintf #include // For string functions +#include "swad_box.h" #include "swad_database.h" #include "swad_global.h" #include "swad_hierarchy.h" @@ -97,7 +98,7 @@ void Con_ShowConnectedUsrs (void) /* Current time */ sprintf (Gbl.Title,"%s
", Txt_Connected_users); - Lay_StartRoundFrame (NULL,Gbl.Title,Con_PutIconToUpdateConnected, + Box_StartBox (NULL,Gbl.Title,Con_PutIconToUpdateConnected, Hlp_USERS_Connected, false); // Not closable fprintf (Gbl.F.Out,"