From 8d0291d1441ce1406287d8595678414b5c19be43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Fri, 18 Mar 2016 19:45:36 +0100 Subject: [PATCH] Version 15.150.3 --- swad_changelog.h | 7 ++++--- swad_info.c | 46 +++++++++++++++++++++++++--------------------- swad_text.c | 18 +++++++++--------- 3 files changed, 38 insertions(+), 33 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 6f1bd0b10..b06400c5f 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -125,24 +125,25 @@ // TODO: Fix bug in marks reported by Francisco Ocaña // TODO: When a new user (a guest not registered in any course) creates a new course ==> register him/her automatically as a teacher in the course just created +// TODO: Move info about number of files to bottom of file browsers // TODO: Show tagline at top, near logo // TODO: Show big header h1 when no country specified // TODO: Integrate "Print" link -// TODO: Remove "View" link from course info /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 15.150.2 (2016-03-18)" +#define Log_PLATFORM_VERSION "SWAD 15.150.3 (2016-03-18)" #define CSS_FILE "swad15.150.2.css" #define JS_FILE "swad15.131.3.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1 /* + Version 15.150.3: Mar 18, 2016 Changes in layout of course info. (195956 lines) Version 15.150.2: Mar 18, 2016 Icon to print course configuration integrated in frame. - Changes in layour of frames. (195950 lines) + Changes in layout of frames. (195950 lines) Version 15.150.1: Mar 18, 2016 Icon to view timetable integrated in frame. (195936 lines) Version 15.150: Mar 18, 2016 Icons to edit/print timetable integrated in frame. (195923 lines) Version 15.149.1: Mar 18, 2016 Button Done after internal editor of syllabus. diff --git a/swad_info.c b/swad_info.c index f8e3b3d3b..60000f138 100644 --- a/swad_info.c +++ b/swad_info.c @@ -305,11 +305,13 @@ static void Inf_ShowRichTxtInfo (void); void Inf_ShowInfo (void) { - extern const char *Txt_No_information_available; + extern const char *Txt_INFO_TITLE[Inf_NUM_INFO_TYPES]; + extern const char *Txt_No_information; Inf_InfoSrc_t InfoSrc; bool MustBeRead; bool ICanEdit = (Gbl.Usrs.Me.LoggedRole == Rol_TEACHER || Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM); + bool ShowWarningNoInfo = false; /***** Set info type *****/ Gbl.CurrentCrs.Info.Type = Inf_AsignInfoType (); @@ -347,12 +349,7 @@ void Inf_ShowInfo (void) switch (InfoSrc) { case Inf_INFO_SRC_NONE: - if (Gbl.CurrentCrs.Info.Type != Inf_INTRODUCTION) - Lay_ShowAlert (Lay_INFO,Txt_No_information_available); - - /* Put button to edit info */ - if (ICanEdit) - Inf_PutButtonToEditInfo (); + ShowWarningNoInfo = true; break; case Inf_INFO_SRC_EDITOR: switch (Gbl.CurrentCrs.Info.Type) @@ -367,11 +364,7 @@ void Inf_ShowInfo (void) case Inf_FAQ: case Inf_LINKS: case Inf_ASSESSMENT: - Lay_ShowAlert (Lay_INFO,Txt_No_information_available); - - /* Put button to edit info */ - if (ICanEdit) - Inf_PutButtonToEditInfo (); + ShowWarningNoInfo = true; break; } break; @@ -390,6 +383,17 @@ void Inf_ShowInfo (void) Inf_CheckAndShowURL (); break; } + + if (ShowWarningNoInfo) + { + Lay_StartRoundFrame ("100%",Txt_INFO_TITLE[Gbl.CurrentCrs.Info.Type], + ICanEdit ? Inf_PutIconToEditInfo : + NULL); + Lay_ShowAlert (Lay_INFO,Txt_No_information); + if (ICanEdit) + Inf_PutButtonToEditInfo (); + Lay_EndRoundFrame (); + } } /*****************************************************************************/ @@ -715,7 +719,7 @@ void Inf_RemoveUsrFromCrsInfoRead (long UsrCod,long CrsCod) static void Inf_CheckAndShowPage (void) { - extern const char *Txt_No_information_available; + extern const char *Txt_No_information; const char *FileNameHTML; char PathRelFileHTML[PATH_MAX+1]; char URL[PATH_MAX+1]; @@ -747,7 +751,7 @@ static void Inf_CheckAndShowPage (void) Inf_ShowPage (URL); } else - Lay_ShowAlert (Lay_INFO,Txt_No_information_available); + Lay_ShowAlert (Lay_INFO,Txt_No_information); } } @@ -826,7 +830,7 @@ int Inf_WritePageIntoHTMLBuffer (char **HTMLBuffer) static void Inf_CheckAndShowURL (void) { - extern const char *Txt_No_information_available; + extern const char *Txt_No_information; FILE *FileURL; /***** Check if file with URL exists *****/ @@ -839,10 +843,10 @@ static void Inf_CheckAndShowURL (void) if (Gbl.CurrentCrs.Info.URL[0]) Inf_ShowPage (Gbl.CurrentCrs.Info.URL); else - Lay_ShowAlert (Lay_INFO,Txt_No_information_available); + Lay_ShowAlert (Lay_INFO,Txt_No_information); } else - Lay_ShowAlert (Lay_INFO,Txt_No_information_available); + Lay_ShowAlert (Lay_INFO,Txt_No_information); } /*****************************************************************************/ @@ -1576,7 +1580,7 @@ static bool Inf_CheckIfInfoTxtIsNotEmpty (long CrsCod,Inf_InfoType_t InfoType) static void Inf_ShowPlainTxtInfo (void) { extern const char *Txt_INFO_TITLE[Inf_NUM_INFO_TYPES]; - extern const char *Txt_No_information_available; + extern const char *Txt_No_information; char TxtHTML[Cns_MAX_BYTES_LONG_TEXT+1]; bool ICanEdit = (Gbl.Usrs.Me.LoggedRole == Rol_TEACHER || Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM); @@ -1614,7 +1618,7 @@ static void Inf_ShowPlainTxtInfo (void) Lay_EndRoundFrame (); } else - Lay_ShowAlert (Lay_INFO,Txt_No_information_available); + Lay_ShowAlert (Lay_INFO,Txt_No_information); } /*****************************************************************************/ @@ -1624,7 +1628,7 @@ static void Inf_ShowPlainTxtInfo (void) static void Inf_ShowRichTxtInfo (void) { extern const char *Txt_INFO_TITLE[Inf_NUM_INFO_TYPES]; - extern const char *Txt_No_information_available; + extern const char *Txt_No_information; char TxtHTML[Cns_MAX_BYTES_LONG_TEXT+1]; char TxtMD[Cns_MAX_BYTES_LONG_TEXT+1]; char PathFileMD[PATH_MAX+1]; @@ -1721,7 +1725,7 @@ static void Inf_ShowRichTxtInfo (void) Lay_EndRoundFrame (); } else - Lay_ShowAlert (Lay_INFO,Txt_No_information_available); + Lay_ShowAlert (Lay_INFO,Txt_No_information); } /*****************************************************************************/ diff --git a/swad_text.c b/swad_text.c index 4be5c0fc5..ceaa10090 100644 --- a/swad_text.c +++ b/swad_text.c @@ -23655,25 +23655,25 @@ const char *Txt_No_INDEX = // Short version of "Number" (as an index)... "Nº"; #endif -const char *Txt_No_information_available = +const char *Txt_No_information = #if L==1 - "No hay información disponible."; // Necessita traduccio + "No hi ha informació."; #elif L==2 - "Keine Informationen verfügbar."; + "Keine Informationen."; #elif L==3 - "No information available."; + "No information."; #elif L==4 - "No hay información disponible."; + "No hay información."; #elif L==5 - "Aucune information disponible."; + "Aucune information."; #elif L==6 - "No hay información disponible."; // Okoteve traducción + "No hay información."; // Okoteve traducción #elif L==7 - "Nessuna informazione disponibile."; + "Nessuna informazione."; #elif L==8 "Brak informacji."; #elif L==9 - "Não há informação disponível."; + "Não há informação."; #endif const char *Txt_No_institutions_have_been_created_in_this_country =