mirror of https://github.com/acanas/swad-core.git
Version 18.18
This commit is contained in:
parent
34e01b5b8c
commit
dfed7a5fbc
|
@ -65,9 +65,12 @@ extern struct Globals Gbl;
|
|||
/*****************************************************************************/
|
||||
|
||||
static void Ban_WriteListOfBanners (void);
|
||||
static void Ban_PutFormToEditBanners (void);
|
||||
static void Ban_PutIconsListingBanners (void);
|
||||
static void Ban_PutIconToEditBanners (void);
|
||||
static void Ban_GetListBanners (MYSQL_RES **mysql_res,unsigned long NumRows);
|
||||
static void Ban_PutIconToViewBanners (void);
|
||||
|
||||
static void Ban_PutIconsEditingBanners (void);
|
||||
|
||||
static void Ban_ListBannersForEdition (void);
|
||||
static void Ban_PutParamBanCod (long BanCod);
|
||||
static void Ban_ShowOrHideBanner (bool Hide);
|
||||
|
@ -81,20 +84,6 @@ static void Ban_PutFormToCreateBanner (void);
|
|||
static void Ban_PutHeadBanners (void);
|
||||
static void Ban_CreateBanner (struct Banner *Ban);
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************* Put link to view banners **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Ban_PutLinkToViewBanners (void)
|
||||
{
|
||||
extern const char *Txt_Banners;
|
||||
|
||||
Lay_PutContextualLink (ActSeeBan,NULL,NULL,
|
||||
"picture64x64.gif",
|
||||
Txt_Banners,Txt_Banners,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** List all banners ******************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -108,14 +97,6 @@ void Ban_SeeBanners (void)
|
|||
MYSQL_RES *mysql_res;
|
||||
unsigned long NumRows;
|
||||
|
||||
/***** Put contextual links *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
|
||||
/* Put link to view links */
|
||||
Lnk_PutLinkToViewLinks ();
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
/***** Get list of banners *****/
|
||||
NumRows = DB_QuerySELECT (&mysql_res,"can not get banners",
|
||||
"SELECT BanCod,Hidden,ShortName,FullName,Img,WWW"
|
||||
|
@ -125,7 +106,7 @@ void Ban_SeeBanners (void)
|
|||
Ban_GetListBanners (&mysql_res,NumRows);
|
||||
|
||||
/***** Start box *****/
|
||||
Box_StartBox (NULL,Txt_Banners,Ban_PutFormToEditBanners,
|
||||
Box_StartBox (NULL,Txt_Banners,Ban_PutIconsListingBanners,
|
||||
Hlp_SYSTEM_Banners,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Write all banners *****/
|
||||
|
@ -184,13 +165,26 @@ static void Ban_WriteListOfBanners (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Put a banner (form) to edit banners *******************/
|
||||
/***************** Put contextual icons in list of banners *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Ban_PutFormToEditBanners (void)
|
||||
static void Ban_PutIconsListingBanners (void)
|
||||
{
|
||||
/***** Put icon to view banners *****/
|
||||
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
|
||||
Ico_PutContextualIconToEdit (ActEdiBan,NULL);
|
||||
Ban_PutIconToEditBanners ();
|
||||
|
||||
/***** Put icon to view links *****/
|
||||
Lnk_PutIconToViewLinks ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************* Put an icon to edit banners ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Ban_PutIconToEditBanners (void)
|
||||
{
|
||||
Ico_PutContextualIconToEdit (ActEdiBan,NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -204,14 +198,6 @@ void Ban_EditBanners (void)
|
|||
MYSQL_RES *mysql_res;
|
||||
unsigned long NumRows;
|
||||
|
||||
/***** Put contextual links *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
|
||||
/* Put link to view links */
|
||||
Lnk_PutLinkToViewLinks ();
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
/***** Get list of banners *****/
|
||||
NumRows = DB_QuerySELECT (&mysql_res,"can not get banners",
|
||||
"SELECT BanCod,Hidden,ShortName,FullName,Img,WWW"
|
||||
|
@ -219,7 +205,7 @@ void Ban_EditBanners (void)
|
|||
Ban_GetListBanners (&mysql_res,NumRows);
|
||||
|
||||
/***** Start box *****/
|
||||
Box_StartBox (NULL,Txt_Banners,Ban_PutIconToViewBanners,
|
||||
Box_StartBox (NULL,Txt_Banners,Ban_PutIconsEditingBanners,
|
||||
Hlp_SYSTEM_Banners_edit,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Put a form to create a new banner *****/
|
||||
|
@ -368,9 +354,27 @@ void Ban_FreeListBanners (void)
|
|||
/**************** Put contextual icons in edition of banners *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Ban_PutIconToViewBanners (void)
|
||||
static void Ban_PutIconsEditingBanners (void)
|
||||
{
|
||||
Ico_PutContextualIconToView (ActSeeBan,NULL);
|
||||
/***** Put icon to view banners *****/
|
||||
Ban_PutIconToViewBanners ();
|
||||
|
||||
/***** Put icon to view links *****/
|
||||
Lnk_PutIconToViewLinks ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************* Put icon to view banners **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Ban_PutIconToViewBanners (void)
|
||||
{
|
||||
extern const char *Txt_Banners;
|
||||
|
||||
Lay_PutContextualLink (ActSeeBan,NULL,NULL,
|
||||
"picture64x64.gif",
|
||||
Txt_Banners,NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -56,10 +56,12 @@ struct Banner
|
|||
/***************************** Public prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Ban_PutLinkToViewBanners (void);
|
||||
void Ban_SeeBanners (void);
|
||||
void Ban_EditBanners (void);
|
||||
void Ban_FreeListBanners (void);
|
||||
|
||||
void Ban_PutIconToViewBanners (void);
|
||||
|
||||
void Ban_GetDataOfBannerByCod (struct Banner *Ban);
|
||||
long Ban_GetParamLnkCod (void);
|
||||
void Ban_RemoveBanner (void);
|
||||
|
|
|
@ -348,10 +348,11 @@ En OpenSWAD:
|
|||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.17.8 (2018-11-15)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.18 (2018-11-16)"
|
||||
#define CSS_FILE "swad18.4.css"
|
||||
#define JS_FILE "swad17.17.1.js"
|
||||
/*
|
||||
Version 18.18: Nov 16, 2018 Changes in contextual icons related to links and banners. (237020 lines)
|
||||
Version 18.17.8: Nov 15, 2018 Changes in contextual icons related to countries. (237011 lines)
|
||||
Version 18.17.7: Nov 15, 2018 Changes in contextual icons related to courses. (236994 lines)
|
||||
Version 18.17.6: Nov 15, 2018 Changes in contextual icons related to degrees. (236972 lines)
|
||||
|
|
92
swad_link.c
92
swad_link.c
|
@ -63,10 +63,14 @@ extern struct Globals Gbl;
|
|||
/***************************** Private prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Lnk_PutIconsEditingLinks (void);
|
||||
|
||||
static void Lnk_PutIconsListingLinks (void);
|
||||
static void Lnk_PutIconToEditLinks (void);
|
||||
static void Lnk_WriteListOfLinks (void);
|
||||
|
||||
static void Lnk_PutIconToViewLinks (void);
|
||||
static void Lnk_PutIconsEditingLinks (void);
|
||||
|
||||
static void Lnk_ListLinksForEdition (void);
|
||||
static void Lnk_PutParamLnkCod (long LnkCod);
|
||||
|
||||
|
@ -78,20 +82,6 @@ static void Lnk_PutFormToCreateLink (void);
|
|||
static void Lnk_PutHeadLinks (void);
|
||||
static void Lnk_CreateLink (struct Link *Lnk);
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** Put link to view links ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Lnk_PutLinkToViewLinks (void)
|
||||
{
|
||||
extern const char *Txt_Links;
|
||||
|
||||
Lay_PutContextualLink (ActSeeLnk,NULL,NULL,
|
||||
"link64x64.gif",
|
||||
Txt_Links,Txt_Links,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************************** List all the links ******************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -103,21 +93,11 @@ void Lnk_SeeLinks (void)
|
|||
extern const char *Txt_No_links;
|
||||
extern const char *Txt_New_link;
|
||||
|
||||
/***** Put contextual links *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
|
||||
/* Put link to view banners */
|
||||
Ban_PutLinkToViewBanners ();
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
/***** Get list of links *****/
|
||||
Lnk_GetListLinks ();
|
||||
|
||||
/***** Start box *****/
|
||||
Box_StartBox (NULL,Txt_Links,
|
||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM ? Lnk_PutIconToEditLinks :
|
||||
NULL,
|
||||
Box_StartBox (NULL,Txt_Links,Lnk_PutIconsListingLinks,
|
||||
Hlp_SYSTEM_Links,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Write all links *****/
|
||||
|
@ -141,6 +121,20 @@ void Lnk_SeeLinks (void)
|
|||
Lnk_FreeListLinks ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Put contextual icons in list of links *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Lnk_PutIconsListingLinks (void)
|
||||
{
|
||||
/***** Put icon to edit links *****/
|
||||
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
|
||||
Lnk_PutIconToEditLinks ();
|
||||
|
||||
/***** Put icon to view banners *****/
|
||||
Ban_PutIconToViewBanners ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** Put icon to edit links ***************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -220,19 +214,11 @@ void Lnk_EditLinks (void)
|
|||
extern const char *Hlp_SYSTEM_Links_edit;
|
||||
extern const char *Txt_Links;
|
||||
|
||||
/***** Put contextual links *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||
|
||||
/* Put link to view banners */
|
||||
Ban_PutLinkToViewBanners ();
|
||||
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
/***** Get list of links *****/
|
||||
Lnk_GetListLinks ();
|
||||
|
||||
/***** Start box *****/
|
||||
Box_StartBox (NULL,Txt_Links,Lnk_PutIconToViewLinks,
|
||||
Box_StartBox (NULL,Txt_Links,Lnk_PutIconsEditingLinks,
|
||||
Hlp_SYSTEM_Links_edit,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Put a form to create a new link *****/
|
||||
|
@ -249,6 +235,33 @@ void Lnk_EditLinks (void)
|
|||
Lnk_FreeListLinks ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Put contextual icons to view links *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Lnk_PutIconsEditingLinks (void)
|
||||
{
|
||||
/***** Put icon to view links *****/
|
||||
Lnk_PutIconToViewLinks ();
|
||||
|
||||
/***** Put icon to view banners *****/
|
||||
Ban_PutIconToViewBanners ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** Put icon to view links ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Lnk_PutIconToViewLinks (void)
|
||||
{
|
||||
extern const char *Txt_Links;
|
||||
|
||||
Lay_PutContextualLink (ActSeeLnk,NULL,NULL,
|
||||
"link64x64.gif",
|
||||
Txt_Links,NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************************** List all the links *****************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -372,15 +385,6 @@ void Lnk_FreeListLinks (void)
|
|||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Put contextual icons in edition of links ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Lnk_PutIconToViewLinks (void)
|
||||
{
|
||||
Ico_PutContextualIconToView (ActSeeLnk,NULL);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************************** List all the links ******************************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -49,11 +49,13 @@ struct Link
|
|||
/****************************** Public prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Lnk_PutLinkToViewLinks (void);
|
||||
void Lnk_SeeLinks (void);
|
||||
void Lnk_WriteMenuWithInstitutionalLinks (void);
|
||||
|
||||
void Lnk_EditLinks (void);
|
||||
|
||||
void Lnk_PutIconToViewLinks (void);
|
||||
|
||||
void Lnk_GetListLinks (void);
|
||||
void Lnk_FreeListLinks (void);
|
||||
void Lnk_GetDataOfLinkByCod (struct Link *Lnk);
|
||||
|
|
Loading…
Reference in New Issue