mirror of https://github.com/acanas/swad-core.git
Version 16.171.1
This commit is contained in:
parent
040a4e5acd
commit
81b1f36389
|
@ -59,6 +59,7 @@ extern struct Globals Gbl;
|
|||
/***************************** Private prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Ban_WriteListOfBanners (void);
|
||||
static void Ban_PutFormToEditBanners (void);
|
||||
static void Ban_GetListBanners (const char *Query);
|
||||
static void Ban_ListBannersForEdition (void);
|
||||
|
@ -88,14 +89,16 @@ void Ban_PutLinkToViewBanners (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************************** List all the banners ****************************/
|
||||
/***************************** List all banners ******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Ban_SeeBanners (void)
|
||||
{
|
||||
extern const char *Hlp_SYSTEM_Banners;
|
||||
extern const char *Txt_Banners;
|
||||
unsigned NumBan;
|
||||
extern const char *Txt_No_banners;
|
||||
extern const char *Txt_Create_another_banner;
|
||||
extern const char *Txt_Create_banner;
|
||||
|
||||
/***** Get list of banners *****/
|
||||
Ban_GetListBanners ("SELECT BanCod,Hidden,ShortName,FullName,Img,WWW"
|
||||
|
@ -103,24 +106,55 @@ void Ban_SeeBanners (void)
|
|||
" WHERE Hidden='N'"
|
||||
" ORDER BY ShortName");
|
||||
|
||||
/***** Frame head *****/
|
||||
Lay_StartRoundFrameTable (NULL,Txt_Banners,
|
||||
Ban_PutFormToEditBanners,Hlp_SYSTEM_Banners,2);
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrame (NULL,Txt_Banners,
|
||||
Ban_PutFormToEditBanners,Hlp_SYSTEM_Banners);
|
||||
|
||||
/***** Write all frames *****/
|
||||
if (Gbl.Banners.Num) // There are banners
|
||||
Ban_WriteListOfBanners ();
|
||||
else // No banners created
|
||||
Lay_ShowAlert (Lay_INFO,Txt_No_banners);
|
||||
|
||||
/***** Button to create banner *****/
|
||||
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
||||
{
|
||||
Act_FormStart (ActEdiBan);
|
||||
Lay_PutConfirmButton (Gbl.Banners.Num ? Txt_Create_another_banner :
|
||||
Txt_Create_banner);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
|
||||
/***** End frame *****/
|
||||
Lay_EndRoundFrame ();
|
||||
|
||||
/***** Free list of banners *****/
|
||||
Ban_FreeListBanners ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************************** Write list of banners ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Ban_WriteListOfBanners (void)
|
||||
{
|
||||
unsigned NumBan;
|
||||
|
||||
/***** List start *****/
|
||||
fprintf (Gbl.F.Out,"<ul class=\"LIST_LEFT\">");
|
||||
|
||||
/***** Write all the banners *****/
|
||||
for (NumBan = 0;
|
||||
NumBan < Gbl.Banners.Num;
|
||||
NumBan++)
|
||||
/* Write data of this banner */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"LEFT_MIDDLE\">"
|
||||
"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">"
|
||||
fprintf (Gbl.F.Out,"<li>"
|
||||
"<a href=\"%s\" title=\"%s\" class=\"DAT\" target=\"_blank\">"
|
||||
"<img src=\"%s/%s/%s\""
|
||||
" alt=\"%s\" title=\"%s\""
|
||||
" class=\"BANNER\" />"
|
||||
"</a>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
"</li>",
|
||||
Gbl.Banners.Lst[NumBan].WWW,
|
||||
Gbl.Banners.Lst[NumBan].FullName,
|
||||
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_BANNER,
|
||||
|
@ -128,11 +162,8 @@ void Ban_SeeBanners (void)
|
|||
Gbl.Banners.Lst[NumBan].ShrtName,
|
||||
Gbl.Banners.Lst[NumBan].FullName);
|
||||
|
||||
/***** Frame end *****/
|
||||
Lay_EndRoundFrameTable ();
|
||||
|
||||
/***** Free list of banners *****/
|
||||
Ban_FreeListBanners ();
|
||||
/***** List end *****/
|
||||
fprintf (Gbl.F.Out,"</ul>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -211,13 +211,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.171 (2017-03-27)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.171.1 (2017-03-27)"
|
||||
#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.171.1: Mar 27, 2017 Code refactoring in banners. (217602 lines)
|
||||
Version 16.171: Mar 27, 2017 Action to remove old courses removed from main menu. (217534 lines)
|
||||
Version 16.170.2: Mar 27, 2017 Link to remove old courses from Hierarchy. (217573 lines)
|
||||
Version 16.170.1: Mar 27, 2017 Pending is renamed as Hierarchy. (217554 lines)
|
||||
|
|
|
@ -98,12 +98,13 @@ void Lnk_SeeLinks (void)
|
|||
/***** Get list of links *****/
|
||||
Lnk_GetListLinks ();
|
||||
|
||||
/***** Write all the links *****/
|
||||
/***** Start frame *****/
|
||||
Lay_StartRoundFrame (NULL,Txt_Links,
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM ? Lnk_PutIconToEditLinks :
|
||||
NULL,
|
||||
Hlp_SYSTEM_Links);
|
||||
|
||||
/***** Write all links *****/
|
||||
if (Gbl.Links.Num) // There are links
|
||||
Lnk_WriteListOfLinks ();
|
||||
else // No links created
|
||||
|
@ -113,11 +114,12 @@ void Lnk_SeeLinks (void)
|
|||
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
||||
{
|
||||
Act_FormStart (ActEdiLnk);
|
||||
Lay_PutConfirmButton (Gbl.CurrentCtr.Ctr.Degs.Num ? Txt_Create_another_link :
|
||||
Txt_Create_link);
|
||||
Lay_PutConfirmButton (Gbl.Links.Num ? Txt_Create_another_link :
|
||||
Txt_Create_link);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
|
||||
/***** End frame *****/
|
||||
Lay_EndRoundFrame ();
|
||||
|
||||
/***** Free list of links *****/
|
||||
|
|
44
swad_text.c
44
swad_text.c
|
@ -6092,6 +6092,27 @@ const char *Txt_Create_announcement =
|
|||
"Criar anúncio";
|
||||
#endif
|
||||
|
||||
const char *Txt_Create_another_banner =
|
||||
#if L==1
|
||||
"Crear un altre banner";
|
||||
#elif L==2
|
||||
"Erstellen Sie ein anderes Werbebanner";
|
||||
#elif L==3
|
||||
"Create another banner";
|
||||
#elif L==4
|
||||
"Crear otro banner";
|
||||
#elif L==5
|
||||
"Créer un autre banniére";
|
||||
#elif L==6
|
||||
"Crear otro banner"; // Okoteve traducción
|
||||
#elif L==7
|
||||
"Crea un altro banner";
|
||||
#elif L==8
|
||||
"Tworzenie inny banner";
|
||||
#elif L==9
|
||||
"Criar um outro banner";
|
||||
#endif
|
||||
|
||||
const char *Txt_Create_another_centre =
|
||||
#if L==1
|
||||
"Crear un altre centre";
|
||||
|
@ -6262,7 +6283,7 @@ const char *Txt_Create_assignment =
|
|||
|
||||
const char *Txt_Create_banner =
|
||||
#if L==1
|
||||
"Crear banner"; // Necessita traduccio
|
||||
"Crear banner";
|
||||
#elif L==2
|
||||
"Werbebanner erstellen";
|
||||
#elif L==3
|
||||
|
@ -24789,6 +24810,27 @@ const char *Txt_No_assignments =
|
|||
"Não há atividades.";
|
||||
#endif
|
||||
|
||||
const char *Txt_No_banners =
|
||||
#if L==1
|
||||
"No hi ha banners.";
|
||||
#elif L==2
|
||||
"Keine Werbebanners.";
|
||||
#elif L==3
|
||||
"No banners.";
|
||||
#elif L==4
|
||||
"No hay banners.";
|
||||
#elif L==5
|
||||
"Il n'y a pas de banniéres.";
|
||||
#elif L==6
|
||||
"No hay banners."; // Okoteve traducción
|
||||
#elif L==7
|
||||
"Non ci sono banners.";
|
||||
#elif L==8
|
||||
"Brak banners.";
|
||||
#elif L==9
|
||||
"Não há banners.";
|
||||
#endif
|
||||
|
||||
const char *Txt_no_course_of_origin = // Means: "message sent from any course"
|
||||
#if L==1
|
||||
"sin asignatura de origen"; // Necessita traduccio
|
||||
|
|
Loading…
Reference in New Issue