From 0450682584c3bcaac7b9d279628f7e3fb1637382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 3 Aug 2015 21:53:34 +0200 Subject: [PATCH] Version 14.124 --- swad_changelog.h | 4 +- swad_info.c | 102 ++++++++++++++++++++--------------------------- swad_syllabus.c | 11 +++++ 3 files changed, 57 insertions(+), 60 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index fe40e3e51..4c89951d2 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,13 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.123.8 (2015/08/03)" +#define Log_PLATFORM_VERSION "SWAD 14.124 (2015/08/03)" // 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.124: Aug 03, 2015 Changes in CSS of forms. + New layout to select source of course info. (184799 lines) Version 14.123.8: Aug 03, 2015 Changes in CSS of forms. (184801 lines) Version 14.123.7: Aug 01, 2015 Changes in CSS of forms. (184848 lines) Version 14.123.6: Aug 01, 2015 Changes in CSS of forms. (184874 lines) diff --git a/swad_info.c b/swad_info.c index c521ce72a..6d1fc28ec 100644 --- a/swad_info.c +++ b/swad_info.c @@ -548,7 +548,7 @@ void Inf_WriteMsgYouMustReadInfo (void) /***** Write every information I must read *****/ fprintf (Gbl.F.Out,"" "" - "" - "" - ""); - } - - /* End of table */ - Lay_EndRoundFrameTable (); - /***** Form to choice between alternatives *****/ - /* Start of form and table */ - Act_FormStart (Inf_ActionsSelecInfoSrc[InfoType]); - Lay_StartRoundFrameTable (NULL,0,NULL); - - /* Title */ - fprintf (Gbl.F.Out,"" - "" - "", - Txt_Source_of_information); + /* Start of table */ + Lay_StartRoundFrameTable (NULL,4,Txt_Source_of_information); /* Options */ for (InfoSrc = (Inf_InfoSrc_t) 0; InfoSrc < Inf_NUM_INFO_SOURCES; InfoSrc++) { + /* Select info source */ fprintf (Gbl.F.Out,"" - "" - "", - Gbl.FormId,Txt_INFO_SRC_FULL_TEXT[InfoSrc]); + fprintf (Gbl.F.Out," onclick=\"javascript:document.getElementById('%s').submit();\" />", + Gbl.FormId); + Act_FormEnd (); + fprintf (Gbl.F.Out,""); + + /* Form for this info source */ + fprintf (Gbl.F.Out,"" + ""); } - /* End of table and form */ + /* End of table */ Lay_EndRoundFrameTable (); - Act_FormEnd (); } /*****************************************************************************/ @@ -1060,7 +1044,7 @@ void Inf_FormToSendPage (Inf_InfoSrc_t InfoSrc,Inf_InfoType_t InfoType) "" - "" "" @@ -1095,7 +1079,7 @@ void Inf_FormToSendURL (Inf_InfoSrc_t InfoSrc,Inf_InfoType_t InfoType) "" - "" - "" - "" - "
" + "" "
    "); for (InfoType = (Inf_InfoType_t) 0; InfoType < Inf_NUM_INFO_TYPES; @@ -909,6 +909,7 @@ void Inf_SetInfoSrc (void) void Inf_FormsToSelSendInfo (void) { + extern const char *Txt_View; extern const char *Txt_Source_of_information; extern const char *Txt_INFO_SRC_FULL_TEXT[Inf_NUM_INFO_SOURCES]; extern const char *Txt_INFO_SRC_HELP[Inf_NUM_INFO_SOURCES]; @@ -916,75 +917,58 @@ void Inf_FormsToSelSendInfo (void) Inf_InfoSrc_t InfoSrc,InfoSrcSelected; bool MustBeRead; + /***** Put link to view *****/ + fprintf (Gbl.F.Out,"
    "); + Act_PutContextualLink (Inf_ActionsSeeInfo[InfoType],NULL, + "visible_on",Txt_View); + fprintf (Gbl.F.Out,"
    "); + /***** Get info source from database *****/ Inf_GetInfoSrcFromDB (Gbl.CurrentCrs.Crs.CrsCod,InfoType,&InfoSrcSelected,&MustBeRead); - /***** Forms for the different edition alternatives *****/ - /* Start of table */ - Lay_StartRoundFrameTable (NULL,0,NULL); - - /* Forms */ - for (InfoSrc = (Inf_InfoSrc_t) 1; - InfoSrc < Inf_NUM_INFO_SOURCES; - InfoSrc++) - { - fprintf (Gbl.F.Out,"
" - " 
%s", - Txt_INFO_SRC_FULL_TEXT[InfoSrc]); - if (Txt_INFO_SRC_HELP[InfoSrc]) - fprintf (Gbl.F.Out,"
(%s)", - Txt_INFO_SRC_HELP[InfoSrc]); - Inf_FormsForEditionTypes[InfoSrc] (InfoSrc,InfoType); - fprintf (Gbl.F.Out,"
" - "
" - "%s" - "
" - ""); + Act_FormStart (Inf_ActionsSelecInfoSrc[InfoType]); + fprintf (Gbl.F.Out,"" - "%s" - "
" + "%s
", + Txt_INFO_SRC_FULL_TEXT[InfoSrc]); + if (Txt_INFO_SRC_HELP[InfoSrc]) + fprintf (Gbl.F.Out,"(%s)", + Txt_INFO_SRC_HELP[InfoSrc]); + if (Inf_FormsForEditionTypes[InfoSrc]) + Inf_FormsForEditionTypes[InfoSrc] (InfoSrc,InfoType); + fprintf (Gbl.F.Out,"
" "%s:" "" + "" "" "
" "%s:" "" + "" "" - "" + "" "

"); /***** Convert to respectful HTML and insert links *****/ @@ -1648,7 +1632,7 @@ static void Inf_ShowRichTxtInfo (Inf_InfoType_t InfoType) Lay_WriteHeaderClassPhoto (3,false,false,Gbl.CurrentIns.Ins.InsCod,Gbl.CurrentDeg.Deg.DegCod,Gbl.CurrentCrs.Crs.CrsCod); fprintf (Gbl.F.Out,"

" + "" "
"); /***** Store text into a temporary .md file in HTML output directory *****/ @@ -1763,7 +1747,7 @@ int Inf_WritePlainTextIntoHTMLBuffer (Inf_InfoType_t InfoType,char **HTMLBuffer) /***** Write plain text into text buffer *****/ fprintf (FileHTMLTmp,"
" + "" "

"); /* Convert to respectful HTML and insert links */ @@ -1836,7 +1820,7 @@ void Inf_EditPlainTxtInfo (void) /***** Edition area *****/ fprintf (Gbl.F.Out,"

"); + ""); Lay_HelpPlainEditor (); fprintf (Gbl.F.Out,"