Version 16.232.6

This commit is contained in:
Antonio Cañas Vargas 2017-06-03 17:53:51 +02:00
parent 2240a73769
commit ccc1bc4a83
2 changed files with 26 additions and 7 deletions

View File

@ -62,6 +62,7 @@ extern struct Globals Gbl;
static void Ban_WriteListOfBanners (void);
static void Ban_PutFormToEditBanners (void);
static void Ban_GetListBanners (const char *Query);
static void Ban_PutIconToViewBanners (void);
static void Ban_ListBannersForEdition (void);
static void Ban_PutParamBanCod (long BanCod);
static void Ban_ShowOrHideBanner (bool Hide);
@ -180,10 +181,17 @@ static void Ban_PutFormToEditBanners (void)
void Ban_EditBanners (void)
{
extern const char *Hlp_SYSTEM_Banners_edit;
extern const char *Txt_Banners;
/***** Get list of banners *****/
Ban_GetListBanners ("SELECT BanCod,Hidden,ShortName,FullName,Img,WWW"
" FROM banners ORDER BY ShortName");
/***** Start frame *****/
Lay_StartRoundFrame (NULL,Txt_Banners,Ban_PutIconToViewBanners,
Hlp_SYSTEM_Banners_edit);
/***** Put a form to create a new banner *****/
Ban_PutFormToCreateBanner ();
@ -191,6 +199,9 @@ void Ban_EditBanners (void)
if (Gbl.Banners.Num)
Ban_ListBannersForEdition ();
/***** End frame *****/
Lay_EndRoundFrame ();
/***** Free list of banners *****/
Ban_FreeListBanners ();
}
@ -331,20 +342,28 @@ void Ban_FreeListBanners (void)
}
}
/*****************************************************************************/
/**************** Put contextual icons in edition of banners *****************/
/*****************************************************************************/
static void Ban_PutIconToViewBanners (void)
{
Lay_PutContextualIconToView (ActSeeBan,NULL);
}
/*****************************************************************************/
/*************************** List all the banners ****************************/
/*****************************************************************************/
static void Ban_ListBannersForEdition (void)
{
extern const char *Hlp_SYSTEM_Banners_edit;
extern const char *Txt_Banners;
extern const char *Txt_Show;
extern const char *Txt_Hide;
unsigned NumBan;
struct Banner *Ban;
Lay_StartRoundFrameTable (NULL,Txt_Banners,NULL,Hlp_SYSTEM_Banners_edit,2);
/***** Start table *****/
Lay_StartTableWide (2);
/***** Table head *****/
Ban_PutHeadBanners ();
@ -439,7 +458,8 @@ static void Ban_ListBannersForEdition (void)
"</tr>");
}
Lay_EndRoundFrameTable ();
/***** End table *****/
Lay_EndTable ();
}
/*****************************************************************************/

View File

@ -229,19 +229,18 @@
// TODO: Limit lenght of very big institution name in record card
// TODO: Change edition of banners, integrating box and putting icon to view.
/*****************************************************************************/
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.232.5 (2017-06-03)"
#define Log_PLATFORM_VERSION "SWAD 16.232.6 (2017-06-03)"
#define CSS_FILE "swad16.226.css"
#define JS_FILE "swad16.206.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 16.232.6: Jun 03, 2017 Changed layout of edition of banners. (221123 lines)
Version 16.232.5: Jun 03, 2017 Changed layout of edition of links. (221108 lines)
Version 16.232.4: Jun 01, 2017 Changed alert when session expired. (221092 lines)
Version 16.232.3: Jun 01, 2017 Fixed bug in permission of deletion of forum threads. (221091 lines)