diff --git a/swad_banner.c b/swad_banner.c index 9c0589680..428a44d00 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -147,8 +147,11 @@ void Ban_EditBanners (void) Ban_GetListBanners ("SELECT BanCod,Hidden,ShortName,FullName,Img,WWW" " FROM banners ORDER BY ShortName"); - /***** Help message *****/ - if (!Gbl.Banners.Num) + if (Gbl.Banners.Num) + /***** Put link (form) to view banners *****/ + Lay_PutFormToView (ActSeeBan); + else + /***** Help message *****/ Lay_ShowAlert (Lay_INFO,Txt_There_are_no_banners); /***** Put a form to create a new banner *****/ diff --git a/swad_centre.c b/swad_centre.c index 7e02157d2..086269ef1 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -708,9 +708,6 @@ void Ctr_EditCentres (void) extern const char *Txt_There_is_no_list_of_institutions; extern const char *Txt_You_must_create_at_least_one_institution_before_creating_centres; - /***** Put link (form) to view centres *****/ - Lay_PutFormToView (ActSeeCtr); - /***** Get list of institutions of the current country *****/ Ins_GetListInstitutions (Gbl.CurrentCty.Cty.CtyCod,Ins_GET_MINIMAL_DATA); if (Gbl.Inss.Num) @@ -721,8 +718,11 @@ void Ctr_EditCentres (void) /***** Get list of centres *****/ Ctr_GetListCentres (Gbl.CurrentIns.Ins.InsCod); - /***** Help message *****/ - if (!Gbl.Ctrs.Num) + if (Gbl.Ctrs.Num) + /***** Put link (form) to view centres *****/ + Lay_PutFormToView (ActSeeCtr); + else + /***** Help message *****/ Lay_ShowAlert (Lay_INFO,Txt_No_centres_have_been_created_in_this_institution); /***** Put a form to create a new centre *****/ diff --git a/swad_changelog.h b/swad_changelog.h index 2eaaf76c4..697d6dce6 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -41,7 +41,7 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.74.2 (2015/02/08)" +#define Log_PLATFORM_VERSION "SWAD 14.74.3 (2015/02/08)" // 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 | tail -1 @@ -49,6 +49,13 @@ Mejorar formulario de inscripción de usuarios poniéndole marco blanco Quitar debug en llamada a PRADO + Version 14.74.3: Feb 08, 2015 Button to view banners. + Button to view mail domains. + Button to view institutional links. + Button to view plugins. + Button to view departments. + Button to view holidays. + Button to view places. (178027 lines) Version 14.74.2: Feb 08, 2015 Fixed bug in banners. (177994 lines) Version 14.74.1: Feb 06, 2015 Fixed bug in shared files. (177986 lines) Version 14.74: Feb 05, 2015 Shared files for institution, centre and degree. (177982 lines) diff --git a/swad_country.c b/swad_country.c index b7768ba15..500a3c737 100644 --- a/swad_country.c +++ b/swad_country.c @@ -828,15 +828,15 @@ void Cty_EditCountries (void) { extern const char *Txt_No_countries_have_been_created; - /***** Put link (form) to view countries *****/ - Lay_PutFormToView (ActSeeCty); - /***** Get list of countries *****/ Gbl.Ctys.SelectedOrderType = Cty_ORDER_BY_COUNTRY; Cty_GetListCountries (Cty_GET_EXTRA_DATA); - /***** Help message *****/ - if (!Gbl.Ctys.Num) + if (Gbl.Ctys.Num) + /***** Put link (form) to view countries *****/ + Lay_PutFormToView (ActSeeCty); + else + /***** Help message *****/ Lay_ShowAlert (Lay_INFO,Txt_No_countries_have_been_created); /***** Put a form to create a new country *****/ diff --git a/swad_course.c b/swad_course.c index 42df78b94..bfb0726ad 100644 --- a/swad_course.c +++ b/swad_course.c @@ -1180,11 +1180,11 @@ static void Crs_EditCourses (void) { extern const char *Txt_No_courses_have_been_created_in_this_degree; - /***** Put link (form) to view courses *****/ - Lay_PutFormToView (ActSeeCrs); - - /***** Help message *****/ - if (!Gbl.CurrentDeg.Deg.NumCourses) // There aren't courses + if (Gbl.CurrentDeg.Deg.NumCourses) + /***** Put link (form) to view courses *****/ + Lay_PutFormToView (ActSeeCrs); + else + /***** Help message *****/ Lay_ShowAlert (Lay_INFO,Txt_No_courses_have_been_created_in_this_degree); /***** Put a form to create or request a new course *****/ diff --git a/swad_degree.c b/swad_degree.c index 228a49139..6e3eb2fea 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -1052,11 +1052,11 @@ static void Deg_EditDegreeTypes (void) { extern const char *Txt_There_are_no_types_of_degree; - /***** Put link (form) to view degree types *****/ - Lay_PutFormToView (ActSeeDegTyp); - - /***** Help message *****/ - if (!Gbl.Degs.DegTypes.Num) + if (Gbl.Degs.DegTypes.Num) + /***** Put link (form) to view degree types *****/ + Lay_PutFormToView (ActSeeDegTyp); + else + /***** Help message *****/ Lay_ShowAlert (Lay_INFO,Txt_There_are_no_types_of_degree); /***** Put a form to create a new degree type *****/ diff --git a/swad_department.c b/swad_department.c index a9a5a0e02..b5bb59053 100644 --- a/swad_department.c +++ b/swad_department.c @@ -243,8 +243,11 @@ void Dpt_EditDepartments (void) /***** Get list of departments *****/ Dpt_GetListDepartments (Gbl.CurrentIns.Ins.InsCod); - /***** Help message *****/ - if (!Gbl.Dpts.Num) + if (Gbl.Dpts.Num) + /***** Put link (form) to view departments *****/ + Lay_PutFormToView (ActSeeDpt); + else + /***** Help message *****/ Lay_ShowAlert (Lay_INFO,Txt_There_are_no_departments); /***** Put a form to create a new department *****/ diff --git a/swad_holiday.c b/swad_holiday.c index 033fe676f..cdaeb6bc0 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -220,8 +220,11 @@ void Hld_EditHolidays (void) /***** Get list of holidays *****/ Hld_GetListHolidays (); - /***** Help message *****/ - if (!Gbl.Hlds.Num) + if (Gbl.Hlds.Num) + /***** Put link (form) to view degree types *****/ + Lay_PutFormToView (ActSeeHld); + else + /***** Help message *****/ Lay_ShowAlert (Lay_INFO,Txt_There_are_no_holidays); /***** Put a form to create a new holiday *****/ diff --git a/swad_institution.c b/swad_institution.c index e7ac9fc50..2b5e5976c 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -714,14 +714,14 @@ void Ins_EditInstitutions (void) { extern const char *Txt_No_institutions_have_been_created_in_this_country; - /***** Put link (form) to view institutions *****/ - Lay_PutFormToView (ActSeeIns); - /***** Get list of institutions *****/ Ins_GetListInstitutions (Gbl.CurrentCty.Cty.CtyCod,Ins_GET_EXTRA_DATA); - /***** Help message *****/ - if (!Gbl.Inss.Num) + if (Gbl.Inss.Num) + /***** Put link (form) to view institutions *****/ + Lay_PutFormToView (ActSeeIns); + else + /***** Help message *****/ Lay_ShowAlert (Lay_INFO,Txt_No_institutions_have_been_created_in_this_country); /***** Put a form to create a new institution *****/ diff --git a/swad_link.c b/swad_link.c index f498c891c..610006953 100644 --- a/swad_link.c +++ b/swad_link.c @@ -140,8 +140,11 @@ void Lnk_EditLinks (void) /***** Get list of links *****/ Lnk_GetListLinks (); - /***** Help message *****/ - if (!Gbl.Links.Num) + if (Gbl.Links.Num) + /***** Put link (form) to view links *****/ + Lay_PutFormToView (ActSeeLnk); + else + /***** Help message *****/ Lay_ShowAlert (Lay_INFO,Txt_There_are_no_links); /***** Put a form to create a new link *****/ diff --git a/swad_mail.c b/swad_mail.c index 0d0cc6721..c2c29f604 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -196,8 +196,11 @@ void Mai_EditMailDomains (void) /***** Get list of mail domains *****/ Mai_GetListMailDomainsAllowedForNotif (); - /***** Help message *****/ - if (!Gbl.Mails.Num) + if (Gbl.Mails.Num) + /***** Put link (form) to view mail domains *****/ + Lay_PutFormToView (ActSeeMai); + else + /***** Help message *****/ Lay_ShowAlert (Lay_INFO,Txt_There_are_no_mail_domains); /***** Put a form to create a new mail *****/ diff --git a/swad_place.c b/swad_place.c index dc984e1e3..31d0f4d1d 100644 --- a/swad_place.c +++ b/swad_place.c @@ -222,8 +222,11 @@ void Plc_EditPlaces (void) /***** Get list of places *****/ Plc_GetListPlaces (); - /***** Help message *****/ - if (!Gbl.Plcs.Num) + if (Gbl.Plcs.Num) + /***** Put link (form) to view places *****/ + Lay_PutFormToView (ActSeePlc); + else + /***** Help message *****/ Lay_ShowAlert (Lay_INFO,Txt_There_are_no_places); /***** Put a form to create a new place *****/ diff --git a/swad_plugin.c b/swad_plugin.c index 563c743ff..d7c277c5a 100644 --- a/swad_plugin.c +++ b/swad_plugin.c @@ -172,8 +172,11 @@ void Plg_EditPlugins (void) /***** Get list of plugins *****/ Plg_GetListPlugins (); - /***** Help message *****/ - if (!Gbl.Plugins.Num) + if (Gbl.Plugins.Num) + /***** Put link (form) to view plugins *****/ + Lay_PutFormToView (ActLstPlg); + else + /***** Help message *****/ Lay_ShowAlert (Lay_INFO,Txt_There_are_no_plugins); /***** Put a form to create a new plugin *****/