diff --git a/swad_account.c b/swad_account.c index 6a2607f4..ea4a6e6a 100644 --- a/swad_account.c +++ b/swad_account.c @@ -168,15 +168,7 @@ static void Acc_ShowFormRequestNewAccountWithParams (const char *NewNicknameWith Pwd_PutFormToGetNewPasswordTwice (); /***** Send button and form end *****/ - fprintf (Gbl.F.Out,"" - "" - "" - "" - "", - Txt_Create_account); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_account); Act_FormEnd (); fprintf (Gbl.F.Out,""); } @@ -231,7 +223,7 @@ void Acc_ShowFormChangeMyAccount (void) ID_ShowFormChangeUsrID (&Gbl.Usrs.Me.UsrDat,true); /***** End of table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } diff --git a/swad_action.c b/swad_action.c index 8464c33a..794df378 100644 --- a/swad_action.c +++ b/swad_action.c @@ -4738,7 +4738,7 @@ void Act_WriteBigMFUActions (struct Act_ListMFUActions *ListMFUActions) } /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ diff --git a/swad_announcement.c b/swad_announcement.c index 44d97aed..71eca242 100644 --- a/swad_announcement.c +++ b/swad_announcement.c @@ -358,15 +358,8 @@ void Ann_ShowFormAnnouncement (void) fprintf (Gbl.F.Out,"" ""); - /***** Button to create announcement *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_announcement); - fprintf (Gbl.F.Out,"" - ""); - - /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + /***** Button to create announcement and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_announcement); /***** End form *****/ Act_FormEnd (); diff --git a/swad_assignment.c b/swad_assignment.c index 5732fe70..86359bc6 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -198,7 +198,7 @@ static void Asg_ShowAllAssignments (void) Asg_ShowOneAssignment (Gbl.Asgs.LstAsgCods[NumAsg-1]); /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Write again links to pages *****/ if (Pagination.MoreThanOnePage) @@ -1210,21 +1210,11 @@ void Asg_RequestCreatOrEditAsg (void) Asg_ShowLstGrpsToEditAssignment (Asg.AsgCod); /***** New assignment *****/ - fprintf (Gbl.F.Out,"" - ""); if (ItsANewAssignment) - Lay_PutCreateButton (Txt_Create_assignment); + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_assignment); else - Lay_PutConfirmButton (Txt_Save); - fprintf (Gbl.F.Out,"" - ""); - - /***** Table end *****/ - Lay_EndRoundFrameTable10 (); - - /***** End form *****/ + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Save); Act_FormEnd (); - fprintf (Gbl.F.Out,"
"); /***** Show current assignments *****/ Asg_ShowAllAssignments (); @@ -1274,7 +1264,7 @@ static void Asg_ShowLstGrpsToEditAssignment (long AsgCod) Grp_ListGrpsToEditAsgAttOrSvy (&Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp],AsgCod,Grp_ASSIGNMENT); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); fprintf (Gbl.F.Out,"" ""); } diff --git a/swad_attendance.c b/swad_attendance.c index ff91197e..c87d0f61 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -46,7 +46,6 @@ /*****************************************************************************/ extern struct Globals Gbl; -extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS]; /*****************************************************************************/ /****************************** Private constants ****************************/ @@ -229,7 +228,7 @@ static void Att_ShowAllAttEvents (void) Att_ShowOneAttEvent (&Gbl.AttEvents.Lst[NumAttEvent-1],false); /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Write again links to pages *****/ if (Pagination.MoreThanOnePage) @@ -1184,18 +1183,11 @@ void Att_RequestCreatOrEditAttEvent (void) /***** Groups *****/ Att_ShowLstGrpsToEditAttEvent (Att.AttCod); - /***** New attendance event *****/ - fprintf (Gbl.F.Out,"" - ""); + /***** Button and end frame *****/ if (ItsANewAttEvent) - Lay_PutCreateButton (Txt_Create_event); + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_event); else - Lay_PutConfirmButton (Txt_Save); - fprintf (Gbl.F.Out,"" - ""); - - /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Save); /***** End form *****/ Act_FormEnd (); @@ -1248,7 +1240,7 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod) Grp_ListGrpsToEditAsgAttOrSvy (&Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp],AttCod,Grp_ATT_EVENT); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); fprintf (Gbl.F.Out,"" ""); } @@ -1858,7 +1850,7 @@ void Att_SeeOneAttEvent (void) Lay_StartRoundFrameTable10 (NULL,2,Txt_Event); Att.AttCod = Gbl.AttEvents.AttCod; Att_ShowOneAttEvent (&Att,true); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); switch (Gbl.Usrs.Me.LoggedRole) { @@ -1925,7 +1917,7 @@ static void Att_ListAttOnlyMeAsStudent (struct AttendanceEvent *Att) Att_WriteRowStdToCallTheRoll (1,&Gbl.Usrs.Me.UsrDat,Att); /* Footer */ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); if (Att->Open) { @@ -2006,15 +1998,8 @@ static void Att_ListAttStudents (struct AttendanceEvent *Att) } } - /* Send button */ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutConfirmButton (Txt_Save); - fprintf (Gbl.F.Out,"" - ""); - - /* End frame */ - Lay_EndRoundFrameTable10 (); + /* Send button and end frame */ + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Save); /***** End form *****/ Act_FormEnd (); @@ -2654,15 +2639,8 @@ void Usr_ReqListAttendanceStdsCrs (void) /* Write list of students to select some of them */ Usr_ListUsersToSelect (Rol_STUDENT); - /* Send button */ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutConfirmButton (Txt_Show_list); - fprintf (Gbl.F.Out,"" - ""); - - /* End frame */ - Lay_EndRoundFrameTable10 (); + /* Send button and end frame */ + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Show_list); /* End form */ Act_FormEnd (); @@ -3051,7 +3029,7 @@ static void Att_ListEventsToSelect (void) } /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** End form *****/ if (Gbl.CurrentAct == ActSeeLstAttStd) @@ -3139,7 +3117,7 @@ static void Att_ListStdsAttendanceTable (unsigned NumStdsInList,long *LstSelecte } /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat); @@ -3317,7 +3295,7 @@ static void Att_ListStdsWithAttEventsDetails (unsigned NumStdsInList,long *LstSe } /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat); diff --git a/swad_banner.c b/swad_banner.c index 6f7555a6..2f6f7216 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -112,7 +112,7 @@ void Ban_SeeBanners (void) Gbl.Banners.Lst[NumBan].ShortName); /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free list of banners *****/ Ban_FreeListBanners (); @@ -399,7 +399,7 @@ static void Ban_ListBannersForEdition (void) ""); } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -774,15 +774,8 @@ static void Ban_PutFormToCreateBanner (void) "", Cns_MAX_LENGTH_WWW,Ban->WWW); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_banner); - fprintf (Gbl.F.Out,"" - ""); - - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_banner); /***** End of form *****/ Act_FormEnd (); diff --git a/swad_calendar.c b/swad_calendar.c index eb41acbf..8090265e 100644 --- a/swad_calendar.c +++ b/swad_calendar.c @@ -172,7 +172,7 @@ void Cal_DrawCalendar (void) Exa_FreeListExamAnnouncements (); /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ diff --git a/swad_centre.c b/swad_centre.c index 8580389f..0e4e1650 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -203,7 +203,7 @@ void Ctr_SeeCtrWithPendingDegs (void) Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } else Lay_ShowAlert (Lay_INFO,Txt_There_are_no_centres_with_requests_for_degrees_to_be_confirmed); @@ -513,7 +513,7 @@ static void Ctr_Configuration (bool PrintView) } /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } } @@ -582,7 +582,7 @@ static void Ctr_ListCentresForSeeing (void) Ctr_ListOneCentreForSeeing (&(Gbl.Ctrs.Lst[NumCtr]),NumCtr + 1); /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -1370,7 +1370,7 @@ static void Ctr_ListCentresForEdition (void) } /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat); @@ -2087,7 +2087,7 @@ static void Ctr_PutFormToCreateCentre (void) ""); /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** End of form *****/ Act_FormEnd (); @@ -2488,7 +2488,7 @@ unsigned Ctr_ListCtrsFound (const char *Query) } /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /***** Free structure that stores the query result *****/ diff --git a/swad_changelog.h b/swad_changelog.h index e79e6ecd..16d29bd8 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,13 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.111 (2015/04/11)" +#define Log_PLATFORM_VERSION "SWAD 14.112 (2015/04/11)" // 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 14.112: Apr 11, 2015 Optimization in frames with ending buttons. (184568 lines) + Version 14.111.1: Apr 11, 2015 Message translated. (184745 lines) Version 14.111: Apr 11, 2015 Changes in layout of surveys. Fixed bugs in surveys. Changes in layout of edition of test questions. diff --git a/swad_chat.c b/swad_chat.c index 428d5909..ba7a6471 100644 --- a/swad_chat.c +++ b/swad_chat.c @@ -225,7 +225,7 @@ void Cht_ShowListOfAvailableChatRooms (void) "" "" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -284,7 +284,7 @@ void Cht_ShowListOfChatRoomsWithUsrs (void) } /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /***** Free structure that stores the query result *****/ diff --git a/swad_connected.c b/swad_connected.c index f0b7b3b9..2abd6837 100644 --- a/swad_connected.c +++ b/swad_connected.c @@ -123,7 +123,7 @@ void Con_ShowConnectedUsrs (void) ""); /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -144,7 +144,7 @@ void Con_ShowLastClicks (void) fprintf (Gbl.F.Out,"" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ diff --git a/swad_country.c b/swad_country.c index 7e6cf36d..78712cb7 100644 --- a/swad_country.c +++ b/swad_country.c @@ -183,7 +183,7 @@ void Cty_SeeCtyWithPendingInss (void) Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } else Lay_ShowAlert (Lay_INFO,Txt_There_are_no_countries_with_requests_for_institutions_to_be_confirmed); @@ -458,7 +458,7 @@ static void Cty_Configuration (bool PrintView) } /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } } @@ -690,7 +690,7 @@ void Cty_ListCountries2 (void) Ins_GetNumInssTotal () - NumInssWithCountry); /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Div for Google Geochart *****/ if (Gbl.CurrentAct == ActSeeCty) @@ -1388,7 +1388,7 @@ static void Cty_ListCountriesForEdition (void) } } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -1741,15 +1741,8 @@ static void Cty_PutFormToCreateCountry (void) Txt_STR_LANG_ID[Lan],Cty_MAX_LENGTH_COUNTRY_WWW,Cty->WWW[Lan]); } - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_country); - fprintf (Gbl.F.Out,"" - ""); - - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); + /***** Send button and end of frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_country); /***** End of form *****/ Act_FormEnd (); diff --git a/swad_course.c b/swad_course.c index 0879d6a2..05987069 100644 --- a/swad_course.c +++ b/swad_course.c @@ -435,19 +435,13 @@ static void Crs_Configuration (bool PrintView) Gbl.Prefs.IconsURL, (Indicators.CountIndicators == Ind_NUM_INDICATORS) ? "ok_green" : "warning"); - - if (IsForm) - { - fprintf (Gbl.F.Out,"" - ""); - Lay_PutConfirmButton (Txt_Save); - fprintf (Gbl.F.Out,"" - ""); - } } - /***** End of the frame *****/ - Lay_EndRoundFrameTable10 (); + /***** Send button and end frame *****/ + if (IsForm) + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Save); + else + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** End form *****/ if (IsForm) @@ -851,7 +845,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void) "" "" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -1328,7 +1322,7 @@ static void Crs_ListCoursesForSeeing (void) } /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -1588,7 +1582,7 @@ static void Crs_ListCoursesForEdition (void) } /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat); @@ -1780,17 +1774,10 @@ static void Crs_PutFormToCreateCourse (void) "" ""); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_course); - fprintf (Gbl.F.Out,"" - ""); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_course); - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); - - /***** End of form *****/ + /***** End form *****/ Act_FormEnd (); } @@ -3229,7 +3216,7 @@ unsigned Crs_ListCrssFound (const char *Query) } /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /***** Free structure that stores the query result *****/ diff --git a/swad_database.c b/swad_database.c index 12f28e56..dd4ae1ed 100644 --- a/swad_database.c +++ b/swad_database.c @@ -1059,7 +1059,7 @@ mysql> DESCRIBE files; "Cod INT NOT NULL DEFAULT -1," "ZoneUsrCod INT NOT NULL DEFAULT -1," "PublisherUsrCod INT NOT NULL," - "FileType TINYINT NOT NULL DEFAULT 0" + "FileType TINYINT NOT NULL DEFAULT 0," "Path TEXT COLLATE latin1_bin NOT NULL," "Hidden ENUM('N','Y') NOT NULL DEFAULT 'N'," "Public ENUM('N','Y') NOT NULL DEFAULT 'N'," diff --git a/swad_degree.c b/swad_degree.c index c7ac0ab2..6479f6d2 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -254,7 +254,7 @@ void Deg_SeeDegWithPendingCrss (void) Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } else Lay_ShowAlert (Lay_INFO,Txt_There_are_no_degrees_with_requests_for_courses_to_be_confirmed); @@ -482,7 +482,7 @@ static void Deg_Configuration (bool PrintView) } /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } } @@ -1135,7 +1135,7 @@ static void Deg_ListDegreeTypesForSeeing (void) Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -1219,7 +1219,7 @@ static void Deg_ListDegreeTypesForEdition (void) Gbl.Degs.DegTypes.Lst[NumDegTyp].NumDegs); } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -1244,7 +1244,7 @@ static void Deg_ListDegreesForSeeing (void) Deg_ListOneDegreeForSeeing (&(Gbl.CurrentCtr.LstDegs[NumDeg]),NumDeg + 1); /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -1683,7 +1683,7 @@ static void Deg_ListDegreesForEdition (void) } /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat); @@ -1788,17 +1788,10 @@ static void Deg_PutFormToCreateDegType (void) ""); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_type_of_degree); - fprintf (Gbl.F.Out,"" - ""); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_type_of_degree); - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); - - /***** End of form *****/ + /***** End form *****/ Act_FormEnd (); } @@ -1956,17 +1949,10 @@ static void Deg_PutFormToCreateDegree (void) "" ""); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_degree); - fprintf (Gbl.F.Out,"" - ""); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_degree); - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); - - /***** End of form *****/ + /***** End form *****/ Act_FormEnd (); } @@ -4083,7 +4069,7 @@ unsigned Deg_ListDegsFound (const char *Query) } /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /***** Free structure that stores the query result *****/ diff --git a/swad_department.c b/swad_department.c index 8d6f2ca6..31df9ccf 100644 --- a/swad_department.c +++ b/swad_department.c @@ -182,7 +182,7 @@ void Dpt_SeeDepts (void) Rol_TEACHER) - NumTchsInsWithDpt); /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free list of departments *****/ Dpt_FreeListDepartments (); @@ -595,7 +595,7 @@ static void Dpt_ListDepartmentsForEdition (void) Dpt->NumTchs); } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -941,15 +941,8 @@ static void Dpt_PutFormToCreateDepartment (void) "", Cns_MAX_LENGTH_WWW,Dpt->WWW); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_department); - fprintf (Gbl.F.Out,"" - ""); - - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); + /***** Send button and end of frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_department); /***** End of form *****/ Act_FormEnd (); diff --git a/swad_enrollment.c b/swad_enrollment.c index 927ef8c8..bd5d146c 100644 --- a/swad_enrollment.c +++ b/swad_enrollment.c @@ -525,14 +525,14 @@ static void Enr_ShowFormRegRemSeveralUsrs (void) fprintf (Gbl.F.Out,""); + /***** Form to send students to be enrolled / removed *****/ + Act_FormStart (ActRcvFrmMdfUsrCrs); + /***** Start frame *****/ Lay_StartRoundFrameTable10 (NULL,2,Txt_Admin_several_users); fprintf (Gbl.F.Out,"" ""); - /***** Form to send students to be enrolled / removed *****/ - Act_FormStart (ActRcvFrmMdfUsrCrs); - /***** Step 1: List of students to be enrolled / removed *****/ fprintf (Gbl.F.Out,"
" "%s" @@ -601,22 +601,21 @@ static void Enr_ShowFormRegRemSeveralUsrs (void) } } - /***** Step 5: Button to register / remove students *****/ + /***** Step 5: Confirm register / remove students *****/ fprintf (Gbl.F.Out,"
" "%s" "
", The_ClassTitle[Gbl.Prefs.Theme], Txt_Step_5_Confirm_the_enrollment_removing); Pwd_AskForConfirmationOnDangerousAction (); - Lay_PutConfirmButton (Txt_Confirm); + + /***** Send button and end frame *****/ + fprintf (Gbl.F.Out,"" + ""); + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Confirm); /***** End of form *****/ Act_FormEnd (); - - /***** End frame *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_EndRoundFrameTable10 (); } /*****************************************************************************/ @@ -2519,8 +2518,8 @@ void Enr_ShowEnrollmentRequests (void) Enr_RemoveEnrollmentRequest (Crs.CrsCod,UsrDat.UsrCod); } - /* End of table */ - Lay_EndRoundFrameTable10 (); + /* End frame */ + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /* Free memory used for user's data */ Usr_UsrDataDestructor (&UsrDat); @@ -2672,7 +2671,7 @@ static void Enr_ReqAnotherUsrIDToRegisterRemove (void) /***** End frame *****/ fprintf (Gbl.F.Out,"" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ diff --git a/swad_exam.c b/swad_exam.c index 50bd9332..57a00bb9 100644 --- a/swad_exam.c +++ b/swad_exam.c @@ -1216,28 +1216,19 @@ static void Exa_ShowExamAnnouncement (long ExaCod,Exa_tTypeViewExamAnnouncement_ "" \ ""); - switch (TypeViewExamAnnouncement) - { - case Exa_NORMAL_VIEW: - break; - case Exa_PRINT_VIEW: - /* Bottom space used for signatures */ - fprintf (Gbl.F.Out,"
"); - break; - case Exa_FORM_VIEW: - /* Send button */ - if (ExaCod > 0) - Lay_PutConfirmButton (Txt_Publish_announcement_OF_EXAM); - else - Lay_PutCreateButton (Txt_Publish_announcement_OF_EXAM); - Act_FormEnd (); - break; - } + if (TypeViewExamAnnouncement == Exa_PRINT_VIEW) + /* Bottom space used for signatures */ + fprintf (Gbl.F.Out,"
"); /***** End frame *****/ fprintf (Gbl.F.Out,"" \ ""); - Lay_EndRoundFrameTable10 (); + if (TypeViewExamAnnouncement == Exa_FORM_VIEW) + Lay_EndRoundFrameTable10 ((ExaCod > 0) ? Lay_CONFIRM_BUTTON : + Lay_CREATE_BUTTON, + Txt_Publish_announcement_OF_EXAM); + else + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); if (TypeViewExamAnnouncement == Exa_PRINT_VIEW) QR_ExamAnnnouncement (); diff --git a/swad_file_browser.c b/swad_file_browser.c index ed646e13..d99c28e2 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -2870,16 +2870,7 @@ void Brw_AskEditWorksCrs (void) Lay_StartRoundFrameTable10 (NULL,0,Txt_Users); Usr_ListUsersToSelect (Rol_TEACHER); Usr_ListUsersToSelect (Rol_STUDENT); - - /* Button to send the form */ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutConfirmButton (Txt_View_works); - fprintf (Gbl.F.Out,"" - ""); - - /* Frame end */ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_View_works); /* End form */ Act_FormEnd (); @@ -2993,7 +2984,7 @@ static void Brw_ShowFileBrowsersAsgWrkCrs (void) } /***** End of the table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } else // If no users are selected... { @@ -3326,11 +3317,7 @@ static void Brw_ShowFileBrowser (void) Brw_ListDir (1,Gbl.FileBrowser.Priv.PathRootFolder,Brw_RootFolderInternalNames[Gbl.FileBrowser.Type]); /***** End of table *****/ - if (Gbl.FileBrowser.Type == Brw_ADMI_ASSIG_CRS || - Gbl.FileBrowser.Type == Brw_ADMI_WORKS_CRS) - Lay_EndRoundFrameTable10 (); - else - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -7628,14 +7615,7 @@ static void Brw_PutFormToCreateAFolder (const char *FileNameToShow) extern const char *Txt_You_can_create_a_new_folder_inside_the_folder_X; extern const char *Txt_Folder; - /***** Start frame *****/ - Lay_StartRoundFrameTable10 (NULL,0,Txt_Create_folder); - fprintf (Gbl.F.Out,"" - ""); - sprintf (Gbl.Message,Txt_You_can_create_a_new_folder_inside_the_folder_X, - FileNameToShow); - Lay_ShowAlert (Lay_INFO,Gbl.Message); - + /***** Start form *****/ Act_FormStart (Brw_ActCreateFolder[Gbl.FileBrowser.Type]); switch (Gbl.FileBrowser.Type) { @@ -7654,20 +7634,27 @@ static void Brw_PutFormToCreateAFolder (const char *FileNameToShow) } Brw_ParamListFiles (Brw_IS_FOLDER,Gbl.FileBrowser.Priv.PathInTreeExceptFileOrFolder,Gbl.FileBrowser.FilFolLnkName); - /* Folder */ + /***** Start frame *****/ + Lay_StartRoundFrameTable10 (NULL,0,Txt_Create_folder); + fprintf (Gbl.F.Out,"" + ""); + sprintf (Gbl.Message,Txt_You_can_create_a_new_folder_inside_the_folder_X, + FileNameToShow); + Lay_ShowAlert (Lay_INFO,Gbl.Message); + + /***** Folder *****/ fprintf (Gbl.F.Out,"" "", + " size=\"32\" maxlength=\"40\" value=\"\" />" + "" + "", The_ClassFormul[Gbl.Prefs.Theme],Txt_Folder); - /* Button to send */ - Lay_PutCreateButton (Txt_Create_folder); - Act_FormEnd (); + /* Button to send and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_folder); - /***** End frame *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_EndRoundFrameTable10 (); + /***** End form *****/ + Act_FormEnd (); } /*****************************************************************************/ @@ -7685,6 +7672,7 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow) /***** Start frame *****/ fprintf (Gbl.F.Out,"
"); + Lay_StartRoundFrameTable10 ("100%",0,Txt_Upload_files); fprintf (Gbl.F.Out,"" ""); @@ -7756,7 +7744,8 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow) /***** End frame *****/ fprintf (Gbl.F.Out,"" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); + fprintf (Gbl.F.Out,"
"); } @@ -7771,6 +7760,7 @@ static void Brw_PutFormToUploadOneFileClassic (const char *FileNameToShow) /***** Start frame *****/ fprintf (Gbl.F.Out,""); } @@ -7821,14 +7812,7 @@ static void Brw_PutFormToPasteAFileOrFolder (const char *FileNameToShow) extern const char *Txt_Paste; extern const char *Txt_or_you_can_make_a_file_copy_to_the_folder_X; - /***** Start frame *****/ - Lay_StartRoundFrameTable10 (NULL,0,Txt_Paste); - fprintf (Gbl.F.Out,"" - ""); - sprintf (Gbl.Message,Txt_or_you_can_make_a_file_copy_to_the_folder_X, - FileNameToShow); - Lay_ShowAlert (Lay_INFO,Gbl.Message); - + /***** Start form *****/ Act_FormStart (Brw_ActPaste[Gbl.FileBrowser.Type]); switch (Gbl.FileBrowser.Type) { @@ -7847,14 +7831,21 @@ static void Brw_PutFormToPasteAFileOrFolder (const char *FileNameToShow) } Brw_ParamListFiles (Brw_IS_FOLDER,Gbl.FileBrowser.Priv.PathInTreeExceptFileOrFolder,Gbl.FileBrowser.FilFolLnkName); - /* Button to send */ - Lay_PutCreateButton (Txt_Paste); - Act_FormEnd (); - - /***** End frame *****/ + /***** Start frame *****/ + Lay_StartRoundFrameTable10 (NULL,0,Txt_Paste); + fprintf (Gbl.F.Out,"" + ""); + sprintf (Gbl.Message,Txt_or_you_can_make_a_file_copy_to_the_folder_X, + FileNameToShow); + Lay_ShowAlert (Lay_INFO,Gbl.Message); fprintf (Gbl.F.Out,"" ""); - Lay_EndRoundFrameTable10 (); + + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Paste); + + /***** End form *****/ + Act_FormEnd (); } /*****************************************************************************/ @@ -7870,14 +7861,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow) extern const char *Txt_Save_as; extern const char *Txt_optional; - /***** Start frame *****/ - Lay_StartRoundFrameTable10 (NULL,0,Txt_Create_link); - fprintf (Gbl.F.Out,"" - ""); - sprintf (Gbl.Message,Txt_or_you_can_create_a_new_link_inside_the_folder_X, - FileNameToShow); - Lay_ShowAlert (Lay_INFO,Gbl.Message); - + /***** Start form *****/ Act_FormStart (Brw_ActCreateLink[Gbl.FileBrowser.Type]); switch (Gbl.FileBrowser.Type) { @@ -7896,6 +7880,14 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow) } Brw_ParamListFiles (Brw_IS_FOLDER,Gbl.FileBrowser.Priv.PathInTreeExceptFileOrFolder,Gbl.FileBrowser.FilFolLnkName); + /***** Start frame *****/ + Lay_StartRoundFrameTable10 (NULL,0,Txt_Create_link); + fprintf (Gbl.F.Out,"" + ""); + sprintf (Gbl.Message,Txt_or_you_can_create_a_new_link_inside_the_folder_X, + FileNameToShow); + Lay_ShowAlert (Lay_INFO,Gbl.Message); + /* URL */ fprintf (Gbl.F.Out,"" "" @@ -7920,17 +7912,16 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow) " size=\"40\" maxlength=\"100\" value=\"\" />" "" "" - "
", + "" + "" + "", The_ClassFormul[Gbl.Prefs.Theme],Txt_Save_as,Txt_optional); - /* Button to send */ - Lay_PutCreateButton (Txt_Create_link); - Act_FormEnd (); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_link); - /***** End frame *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_EndRoundFrameTable10 (); + /***** End form *****/ + Act_FormEnd (); } /*****************************************************************************/ @@ -8831,11 +8822,6 @@ void Brw_ShowFileMetadata (void) Brw_LimitLengthFileNameToShow (FileMetadata.FileType, Gbl.FileBrowser.FilFolLnkName,FileNameToShow); - /***** Start frame *****/ - Lay_StartRoundFrameTable10Shadow (NULL,0); - fprintf (Gbl.F.Out,"" - ""); - /***** Start form to update the metadata of a file *****/ if (ICanEdit) // I can edit file properties { @@ -8886,8 +8872,8 @@ void Brw_ShowFileMetadata (void) Gbl.FileBrowser.FilFolLnkName); } - /***** Start table *****/ - fprintf (Gbl.F.Out,""); + /***** Start frame *****/ + Lay_StartRoundFrameTable10Shadow (NULL,2); /***** Link to download the file *****/ fprintf (Gbl.F.Out,"" @@ -9077,19 +9063,14 @@ void Brw_ShowFileMetadata (void) The_ClassFormul[Gbl.Prefs.Theme],Txt_Public_views, FileMetadata.NumPublicViews); - /***** End form and table *****/ - fprintf (Gbl.F.Out,"
"); - + /***** End frame *****/ if (ICanEdit) // I can edit file properties { - Lay_PutConfirmButton (Txt_Save_file_properties); + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Save_file_properties); Act_FormEnd (); } - - /***** End frame *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_EndRoundFrameTable10 (); + else + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Mark possible notifications as seen *****/ switch (Gbl.FileBrowser.Type) @@ -10931,7 +10912,7 @@ unsigned Brw_ListDocsFound (const char *Query,const char *Title) ""); /* Table end */ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /***** Free structure that stores the query result *****/ diff --git a/swad_forum.c b/swad_forum.c index 55d552d7..4352b447 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -947,7 +947,7 @@ static void For_ShowThreadPosts (long ThrCod,char *LastSubject) "
" "" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); LastSubject[0] = '\0'; if (NumPsts) // If there are posts... @@ -1034,7 +1034,7 @@ static void For_ShowThreadPosts (long ThrCod,char *LastSubject) fprintf (Gbl.F.Out,"" "" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Write again links to pages *****/ if (Pagination.MoreThanOnePage) @@ -1745,7 +1745,7 @@ void For_ShowForumList (void) "" "" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -2491,7 +2491,7 @@ void For_ShowForumThrs (void) "" "" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** List the threads *****/ if (NumThrs) @@ -2559,7 +2559,7 @@ void For_ShowForumThrs (void) For_ListForumThrs (ThrCods,&PaginationThrs); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Write links to all the pages in the listing of threads *****/ if (PaginationThrs.MoreThanOnePage) @@ -3745,16 +3745,15 @@ static void For_WriteFormForumPst (bool IsReply,long ThrCod,const char *Subject) The_ClassFormul[Gbl.Prefs.Theme], Txt_MSG_Message); - /***** Help for text editor and send button *****/ + /***** Help for text editor *****/ fprintf (Gbl.F.Out,"" ""); Lay_HelpPlainEditor (); - Lay_PutCreateButton (Txt_Send_message); fprintf (Gbl.F.Out,"" ""); - /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Send_message); /***** End form *****/ Act_FormEnd (); diff --git a/swad_group.c b/swad_group.c index ad8f868b..d19ef69d 100644 --- a/swad_group.c +++ b/swad_group.c @@ -286,7 +286,7 @@ static void Grp_ShowFormSeveralGrps (Act_Action_t NextAction) ""); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** End form *****/ Act_FormEnd (); @@ -1248,7 +1248,7 @@ static void Grp_ListGroupTypesForEdition (void) Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps); } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -1430,7 +1430,7 @@ static void Grp_ListGroupsForEdition (void) } } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -1602,7 +1602,7 @@ unsigned Grp_ShowLstGrpsToChgMyGrps (bool ShowWarningsToStudents) NumGrpsIBelong += Grp_ListGrpsForChange (&Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp]); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free list of groups types and groups in this course *****/ Grp_FreeListGrpTypesAndGrps (); @@ -1748,7 +1748,7 @@ void Grp_ShowLstGrpsToChgOtherUsrsGrps (long UsrCod) Grp_ListGrpsToAddOrRemUsrs (&Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp],UsrCod); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free list of groups types and groups in current course *****/ Grp_FreeListGrpTypesAndGrps (); @@ -2143,17 +2143,10 @@ static void Grp_PutFormToCreateGroupType (void) fprintf (Gbl.F.Out,"" ""); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_type_of_group); - fprintf (Gbl.F.Out,"" - ""); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_type_of_group); - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); - - /***** End of form *****/ + /***** End form *****/ Act_FormEnd (); } @@ -2226,15 +2219,8 @@ static void Grp_PutFormToCreateGroup (void) fprintf (Gbl.F.Out,"" ""); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_group); - fprintf (Gbl.F.Out,"" - ""); - - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_group); /***** End of form *****/ Act_FormEnd (); diff --git a/swad_holiday.c b/swad_holiday.c index df98ea63..a00ab148 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -166,7 +166,7 @@ void Hld_SeeHolidays (void) } /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free list of holidays *****/ Hld_FreeListHolidays (); @@ -587,7 +587,7 @@ static void Hld_ListHolidaysForEdition (void) ""); } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -1005,15 +1005,8 @@ static void Hld_PutFormToCreateHoliday (void) "", Hld_MAX_LENGTH_HOLIDAY_NAME,Hld->Name); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_holiday); - fprintf (Gbl.F.Out,"" - ""); - - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); + /***** Send button and end of frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_holiday); /***** End of form *****/ Act_FormEnd (); diff --git a/swad_icon.c b/swad_icon.c index ca931d7e..d0e287e6 100644 --- a/swad_icon.c +++ b/swad_icon.c @@ -93,7 +93,7 @@ void Ico_PutIconsToSelectIconSet (void) fprintf (Gbl.F.Out,""); } fprintf (Gbl.F.Out,""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ diff --git a/swad_import.c b/swad_import.c index 239d4ec6..3ffd075e 100644 --- a/swad_import.c +++ b/swad_import.c @@ -592,7 +592,7 @@ static unsigned Imp_GetAndListImpGrpsAndStdsFromDB (bool ItsAFormToRegRemStds) } /***** End of table with courses *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /***** Free structure that stores the query result *****/ diff --git a/swad_indicator.c b/swad_indicator.c index a0e8cb83..aa411b47 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -211,7 +211,7 @@ void Ind_ReqIndicatorsCourses (void) /***** End frame *****/ fprintf (Gbl.F.Out,"" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free structure that stores the query result *****/ DB_FreeMySQLResult (&mysql_res); diff --git a/swad_info.c b/swad_info.c index b6104043..af0f6672 100644 --- a/swad_info.c +++ b/swad_info.c @@ -888,7 +888,7 @@ static void Inf_ShowPage (Inf_InfoType_t InfoType,const char *URL) ""); /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -949,7 +949,7 @@ void Inf_FormsToSelSendInfo (void) } /* End of table */ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Form to choice between alternatives *****/ /* Start of form and table */ @@ -987,7 +987,7 @@ void Inf_FormsToSelSendInfo (void) } /* End of table and form */ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); Act_FormEnd (); } @@ -1612,7 +1612,7 @@ static void Inf_ShowPlainTxtInfo (Inf_InfoType_t InfoType) fprintf (Gbl.F.Out,"

" "" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } else Lay_ShowAlert (Lay_WARNING,Txt_No_information_available); @@ -1716,7 +1716,7 @@ static void Inf_ShowRichTxtInfo (Inf_InfoType_t InfoType) fprintf (Gbl.F.Out,"" "" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } else Lay_ShowAlert (Lay_WARNING,Txt_No_information_available); @@ -1846,12 +1846,11 @@ void Inf_EditPlainTxtInfo (void) "%s" "", TxtHTML); - Lay_PutConfirmButton (Txt_Save); fprintf (Gbl.F.Out,"" ""); /***** End form *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Save); Act_FormEnd (); } @@ -1885,12 +1884,11 @@ void Inf_EditRichTxtInfo (void) "%s" "", TxtHTML); - Lay_PutConfirmButton (Txt_Save); fprintf (Gbl.F.Out,"" ""); /***** End form *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Save); Act_FormEnd (); } diff --git a/swad_institution.c b/swad_institution.c index 69920efc..0d040478 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -192,7 +192,7 @@ void Ins_SeeInsWithPendingCtrs (void) Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd; } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } else Lay_ShowAlert (Lay_INFO,Txt_There_are_no_institutions_with_requests_for_centres_to_be_confirmed); @@ -467,7 +467,7 @@ static void Ins_Configuration (bool PrintView) } /***** End of the frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } } @@ -522,7 +522,7 @@ static void Ins_ListInstitutionsForSeeing (void) Ins_ListOneInstitutionForSeeing (&(Gbl.Inss.Lst[NumIns]),NumIns + 1); /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -1293,7 +1293,7 @@ static void Ins_ListInstitutionsForEdition (void) /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat); @@ -1846,15 +1846,8 @@ static void Ins_PutFormToCreateInstitution (void) "" ""); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_institution); - fprintf (Gbl.F.Out,"" - ""); - - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); + /***** Send button and end of frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_institution); /***** End of form *****/ Act_FormEnd (); @@ -2170,7 +2163,7 @@ unsigned Ins_ListInssFound (const char *Query) } /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /***** Free structure that stores the query result *****/ diff --git a/swad_layout.c b/swad_layout.c index 5efd64ba..86a6a291 100644 --- a/swad_layout.c +++ b/swad_layout.c @@ -1136,14 +1136,33 @@ void Lay_StartRoundFrameTable10Shadow (const char *Width,unsigned CellPadding) fprintf (Gbl.F.Out,"\">"); } -void Lay_EndRoundFrameTable10 (void) +void Lay_EndRoundFrameTable10 (Lay_Button_t Button,const char *TxtButton) { fprintf (Gbl.F.Out,""); - Lay_EndRoundFrame10 (); + + Lay_EndRoundFrame10 (Button,TxtButton); } -void Lay_EndRoundFrame10 (void) +void Lay_EndRoundFrame10 (Lay_Button_t Button,const char *TxtButton) { + /***** Button *****/ + if (TxtButton) + if (TxtButton[0]) + switch (Button) + { + case Lay_NO_BUTTON: + break; + case Lay_CREATE_BUTTON: + Lay_PutCreateButton (TxtButton); + break; + case Lay_CONFIRM_BUTTON: + Lay_PutConfirmButton (TxtButton); + break; + case Lay_REMOVE_BUTTON: + Lay_PutRemoveButton (TxtButton); + break; + } + fprintf (Gbl.F.Out,"" ""); } @@ -1520,7 +1539,7 @@ void Lay_PutIconsToSelectLayout (void) fprintf (Gbl.F.Out,""); } fprintf (Gbl.F.Out,""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -1595,7 +1614,7 @@ void Lay_AdvertisementMobile (void) Gbl.Prefs.IconsURL); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); fprintf (Gbl.F.Out,""); } diff --git a/swad_layout.h b/swad_layout.h index 38fc26ff..f5ea94c6 100644 --- a/swad_layout.h +++ b/swad_layout.h @@ -77,6 +77,14 @@ typedef enum #define Lay_LAYOUT_DEFAULT Lay_LAYOUT_DESKTOP +typedef enum + { + Lay_NO_BUTTON, + Lay_CREATE_BUTTON, + Lay_CONFIRM_BUTTON, + Lay_REMOVE_BUTTON, + } Lay_Button_t; + /*****************************************************************************/ /****************************** Public prototypes ****************************/ /*****************************************************************************/ @@ -100,8 +108,8 @@ void Lay_PutRemoveButton (const char *Text); void Lay_StartRoundFrameTable10 (const char *Width,unsigned CellPadding,const char *Title); void Lay_StartRoundFrame10 (const char *Width,const char *Title); void Lay_StartRoundFrameTable10Shadow (const char *Width,unsigned CellPadding); -void Lay_EndRoundFrameTable10 (void); -void Lay_EndRoundFrame10 (void); +void Lay_EndRoundFrameTable10 (Lay_Button_t Button,const char *TxtButton); +void Lay_EndRoundFrame10 (Lay_Button_t Button,const char *TxtButton); void Lay_ShowErrorAndExit (const char *Message); void Lay_ShowAlert (Lay_AlertType_t MsgType,const char *Message); diff --git a/swad_link.c b/swad_link.c index 5ded1e6f..dddd4c96 100644 --- a/swad_link.c +++ b/swad_link.c @@ -105,7 +105,7 @@ void Lnk_SeeLinks (void) Gbl.Links.Lst[NumLnk].ShortName); /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /***** Free list of links *****/ @@ -351,7 +351,7 @@ static void Lnk_ListLinksForEdition (void) ""); } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -617,15 +617,8 @@ static void Lnk_PutFormToCreateLink (void) "", Cns_MAX_LENGTH_WWW,Lnk->WWW); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_link); - fprintf (Gbl.F.Out,"" - ""); - - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_link); /***** End of form *****/ Act_FormEnd (); diff --git a/swad_mail.c b/swad_mail.c index 02bf92a5..5849e82b 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -146,7 +146,7 @@ void Mai_SeeMailDomains (void) Gbl.Mails.Lst[NumMai].NumUsrs); /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free list of mail domains *****/ Mai_FreeListMailDomains (); @@ -454,7 +454,7 @@ static void Mai_ListMailDomainsForEdition (void) Mai->NumUsrs); } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -680,15 +680,8 @@ static void Mai_PutFormToCreateMailDomain (void) Mai_MAX_LENGTH_MAIL_INFO,Mai->Info); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_mail_domain); - fprintf (Gbl.F.Out,"" - ""); - - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_mail_domain); /***** End of form *****/ Act_FormEnd (); diff --git a/swad_menu.c b/swad_menu.c index 5e8a5ee4..bc6896eb 100644 --- a/swad_menu.c +++ b/swad_menu.c @@ -329,7 +329,7 @@ void Mnu_PutIconsToSelectMenu (void) fprintf (Gbl.F.Out,""); } fprintf (Gbl.F.Out,""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ diff --git a/swad_message.c b/swad_message.c index 62d0e5ae..2cb225ae 100644 --- a/swad_message.c +++ b/swad_message.c @@ -214,7 +214,7 @@ void Msg_ListEMails (void) ""); /***** End of the frame used to list the e-mails *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Icon to open the client e-mail program *****/ fprintf (Gbl.F.Out,"
" @@ -346,12 +346,11 @@ static void Msg_PutFormMsgUsrs (const char *Content) fprintf (Gbl.F.Out,"" ""); Lay_HelpPlainEditor (); - Lay_PutCreateButton (Txt_Send_message); fprintf (Gbl.F.Out,"" ""); /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Send_message); /***** End form *****/ Act_FormEnd (); @@ -1651,7 +1650,7 @@ static void Msg_ShowSentOrReceivedMessages (Msg_TypeOfMessages_t TypeOfMessages) fprintf (Gbl.F.Out,"" "" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Write again links to pages *****/ if (Pagination.MoreThanOnePage) @@ -3570,7 +3569,7 @@ void Msg_ListBannedUsrs (void) } /***** End of table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat); diff --git a/swad_network.c b/swad_network.c index 36e4a603..c89c2a1a 100644 --- a/swad_network.c +++ b/swad_network.c @@ -281,7 +281,7 @@ void Net_ShowFormMyWebsAndSocialNets (void) } /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -495,7 +495,7 @@ void Net_ShowWebAndSocialNetworksStats (void) } /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free structure that stores the query result *****/ DB_FreeMySQLResult (&mysql_res); diff --git a/swad_notice.c b/swad_notice.c index bdfcead9..d9c75604 100644 --- a/swad_notice.c +++ b/swad_notice.c @@ -112,15 +112,8 @@ void Not_ShowFormNotice (void) The_ClassFormul[Gbl.Prefs.Theme], Txt_MSG_Message); - /***** Button to create announcement *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_notice); - fprintf (Gbl.F.Out,"" - ""); - - /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + /***** Button to create notice and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_notice); /***** End form *****/ Act_FormEnd (); @@ -452,7 +445,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing) { fprintf (Gbl.F.Out,"" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /***** Free structure that stores the query result *****/ diff --git a/swad_notification.c b/swad_notification.c index da47f40b..73df0675 100644 --- a/swad_notification.c +++ b/swad_notification.c @@ -564,7 +564,7 @@ void Ntf_ShowMyNotifications (void) } /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free memory used for user's data *****/ Usr_UsrDataDestructor (&UsrDat); @@ -1687,15 +1687,12 @@ void Ntf_PutFormChangeNotifSentByEMail (void) extern const char *Txt_NOTIFY_EVENTS_PLURAL[Ntf_NUM_NOTIFY_EVENTS]; Ntf_NotifyEvent_t NotifyEvent; - /***** Start table *****/ - Lay_StartRoundFrameTable10 (NULL,0,Txt_Notifications); - fprintf (Gbl.F.Out,"" - ""); - /***** Start form *****/ Act_FormStart (ActChgNtfPrf); - fprintf (Gbl.F.Out,"" - "" + + /***** Start frame *****/ + Lay_StartRoundFrameTable10 (NULL,2,Txt_Notifications); + fprintf (Gbl.F.Out,"" "" ""); } - /***** End form *****/ - fprintf (Gbl.F.Out,"
" "%s" @@ -1735,15 +1732,11 @@ void Ntf_PutFormChangeNotifSentByEMail (void) "
"); - Lay_PutConfirmButton (Txt_Save_changes); - Act_FormEnd (); + /***** Button to save changes and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Save_changes); - /***** End table *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_EndRoundFrameTable10 (); + /***** End form *****/ + Act_FormEnd (); } /*****************************************************************************/ diff --git a/swad_password.c b/swad_password.c index f03c3f03..b4dca5b4 100644 --- a/swad_password.c +++ b/swad_password.c @@ -234,24 +234,34 @@ void Pwd_ShowFormSendNewPwd (void) { extern const char *The_ClassFormul[The_NUM_THEMES]; extern const char *Txt_If_you_have_forgotten_your_password_; + extern const char *Txt_Password; extern const char *Txt_nick_email_or_ID; extern const char *Txt_Email_new_password; - /***** Help text *****/ - Lay_ShowAlert (Lay_INFO,Txt_If_you_have_forgotten_your_password_); - /***** Start of form *****/ Act_FormStart (ActSndNewPwd); + /***** Start frame *****/ + Lay_StartRoundFrameTable10 (NULL,2,Txt_Password); + fprintf (Gbl.F.Out,"" + ""); + + /***** Help text *****/ + Lay_ShowAlert (Lay_INFO,Txt_If_you_have_forgotten_your_password_); + /***** User's ID/nickname *****/ - fprintf (Gbl.F.Out,"
" - "%s: " - "" - "
", + fprintf (Gbl.F.Out,"" + "", The_ClassFormul[Gbl.Prefs.Theme],Txt_nick_email_or_ID,Usr_MAX_LENGTH_USR_LOGIN,Gbl.Usrs.Me.UsrIdLogin); + /***** Send button and end table *****/ + fprintf (Gbl.F.Out,"" + ""); + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Email_new_password); + /***** End form *****/ - Lay_PutConfirmButton (Txt_Email_new_password); Act_FormEnd (); } @@ -673,7 +683,7 @@ void Pwd_ShowFormChgPwd (void) /***** Start form *****/ Act_FormStart (ActChgPwd); - /***** Start table *****/ + /***** Start frame *****/ Lay_StartRoundFrameTable10 (NULL,2,Txt_Password); /* Current password */ @@ -704,13 +714,11 @@ void Pwd_ShowFormChgPwd (void) Pwd_PutFormToGetNewPasswordTwice (); /***** Send button and end form *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutConfirmButton (IHaveAPasswordInDB ? Txt_Change_password : - Txt_Set_password); - fprintf (Gbl.F.Out,"" - ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON, + IHaveAPasswordInDB ? Txt_Change_password : + Txt_Set_password); + + /***** End form *****/ Act_FormEnd (); } diff --git a/swad_photo.c b/swad_photo.c index 68dc6fad..4818c79b 100644 --- a/swad_photo.c +++ b/swad_photo.c @@ -291,19 +291,14 @@ void Pho_ReqPhoto (const struct UsrData *UsrDat,bool PhotoExists,const char *Pho "" "" - "" - "" - "", + "", The_ClassFormul[Gbl.Prefs.Theme], Txt_File_with_the_photo, Fil_NAME_OF_PARAM_FILENAME_ORG, UsrDat->UsrCod); - Lay_PutCreateButton (Txt_Upload_photo); - fprintf (Gbl.F.Out,"" - ""); /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Upload_photo); /***** End form *****/ Act_FormEnd (); @@ -1922,7 +1917,7 @@ static void Pho_ShowOrPrintClassPhotoDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrin DB_FreeMySQLResult (&mysql_res); /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -2040,7 +2035,7 @@ static void Pho_ShowOrPrintListDegrees (Pho_AvgPhotoSeeOrPrint_t SeeOrPrint) /***** Photos end *****/ if (SeeOrPrint == Pho_DEGREES_SEE) - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); else fprintf (Gbl.F.Out,""); } diff --git a/swad_place.c b/swad_place.c index 979e0e39..95925209 100644 --- a/swad_place.c +++ b/swad_place.c @@ -171,7 +171,7 @@ void Plc_SeePlaces (void) Ctr_GetNumCtrsTotal () - NumCtrsWithPlc); /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free list of places *****/ Plc_FreeListPlaces (); @@ -480,7 +480,7 @@ static void Plc_ListPlacesForEdition (void) Plc->NumCtrs); } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -714,17 +714,10 @@ static void Plc_PutFormToCreatePlace (void) "", Plc_MAX_LENGTH_PLACE_FULL_NAME,Plc->FullName); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_place); - fprintf (Gbl.F.Out,"" - ""); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_place); - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); - - /***** End of formn *****/ + /***** End formn *****/ Act_FormEnd (); } diff --git a/swad_plugin.c b/swad_plugin.c index 35e16938..bd59cb5d 100644 --- a/swad_plugin.c +++ b/swad_plugin.c @@ -138,7 +138,7 @@ void Plg_ListPlugins (void) } /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Free list of plugins *****/ Plg_FreeListPlugins (); @@ -460,7 +460,7 @@ static void Plg_ListPluginsForEdition (void) ""); } - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -908,17 +908,10 @@ static void Plg_PutFormToCreatePlugin (void) "", Cns_MAX_LENGTH_IP,Plg->IP); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_PutCreateButton (Txt_Create_plugin); - fprintf (Gbl.F.Out,"" - ""); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_plugin); - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); - - /***** End of form *****/ + /***** End form *****/ Act_FormEnd (); } diff --git a/swad_preference.c b/swad_preference.c index 9924e34a..c45cf158 100644 --- a/swad_preference.c +++ b/swad_preference.c @@ -74,7 +74,7 @@ void Pre_EditPrefs (void) Pre_PutSelectorToSelectLanguage (); fprintf (Gbl.F.Out,"" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Layout, theme, icon set, menu & side columns *****/ fprintf (Gbl.F.Out,"" @@ -364,7 +364,7 @@ static void Pre_PutIconsToSelectSideCols (void) fprintf (Gbl.F.Out,""); } fprintf (Gbl.F.Out,""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ diff --git a/swad_profile.c b/swad_profile.c index 80ca3644..fd7fbbe2 100644 --- a/swad_profile.c +++ b/swad_profile.c @@ -139,31 +139,32 @@ static void Prf_RequestUserProfileWithDefaultNickname (const char *DefaultNickna extern const char *Txt_Nickname; extern const char *Txt_Continue; + /***** Start form *****/ + Act_FormStart (ActSeePubPrf); + /***** Start frame *****/ Lay_StartRoundFrameTable10 (NULL,2,Txt_View_public_profile); - fprintf (Gbl.F.Out,"" - "" + "" + "", The_ClassFormul[Gbl.Prefs.Theme], Txt_Nickname, Nck_MAX_BYTES_NICKNAME_WITH_ARROBA, DefaultNickname); - /***** Send button*****/ - Lay_PutConfirmButton (Txt_Continue); - Act_FormEnd (); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Continue); - /***** End frame *****/ - fprintf (Gbl.F.Out,"" - ""); - Lay_EndRoundFrameTable10 (); + /***** End form *****/ + Act_FormEnd (); } /*****************************************************************************/ diff --git a/swad_record.c b/swad_record.c index 9bd7dba5..2cf383ab 100644 --- a/swad_record.c +++ b/swad_record.c @@ -99,7 +99,7 @@ void Rec_ReqEditRecordFields (void) { Lay_StartRoundFrameTable10 (NULL,2,Txt_Record_fields); Rec_ListFieldsRecordsForEdition (); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } else // No fields of records found for current course in the database { @@ -320,17 +320,10 @@ void Rec_ShowFormCreateRecordField (void) "" ""); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - "" - ""); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_record_field); - /***** End of frame *****/ - Lay_EndRoundFrameTable10 (); - - /***** End of form *****/ + /***** End form *****/ Act_FormEnd (); } @@ -1178,7 +1171,7 @@ static void Rec_ShowRecordOneTchCrs (void) TT_ShowTimeTable (TT_TUTOR_TIMETABLE,Gbl.Usrs.Other.UsrDat.UsrCod); fprintf (Gbl.F.Out,"" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); fprintf (Gbl.F.Out,""); } @@ -1274,7 +1267,7 @@ void Rec_ListRecordsTchsCrs (void) TT_ShowTimeTable (TT_TUTOR_TIMETABLE,UsrDat.UsrCod); fprintf (Gbl.F.Out,"" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } fprintf (Gbl.F.Out,""); @@ -1610,19 +1603,14 @@ void Rec_ShowCrsRecord (Rec_RecordViewType_t TypeOfView,struct UsrData *UsrDat) DB_FreeMySQLResult (&mysql_res); } - /***** Button to save changes *****/ + /***** Button to save changes and end frame *****/ if (DataForm) { - fprintf (Gbl.F.Out,"" - "" - ""); } - - /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + else + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -3075,7 +3063,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView, } /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -3504,7 +3492,7 @@ void Rec_ShowFormMyInsCtrDpt (void) } /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ diff --git a/swad_search.c b/swad_search.c index 7b4c340e..ae5aff6c 100644 --- a/swad_search.c +++ b/swad_search.c @@ -269,15 +269,13 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Sco /***** String to find *****/ Sch_PutFormToSearch (Gbl.Prefs.IconsURL); - - /***** Send button *****/ - fprintf (Gbl.F.Out,"
"); - Lay_PutConfirmButton (Txt_Search); - - /***** End form *****/ fprintf (Gbl.F.Out,"" ""); - Lay_EndRoundFrameTable10 (); + + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Search); + + /***** End form *****/ Act_FormEnd (); fprintf (Gbl.F.Out,""); } diff --git a/swad_statistic.c b/swad_statistic.c index 48a2926c..5da65496 100644 --- a/swad_statistic.c +++ b/swad_statistic.c @@ -444,7 +444,7 @@ void Sta_AskSeeCrsAccesses (void) Usr_ListUsersToSelect (Rol_STUDENT); /* End the table */ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); fprintf (Gbl.F.Out,"" ""); @@ -1414,7 +1414,7 @@ static bool Sta_SeeAccesses (void) } /* End of frame */ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /***** Free structure that stores the query result *****/ @@ -3793,7 +3793,7 @@ static void Sta_GetAndShowUsersStats (void) Usr_GetAndShowNumUsrsInPlatform (Rol_TEACHER); Usr_GetAndShowNumUsrsInPlatform (Rol__GUEST_); // Users not beloging to any course - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -3868,7 +3868,7 @@ static void Sta_GetAndShowUsersRanking (void) fprintf (Gbl.F.Out,"" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -3887,7 +3887,7 @@ static void Sta_GetAndShowHierarchyStats (void) Sta_GetAndShowNumCtrsInSWAD (); Sta_GetAndShowNumDegsInSWAD (); Sta_GetAndShowNumCrssInSWAD (); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -4558,7 +4558,7 @@ static void Sta_GetAndShowInssOrderedByNumCtrs (void) } Sta_GetAndShowInss (Query,Txt_Centres); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -4613,7 +4613,7 @@ static void Sta_GetAndShowInssOrderedByNumDegs (void) } Sta_GetAndShowInss (Query,Txt_Degrees); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -4671,7 +4671,7 @@ static void Sta_GetAndShowInssOrderedByNumCrss (void) } Sta_GetAndShowInss (Query,Txt_Courses); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -4732,7 +4732,7 @@ static void Sta_GetAndShowInssOrderedByNumUsrsInCrss (void) } Sta_GetAndShowInss (Query,Txt_Users); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -4786,7 +4786,7 @@ static void Sta_GetAndShowInssOrderedByNumUsrsWhoClaimToBelongToThem (void) } Sta_GetAndShowInss (Query,Txt_Users); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -5028,7 +5028,7 @@ static void Sta_GetAndShowFileBrowsersStats (void) Sta_WriteRowStatsFileBrowsers (Brw_ADMI_BRIEF_USR,Txt_Virtual_pendrives); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -5890,7 +5890,7 @@ static void Sta_GetAndShowOERsStats (void) } /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -6077,7 +6077,7 @@ static void Sta_GetAndShowAssignmentsStats (void) NumNotif); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -6246,7 +6246,7 @@ static void Sta_GetAndShowTestsStats (void) StyleTableCell,Stats.AvgScorePerQuestion); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -6575,7 +6575,7 @@ static void Sta_GetAndShowNumUsrsPerNotifyEvent (void) StyleTableCell,NumEventsTotal, StyleTableCell,NumMailsTotal); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -6663,7 +6663,7 @@ static void Sta_GetAndShowNoticesStats (void) NumTotalNotifications); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -6765,7 +6765,7 @@ static void Sta_GetAndShowMsgsStats (void) NumMsgsReceivedAndNotified); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -6907,7 +6907,7 @@ static void Sta_GetAndShowForumStats (void) Sta_WriteForumTotalStats (&StatsForum); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -7211,7 +7211,7 @@ static void Sta_GetAndShowSurveysStats (void) NumNotif); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -7232,7 +7232,7 @@ static void Sta_GetAndShowNumUsrsPerPrivacy (void) /***** Privacy for public profile *****/ Sta_GetAndShowNumUsrsPerPrivacyForAnObject (Txt_Public_profile,"ProfileVisibility"); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } @@ -7505,7 +7505,7 @@ static void Sta_GetAndShowNumUsrsPerLanguage (void) (float) NumUsrsTotal : 0); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -7637,7 +7637,7 @@ static void Sta_GetAndShowNumUsrsPerLayout (void) (float) NumUsrsTotal : 0); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -7770,7 +7770,7 @@ static void Sta_GetAndShowNumUsrsPerTheme (void) (float) NumUsrsTotal : 0); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -7906,7 +7906,7 @@ static void Sta_GetAndShowNumUsrsPerIconSet (void) (float) NumUsrsTotal : 0); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -8038,7 +8038,7 @@ static void Sta_GetAndShowNumUsrsPerMenu (void) (float) NumUsrsTotal : 0); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -8170,7 +8170,7 @@ static void Sta_GetAndShowNumUsrsPerSideColumns (void) (float) NumUsrsTotal : 0); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ diff --git a/swad_survey.c b/swad_survey.c index 8b543c87..135fd7fc 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -248,7 +248,7 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst) Svy_ShowOneSurvey (Gbl.Svys.LstSvyCods[NumSvy-1],SvyQst,false); /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); /***** Write again links to pages *****/ if (Pagination.MoreThanOnePage) @@ -312,7 +312,7 @@ void Svy_SeeOneSurvey (void) /***** Show survey *****/ Lay_StartRoundFrameTable10 (NULL,2,NULL); Svy_ShowOneSurvey (Svy.SvyCod,&SvyQst,true); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -1671,18 +1671,11 @@ void Svy_RequestCreatOrEditSvy (void) /***** Groups *****/ Svy_ShowLstGrpsToEditSurvey (Svy.SvyCod); - /***** Button to create/modify survey *****/ - fprintf (Gbl.F.Out,"" - "" - ""); - - /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Save); /***** End form *****/ Act_FormEnd (); @@ -1778,7 +1771,7 @@ static void Svy_ShowLstGrpsToEditSurvey (long SvyCod) Grp_ListGrpsToEditAsgAttOrSvy (&Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp],SvyCod,Grp_SURVEY); /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); fprintf (Gbl.F.Out,"" ""); } @@ -2354,7 +2347,7 @@ void Svy_RequestEditQuestion (void) /***** Show current survey *****/ Lay_StartRoundFrameTable10 (NULL,2,NULL); Svy_ShowOneSurvey (SvyCod,&SvyQst,true); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -2513,18 +2506,11 @@ static void Svy_ShowFormEditOneQst (long SvyCod,struct SurveyQuestion *SvyQst,ch "" ""); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - "" - ""); - - /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_question); /***** End form *****/ Act_FormEnd (); @@ -2856,7 +2842,7 @@ void Svy_ReceiveQst (void) /***** Show current survey *****/ Lay_StartRoundFrameTable10 (NULL,2,NULL); Svy_ShowOneSurvey (SvyCod,&SvyQst,true); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -3103,7 +3089,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ } /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); if (FormAnswerSurvey) /***** End form *****/ @@ -3318,7 +3304,7 @@ void Svy_RemoveQst (void) /***** Show current survey *****/ Lay_StartRoundFrameTable10 (NULL,2,NULL); Svy_ShowOneSurvey (SvyCod,&SvyQst,true); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -3352,7 +3338,7 @@ void Svy_ReceiveSurveyAnswers (void) /***** Show current survey *****/ Lay_StartRoundFrameTable10 (NULL,2,NULL); Svy_ShowOneSurvey (Svy.SvyCod,&SvyQst,true); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ diff --git a/swad_syllabus.c b/swad_syllabus.c index f9e7881a..317cde3e 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -213,7 +213,7 @@ void Syl_EditSyllabus (void) fprintf (Gbl.F.Out,"
"); /***** Form to request user's @nickname *****/ - Act_FormStart (ActSeePubPrf); - fprintf (Gbl.F.Out,"
" + fprintf (Gbl.F.Out,"
" + "
" "%s: " "" - "
", + "" + "
"); - Lay_PutCreateButton (Txt_Create_record_field); - fprintf (Gbl.F.Out,"
"); - Lay_PutConfirmButton (Txt_Save); + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Save); Act_FormEnd (); - fprintf (Gbl.F.Out,"
"); + /***** Button to create/modify survey and end frame *****/ if (ItsANewSurvey) - Lay_PutCreateButton (Txt_Create_survey); + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_survey); else - Lay_PutConfirmButton (Txt_Save); - fprintf (Gbl.F.Out,"
"); + /***** Send button and end frame *****/ if (SvyQst->QstCod > 0) // If the question already has assigned a code - Lay_PutConfirmButton (Txt_Save); + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Save); else - Lay_PutCreateButton (Txt_Create_question); - fprintf (Gbl.F.Out,"
" "" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); if (!Gbl.CurrentCrs.Syllabus.EditionIsActive) fprintf (Gbl.F.Out,"
"); } @@ -1700,10 +1700,10 @@ static void Tst_ShowFormConfigTst (void) fprintf (Gbl.F.Out,"" ""); + /***** Send button and end frame *****/ + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Save); + /***** End form *****/ - fprintf (Gbl.F.Out,""); - Lay_EndRoundFrameTable10 (); - Lay_PutConfirmButton (Txt_Save); Act_FormEnd (); } @@ -2045,7 +2045,7 @@ static void Tst_ShowFormAnswerTypes (void) } /***** End of table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -2652,7 +2652,7 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m } /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -4511,18 +4511,11 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) "" ""); - /***** Send button *****/ - fprintf (Gbl.F.Out,"" - ""); + /***** Send button and end frame *****/ if (Gbl.Test.QstCod > 0) // The question already has assigned a code - Lay_PutConfirmButton (Txt_Save); + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Save); else - Lay_PutCreateButton (Txt_Create_question); - fprintf (Gbl.F.Out,"" - ""); - - /***** End table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_CREATE_BUTTON,Txt_Create_question); /***** End form *****/ Act_FormEnd (); @@ -5954,6 +5947,7 @@ static unsigned Tst_GetNumCoursesWithPluggableTstQuestions (Sco_Scope_t Scope,Ts void Tst_SelUsrsToSeeUsrsTstExams (void) { + extern const char *Txt_Users; extern const char *Txt_See_exams; /***** Get and update type of list, number of columns in class photo @@ -5985,10 +5979,10 @@ void Tst_SelUsrsToSeeUsrsTstExams (void) ""); /***** Put list of users to select some of them *****/ - Lay_StartRoundFrameTable10 (NULL,0,NULL); + Lay_StartRoundFrameTable10 (NULL,0,Txt_Users); Usr_ListUsersToSelect (Rol_TEACHER); Usr_ListUsersToSelect (Rol_STUDENT); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); fprintf (Gbl.F.Out,"" ""); @@ -6111,7 +6105,7 @@ void Tst_ShowUsrsTestResults (void) } /***** End of the table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } else // If no users are selected... { @@ -6198,7 +6192,7 @@ void Tst_ShowMyTestResults (void) Tst_ShowResultsOfTestExams (&Gbl.Usrs.Me.UsrDat); /***** End of the table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ diff --git a/swad_test_import.c b/swad_test_import.c index 19978fed..617ee0c5 100644 --- a/swad_test_import.c +++ b/swad_test_import.c @@ -985,7 +985,7 @@ static void TsI_WriteHeadingListImportedQst (void) static void TsI_WriteEndingListImportedQst (void) { /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ diff --git a/swad_text.c b/swad_text.c index a4a891f7..cb503864 100644 --- a/swad_text.c +++ b/swad_text.c @@ -15499,6 +15499,27 @@ const char *Txt_List_of_nicks_emails_or_IDs = "Lista de @alcunhas, e-mails ou nºs. identif."; #endif +const char *Txt_List_type = +#if L==0 + "Tipus de llista"; +#elif L==1 + "Listentyp"; +#elif L==2 + "List type"; +#elif L==3 + "Tipo de lista"; +#elif L==4 + "Type de liste"; +#elif L==5 + "Tipo de lista"; // Okoteve traducción +#elif L==6 + "Tipo di lista"; +#elif L==7 + "Typ listy"; +#elif L==8 + "Tipo de lista"; +#endif + const char *Txt_Links = #if L==0 "Enllaços"; diff --git a/swad_theme.c b/swad_theme.c index cad0fc76..525a4e17 100644 --- a/swad_theme.c +++ b/swad_theme.c @@ -257,7 +257,7 @@ void The_PutIconsToSelectTheme (void) fprintf (Gbl.F.Out,""); } fprintf (Gbl.F.Out,""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ diff --git a/swad_timetable.c b/swad_timetable.c index 13c76ba6..3c85452e 100644 --- a/swad_timetable.c +++ b/swad_timetable.c @@ -297,7 +297,7 @@ void TT_ShowClassTimeTable (void) ""); /***** End frame *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -324,7 +324,7 @@ void TT_EditCrsTimeTable (void) ""); /***** End of table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -348,7 +348,7 @@ void TT_ShowMyTutTimeTable (void) TT_ShowTimeTable (TT_TUTOR_TIMETABLE,Gbl.Usrs.Me.UsrDat.UsrCod); fprintf (Gbl.F.Out,"" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ diff --git a/swad_user.c b/swad_user.c index 5d4a7fe2..d805192d 100644 --- a/swad_user.c +++ b/swad_user.c @@ -754,6 +754,7 @@ unsigned Usr_GetNumUsrsInCrssOfAUsr (long UsrCod,Rol_Role_t UsrRole, Rol_Role_t OthersRole) { char Query[256]; + unsigned NumUsrs; // This query can be made in a unique, but slower, query // The temporary table achieves speedup from ~2s to few ms @@ -778,12 +779,14 @@ unsigned Usr_GetNumUsrsInCrssOfAUsr (long UsrCod,Rol_Role_t UsrRole, " WHERE crs_usr.CrsCod=my_courses_tmp.CrsCod" " AND crs_usr.Role='%u'", (unsigned) OthersRole); - return (unsigned) DB_QueryCOUNT (Query,"can not get the number of users"); + NumUsrs = (unsigned) DB_QueryCOUNT (Query,"can not get the number of users"); /***** Remove temporary table *****/ sprintf (Query,"DROP TABLE IF EXISTS my_courses_tmp"); if (mysql_query (&Gbl.mysql,Query)) DB_ExitOnMySQLError ("can not remove temporary tables"); + + return NumUsrs; } /*****************************************************************************/ @@ -1417,7 +1420,7 @@ void Usr_WriteFormLogin (void) "" "", Txt_Log_in); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); Act_FormEnd (); fprintf (Gbl.F.Out,"
"); @@ -4715,8 +4718,10 @@ void Usr_FreeListOtherRecipients (void) void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction) { + extern const char *Txt_List_type; + /***** Start table *****/ - Lay_StartRoundFrameTable10 (NULL,8,"Tipo de lista"); // Need translation!!! + Lay_StartRoundFrameTable10 (NULL,8,Txt_List_type); /***** Select USR_CLASS_ROOM *****/ fprintf (Gbl.F.Out,"" @@ -4754,7 +4759,7 @@ void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction) ""); /***** End of table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /*****************************************************************************/ @@ -5805,7 +5810,7 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,const char *UsrQuery) Usr_NUM_MAIN_FIELDS_DATA_USR-3); Lay_StartRoundFrameTable10 (NULL,2,NULL); Crs_GetAndWriteCrssOfAUsr (UsrDat.UsrCod,Role); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); fprintf (Gbl.F.Out,"" ""); } @@ -5816,7 +5821,7 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,const char *UsrQuery) Usr_UsrDataDestructor (&UsrDat); /***** Table end *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } /***** Free memory for teachers list *****/ @@ -5936,7 +5941,7 @@ void Usr_ListDataAdms (void) Usr_UsrDataDestructor (&UsrDat); /***** End of table *****/ - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } else // Gbl.Usrs.LstAdms.NumUsrs == 0 Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_DEG_ADM]); @@ -6285,6 +6290,7 @@ void Usr_SeeGuests (void) extern const char *Txt_Scope; extern const char *Txt_Print; extern const char *Txt_Show_all_data; + extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; extern const char *Txt_Show_records; /***** Get and update type of list, @@ -6347,14 +6353,12 @@ void Usr_SeeGuests (void) fprintf (Gbl.F.Out,"
"); /***** Draw a class photo with students of the course *****/ - fprintf (Gbl.F.Out,"
"); - /* Start form */ Act_FormStart (ActSeeRecSevInv); Grp_PutParamsCodGrps (); /* Header */ - Lay_StartRoundFrameTable10 (NULL,0,NULL); + Lay_StartRoundFrameTable10 (NULL,0,Txt_ROLES_PLURAL_Abc[Rol__GUEST_][Usr_SEX_UNKNOWN]); if (Gbl.Usrs.Me.ListType == Usr_CLASS_PHOTO) Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,false,true, @@ -6379,12 +6383,11 @@ void Usr_SeeGuests (void) break; } - Lay_EndRoundFrameTable10 (); + /* Send button and end frame */ + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Show_records); - /* Send button */ - Lay_PutConfirmButton (Txt_Show_records); + /* End form */ Act_FormEnd (); - fprintf (Gbl.F.Out,"
"); } } else @@ -6424,6 +6427,7 @@ void Usr_SeeStudents (void) extern const char *Txt_Scope; extern const char *Txt_Print; extern const char *Txt_Show_all_data; + extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; extern const char *Txt_Show_records; bool ICanViewRecords; @@ -6515,8 +6519,6 @@ void Usr_SeeStudents (void) } /***** Draw a class photo with students of the course *****/ - fprintf (Gbl.F.Out,"
"); - /* Start form */ if (ICanViewRecords) { @@ -6525,7 +6527,7 @@ void Usr_SeeStudents (void) } /* Header */ - Lay_StartRoundFrameTable10 (NULL,0,NULL); + Lay_StartRoundFrameTable10 (NULL,0,Txt_ROLES_PLURAL_Abc[Rol_STUDENT][Usr_SEX_UNKNOWN]); if (Gbl.Usrs.Me.ListType == Usr_CLASS_PHOTO) Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,false,true, @@ -6557,16 +6559,14 @@ void Usr_SeeStudents (void) break; } - Lay_EndRoundFrameTable10 (); - - /* Send button */ + /* Send button and end frame */ if (ICanViewRecords) { - Lay_PutConfirmButton (Txt_Show_records); + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Show_records); Act_FormEnd (); } - - fprintf (Gbl.F.Out,"
"); + else + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } } else @@ -6589,6 +6589,7 @@ void Usr_SeeTeachers (void) extern const char *Txt_Scope; extern const char *Txt_Print; extern const char *Txt_Show_all_data; + extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; extern const char *Txt_Show_records; extern const char *Txt_No_users_found[Rol_NUM_ROLES]; bool ICanViewRecords; @@ -6660,7 +6661,7 @@ void Usr_SeeTeachers (void) Act_FormStart (ActSeeRecSevTch); /* Header */ - Lay_StartRoundFrameTable10 (NULL,0,NULL); + Lay_StartRoundFrameTable10 (NULL,0,Txt_ROLES_PLURAL_Abc[Rol_TEACHER][Usr_SEX_UNKNOWN]); if (Gbl.Usrs.Me.ListType == Usr_CLASS_PHOTO) Lay_WriteHeaderClassPhoto (Gbl.Usrs.ClassPhoto.Cols,false,true, @@ -6692,14 +6693,14 @@ void Usr_SeeTeachers (void) break; } - Lay_EndRoundFrameTable10 (); - + /* Send button and end frame */ if (ICanViewRecords) { - /* Send button */ - Lay_PutConfirmButton (Txt_Show_records); + Lay_EndRoundFrameTable10 (Lay_CONFIRM_BUTTON,Txt_Show_records); Act_FormEnd (); } + else + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); fprintf (Gbl.F.Out,""); } @@ -6757,7 +6758,7 @@ void Usr_SeeGstClassPhotoPrn (void) -1L, -1L,-1L); Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,Rol__GUEST_); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } else Usr_ShowWarningNoUsersFound (Rol__GUEST_); @@ -6803,7 +6804,7 @@ void Usr_SeeStdClassPhotoPrn (void) Gbl.Scope.Current == Sco_SCOPE_CRS ? Gbl.CurrentCrs.Crs.CrsCod : -1L); Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,Rol_STUDENT); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } else Usr_ShowWarningNoUsersFound (Rol_STUDENT); @@ -6857,7 +6858,7 @@ void Usr_SeeTchClassPhotoPrn (void) Gbl.Scope.Current == Sco_SCOPE_CRS ? Gbl.CurrentCrs.Crs.CrsCod : -1L); Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,Rol_TEACHER); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); } else Lay_ShowAlert (Lay_INFO,Txt_No_users_found[Rol_TEACHER]); diff --git a/swad_zip.c b/swad_zip.c index b53f41c9..2f8c37b8 100644 --- a/swad_zip.c +++ b/swad_zip.c @@ -606,5 +606,5 @@ static void ZIP_ShowLinkToDownloadZIP (const char *FileName,const char *URL, fprintf (Gbl.F.Out,"" "" ""); - Lay_EndRoundFrameTable10 (); + Lay_EndRoundFrameTable10 (Lay_NO_BUTTON,NULL); }