From 213f51d576821c4d491225c952197ffae243344c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sun, 26 Mar 2017 14:57:47 +0200 Subject: [PATCH] Version 16.167.16 --- swad_centre.c | 32 +++++++++++++++++++++++--------- swad_changelog.h | 5 ++++- swad_place.c | 14 ++++++++++++++ swad_place.h | 1 + 4 files changed, 42 insertions(+), 10 deletions(-) diff --git a/swad_centre.c b/swad_centre.c index 5affc3dd..60a3d5f8 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -806,6 +806,9 @@ static void Ctr_PutIconsListCentres (void) if (Ctr_CheckIfICanCreateCentres ()) Ctr_PutIconToEditCentres (); + /***** Put icon to view places *****/ + Plc_PutIconToViewPlaces (); + /***** Put icon to show a figure *****/ Gbl.Stat.FigureType = Sta_HIERARCHY; Sta_PutIconToShowFigure (); @@ -1390,7 +1393,8 @@ static void Ctr_ListCentresForEdition (void) /***** Write heading *****/ sprintf (Gbl.Title,Txt_Centres_of_INSTITUTION_X, Gbl.CurrentIns.Ins.FullName); - Lay_StartRoundFrameTable (NULL,Gbl.Title,NULL,Hlp_INSTITUTION_Centres,2); + Lay_StartRoundFrameTable (NULL,Gbl.Title,Plc_PutIconToViewPlaces, + Hlp_INSTITUTION_Centres,2); Ctr_PutHeadCentresForEdition (); /***** Write all the centres *****/ @@ -2406,6 +2410,12 @@ static void Ctr_PutFormToCreateCentre (void) Ctr = &Gbl.Ctrs.EditingCtr; + /***** Start frame *****/ + sprintf (Gbl.Title,Txt_New_centre_of_INSTITUTION_X, + Gbl.CurrentIns.Ins.ShrtName); + Lay_StartRoundFrame (NULL,Gbl.Title,Plc_PutIconToViewPlaces, + Hlp_INSTITUTION_Centres); + /***** Start form *****/ if (Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM) Act_FormStart (ActNewCtr); @@ -2414,12 +2424,10 @@ static void Ctr_PutFormToCreateCentre (void) else Lay_ShowErrorAndExit ("You can not edit centres."); - /***** Start of frame *****/ - sprintf (Gbl.Title,Txt_New_centre_of_INSTITUTION_X, - Gbl.CurrentIns.Ins.ShrtName); - Lay_StartRoundFrameTable (NULL,Gbl.Title,NULL,Hlp_INSTITUTION_Centres,2); + /***** Start table *****/ + fprintf (Gbl.F.Out,""); - /***** Write heading *****/ + /***** Table head *****/ Ctr_PutHeadCentresForEdition (); /***** Put disabled icon to remove centre *****/ @@ -2510,11 +2518,17 @@ static void Ctr_PutFormToCreateCentre (void) "" ""); - /***** Send button and end frame *****/ - Lay_EndRoundFrameTableWithButton (Lay_CREATE_BUTTON,Txt_Create_centre); + /***** End table *****/ + fprintf (Gbl.F.Out,"
"); - /***** End of form *****/ + /***** Button to send form *****/ + Lay_PutCreateButton (Txt_Create_centre); + + /***** End form *****/ Act_FormEnd (); + + /***** End frame *****/ + Lay_EndRoundFrame (); } /*****************************************************************************/ diff --git a/swad_changelog.h b/swad_changelog.h index 28d99fb0..6240c88e 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -205,17 +205,20 @@ // TODO: Comprobar cabecera de una orla cuando el ámbito actual es un centro // TODO: Include type of degree in form of degree configuration +// TODO: Cuando un admin. pulsa en "Inscribir profesor/a" y el usuario es invitado, debería salir en el rol por defecto "profesor" y no "estudiante" + /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.167.15 (2017-03-26)" +#define Log_PLATFORM_VERSION "SWAD 16.167.16 (2017-03-26)" #define CSS_FILE "swad16.166.css" #define JS_FILE "swad16.144.js" // Number of lines (includes comments but not blank lines) has been got with the following command: // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1 /* + Version 16.167.16:Mar 26, 2017 Link to view places in centres. (217718 lines) Version 16.167.15:Mar 26, 2017 Code refactoring in enrollment. (217694 lines) Version 16.167.14:Mar 26, 2017 Code refactoring in follow/unfollow. (217691 lines) Version 16.167.13:Mar 26, 2017 Code refactoring in uploading of photos. (217686 lines) diff --git a/swad_place.c b/swad_place.c index 39c99813..732c8624 100644 --- a/swad_place.c +++ b/swad_place.c @@ -71,6 +71,20 @@ static void Plc_PutFormToCreatePlace (void); static void Plc_PutHeadPlaces (void); static void Plc_CreatePlace (struct Place *Plc); +/*****************************************************************************/ +/********************** Put link (form) to view places ***********************/ +/*****************************************************************************/ + +void Plc_PutIconToViewPlaces (void) + { + extern const char *Txt_Places; + + Lay_PutContextualLink (ActSeePlc,NULL, + "mapmarker64x64.png", + Txt_Places,NULL, + NULL); + } + /*****************************************************************************/ /*************************** List all the places *****************************/ /*****************************************************************************/ diff --git a/swad_place.h b/swad_place.h index 8c0934df..1f73083b 100644 --- a/swad_place.h +++ b/swad_place.h @@ -58,6 +58,7 @@ typedef enum /***************************** Public prototypes *****************************/ /*****************************************************************************/ +void Plc_PutIconToViewPlaces (void); void Plc_SeePlaces (void); void Plc_EditPlaces (void); void Plc_GetListPlaces (void);