mirror of https://github.com/acanas/swad-core.git
Version18.87
This commit is contained in:
parent
d8b7552c07
commit
03c1190183
|
@ -1456,6 +1456,16 @@ a:hover /* Default ==> underlined */
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************** Notice ***********************************/
|
/********************************** Notice ***********************************/
|
||||||
|
.NOTICE_HIGHLIGHT
|
||||||
|
{
|
||||||
|
padding:10px 0;
|
||||||
|
background-color:#ddecf1;
|
||||||
|
animation: fadein 2s linear forwards;
|
||||||
|
}
|
||||||
|
@keyframes fadein
|
||||||
|
{
|
||||||
|
to {background-color:white;}
|
||||||
|
}
|
||||||
.NOTICE_CONTAINER_ACTIVE
|
.NOTICE_CONTAINER_ACTIVE
|
||||||
{
|
{
|
||||||
box-sizing:border-box;
|
box-sizing:border-box;
|
|
@ -2876,7 +2876,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
/* ActRevAnn */{1471,-1,TabUnk,ActSeeAnn ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,Ann_RevealHiddenAnnouncement ,Ann_ShowAllAnnouncements ,NULL},
|
/* ActRevAnn */{1471,-1,TabUnk,ActSeeAnn ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,Ann_RevealHiddenAnnouncement ,Ann_ShowAllAnnouncements ,NULL},
|
||||||
/* ActRemAnn */{1236,-1,TabUnk,ActSeeAnn ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ann_RemoveAnnouncement ,NULL},
|
/* ActRemAnn */{1236,-1,TabUnk,ActSeeAnn ,0x200,0x200,0x200,0x200,0x200,0x200,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Ann_RemoveAnnouncement ,NULL},
|
||||||
|
|
||||||
/* ActSeeOneNot */{1164,-1,TabUnk,ActSeeAllNot ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Not_GetNotCodToHighlight ,Not_ListFullNotices ,NULL},
|
/* ActSeeOneNot */{1164,-1,TabUnk,ActSeeAllNot ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Not_GetHighLightedNotCod ,Not_ListFullNotices ,NULL},
|
||||||
/* ActWriNot */{ 59,-1,TabUnk,ActSeeAllNot ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Not_ShowFormNotice ,NULL},
|
/* ActWriNot */{ 59,-1,TabUnk,ActSeeAllNot ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Not_ShowFormNotice ,NULL},
|
||||||
/* ActRcvNot */{ 60,-1,TabUnk,ActSeeAllNot ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Not_ReceiveNotice ,Not_ListFullNotices ,NULL},
|
/* ActRcvNot */{ 60,-1,TabUnk,ActSeeAllNot ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Not_ReceiveNotice ,Not_ListFullNotices ,NULL},
|
||||||
/* ActHidNot */{ 763,-1,TabUnk,ActSeeAllNot ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Not_HideActiveNotice ,Not_ListFullNotices ,NULL},
|
/* ActHidNot */{ 763,-1,TabUnk,ActSeeAllNot ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Not_HideActiveNotice ,Not_ListFullNotices ,NULL},
|
||||||
|
|
|
@ -446,8 +446,6 @@ Lo de mutear anuncios, en principio prefiero hacer una opci
|
||||||
// TODO: Change in usability of Announcements of exams, suggested by Javier Fernández Baldomero.
|
// TODO: Change in usability of Announcements of exams, suggested by Javier Fernández Baldomero.
|
||||||
// TODO: Al pulsar sobre una convocatoria de examen / aviso --> ir a la sección de esa convocatoria/aviso en lugar de mostrarlo repetido y destacado arriba
|
// TODO: Al pulsar sobre una convocatoria de examen / aviso --> ir a la sección de esa convocatoria/aviso en lugar de mostrarlo repetido y destacado arriba
|
||||||
|
|
||||||
// TODO: Los usuarios que no tienes permiso para ver su perfil público, se debería mostrar algo, una mínima ficha sin tinmeline o algo así
|
|
||||||
|
|
||||||
// TODO: Allow timeline posting only for users belonging to courses or admins to avoid user who create accounts only to post
|
// TODO: Allow timeline posting only for users belonging to courses or admins to avoid user who create accounts only to post
|
||||||
|
|
||||||
// TODO: Ver cómo recibir un fichero desde el cliente (SWADroid) en gsoap
|
// TODO: Ver cómo recibir un fichero desde el cliente (SWADroid) en gsoap
|
||||||
|
@ -471,10 +469,11 @@ En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 18.86.3 (2019-03-24)"
|
#define Log_PLATFORM_VERSION "SWAD 18.87 (2019-03-24)"
|
||||||
#define CSS_FILE "swad18.85.1.css"
|
#define CSS_FILE "swad18.87.css"
|
||||||
#define JS_FILE "swad18.85.js"
|
#define JS_FILE "swad18.85.js"
|
||||||
/*
|
/*
|
||||||
|
Version 18.87: Mar 24, 2019 Change in usability of notices. (240997 lines)
|
||||||
Version 18.86.3: Mar 24, 2019 Optimization in suggestion of users to follow. (240965 lines)
|
Version 18.86.3: Mar 24, 2019 Optimization in suggestion of users to follow. (240965 lines)
|
||||||
Version 18.86.2: Mar 24, 2019 Optimization in suggestion of users to follow. (240935 lines)
|
Version 18.86.2: Mar 24, 2019 Optimization in suggestion of users to follow. (240935 lines)
|
||||||
Version 18.86.1: Mar 23, 2019 Changes in writing of a floating point number.
|
Version 18.86.1: Mar 23, 2019 Changes in writing of a floating point number.
|
||||||
|
|
|
@ -505,7 +505,7 @@ struct Globals
|
||||||
} Records;
|
} Records;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
long NotCod; // Notice to be edited, removed...
|
long NotCod; // Notice to be edited, removed... used as parameter
|
||||||
long HighlightNotCod; // Notice code of a notice to be highlighted
|
long HighlightNotCod; // Notice code of a notice to be highlighted
|
||||||
} Notices;
|
} Notices;
|
||||||
} CurrentCrs;
|
} CurrentCrs;
|
||||||
|
|
|
@ -1006,7 +1006,8 @@ static void Lay_ShowLeftColumn (void)
|
||||||
if (Gbl.CurrentCrs.Crs.CrsCod > 0)
|
if (Gbl.CurrentCrs.Crs.CrsCod > 0)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<div class=\"LEFT_RIGHT_CELL\">");
|
fprintf (Gbl.F.Out,"<div class=\"LEFT_RIGHT_CELL\">");
|
||||||
Not_ShowNotices (Not_LIST_BRIEF_NOTICES);
|
Not_ShowNotices (Not_LIST_BRIEF_NOTICES,
|
||||||
|
-1L); // No notice highlighted
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1020,8 +1021,8 @@ static void Lay_ShowLeftColumn (void)
|
||||||
static void Lay_ShowRightColumn (void)
|
static void Lay_ShowRightColumn (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_If_you_have_an_Android_device_try_SWADroid;
|
extern const char *Txt_If_you_have_an_Android_device_try_SWADroid;
|
||||||
struct timeval tv1,tv2;
|
// struct timeval tv1,tv2;
|
||||||
long tv_usecs;
|
// long tv_usecs;
|
||||||
|
|
||||||
/***** Banners *****/
|
/***** Banners *****/
|
||||||
Ban_WriteMenuWithBanners ();
|
Ban_WriteMenuWithBanners ();
|
||||||
|
@ -1046,12 +1047,13 @@ static void Lay_ShowRightColumn (void)
|
||||||
}
|
}
|
||||||
else if (Gbl.Usrs.Me.Logged) // I am logged
|
else if (Gbl.Usrs.Me.Logged) // I am logged
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
gettimeofday (&tv1,NULL);
|
gettimeofday (&tv1,NULL);
|
||||||
|
*/
|
||||||
/***** Suggest one user to follow *****/
|
/***** Suggest one user to follow *****/
|
||||||
fprintf (Gbl.F.Out,"<div class=\"LEFT_RIGHT_CELL\">");
|
fprintf (Gbl.F.Out,"<div class=\"LEFT_RIGHT_CELL\">");
|
||||||
Fol_SuggestUsrsToFollowMainZoneOnRightColumn ();
|
Fol_SuggestUsrsToFollowMainZoneOnRightColumn ();
|
||||||
|
/*
|
||||||
gettimeofday (&tv2,NULL);
|
gettimeofday (&tv2,NULL);
|
||||||
tv_usecs = (tv2.tv_sec - tv1.tv_sec ) * 1E6 +
|
tv_usecs = (tv2.tv_sec - tv1.tv_sec ) * 1E6 +
|
||||||
(tv2.tv_usec - tv1.tv_usec);
|
(tv2.tv_usec - tv1.tv_usec);
|
||||||
|
@ -1062,7 +1064,7 @@ static void Lay_ShowRightColumn (void)
|
||||||
" VALUES"
|
" VALUES"
|
||||||
" (NOW(),'Fol_SuggestUsrsToFollowMainZoneOnRightColumn: %ld us')",
|
" (NOW(),'Fol_SuggestUsrsToFollowMainZoneOnRightColumn: %ld us')",
|
||||||
tv_usecs);
|
tv_usecs);
|
||||||
|
*/
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1241,6 +1243,20 @@ void Lay_EndSection (void)
|
||||||
fprintf (Gbl.F.Out,"</section>");
|
fprintf (Gbl.F.Out,"</section>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/****************************** Start/end article ****************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Lay_StartArticle (const char *ArticleId)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out,"<article id=\"%s\">",ArticleId);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Lay_EndArticle (void)
|
||||||
|
{
|
||||||
|
fprintf (Gbl.F.Out,"</article>");
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********** Write error message and exit when not enough memory **************/
|
/********** Write error message and exit when not enough memory **************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -74,6 +74,9 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
|
||||||
void Lay_StartSection (const char *SectionId);
|
void Lay_StartSection (const char *SectionId);
|
||||||
void Lay_EndSection (void);
|
void Lay_EndSection (void);
|
||||||
|
|
||||||
|
void Lay_StartArticle (const char *ArticleId);
|
||||||
|
void Lay_EndArticle (void);
|
||||||
|
|
||||||
void Lay_NotEnoughMemoryExit (void);
|
void Lay_NotEnoughMemoryExit (void);
|
||||||
void Lay_WrongScopeExit (void);
|
void Lay_WrongScopeExit (void);
|
||||||
void Lay_NoPermissionExit (void);
|
void Lay_NoPermissionExit (void);
|
||||||
|
|
|
@ -74,7 +74,7 @@ static void Not_PutIconToAddNewNotice (void);
|
||||||
static void Not_PutButtonToAddNewNotice (void);
|
static void Not_PutButtonToAddNewNotice (void);
|
||||||
static void Not_GetDataAndShowNotice (long NotCod);
|
static void Not_GetDataAndShowNotice (long NotCod);
|
||||||
static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
long NotCod,
|
long NotCod,bool Highlight,
|
||||||
time_t TimeUTC,
|
time_t TimeUTC,
|
||||||
const char *Content,
|
const char *Content,
|
||||||
long UsrCod,
|
long UsrCod,
|
||||||
|
@ -118,7 +118,8 @@ void Not_ShowFormNotice (void)
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
||||||
/***** Show all notices *****/
|
/***** Show all notices *****/
|
||||||
Not_ShowNotices (Not_LIST_FULL_NOTICES);
|
Not_ShowNotices (Not_LIST_FULL_NOTICES,
|
||||||
|
-1L); // No notice highlighted
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -152,6 +153,9 @@ void Not_ReceiveNotice (void)
|
||||||
|
|
||||||
/***** Create a new social note about the new notice *****/
|
/***** Create a new social note about the new notice *****/
|
||||||
TL_StoreAndPublishNote (TL_NOTE_NOTICE,NotCod,&SocPub);
|
TL_StoreAndPublishNote (TL_NOTE_NOTICE,NotCod,&SocPub);
|
||||||
|
|
||||||
|
/***** Set notice to be highlighted *****/
|
||||||
|
Gbl.CurrentCrs.Notices.HighlightNotCod = NotCod;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -206,12 +210,19 @@ void Not_ListNoticesAfterRemoval (void)
|
||||||
|
|
||||||
void Not_ListFullNotices (void)
|
void Not_ListFullNotices (void)
|
||||||
{
|
{
|
||||||
/***** Show highlighted notice *****/
|
|
||||||
if (Gbl.CurrentCrs.Notices.HighlightNotCod > 0)
|
|
||||||
Not_GetDataAndShowNotice (Gbl.CurrentCrs.Notices.HighlightNotCod);
|
|
||||||
|
|
||||||
/***** Show all notices *****/
|
/***** Show all notices *****/
|
||||||
Not_ShowNotices (Not_LIST_FULL_NOTICES);
|
Not_ShowNotices (Not_LIST_FULL_NOTICES,
|
||||||
|
Gbl.CurrentCrs.Notices.HighlightNotCod); // Highlight notice
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************************* Get highlighted notice code ***********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Not_GetHighLightedNotCod (void)
|
||||||
|
{
|
||||||
|
/***** Get notice to be highlighted *****/
|
||||||
|
Gbl.CurrentCrs.Notices.HighlightNotCod = Not_GetParamNotCod ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -234,6 +245,9 @@ void Not_HideActiveNotice (void)
|
||||||
|
|
||||||
/***** Update RSS of current course *****/
|
/***** Update RSS of current course *****/
|
||||||
RSS_UpdateRSSFileForACrs (&Gbl.CurrentCrs.Crs);
|
RSS_UpdateRSSFileForACrs (&Gbl.CurrentCrs.Crs);
|
||||||
|
|
||||||
|
/***** Set notice to be highlighted *****/
|
||||||
|
Gbl.CurrentCrs.Notices.HighlightNotCod = NotCod;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -256,6 +270,9 @@ void Not_RevealHiddenNotice (void)
|
||||||
|
|
||||||
/***** Update RSS of current course *****/
|
/***** Update RSS of current course *****/
|
||||||
RSS_UpdateRSSFileForACrs (&Gbl.CurrentCrs.Crs);
|
RSS_UpdateRSSFileForACrs (&Gbl.CurrentCrs.Crs);
|
||||||
|
|
||||||
|
/***** Set notice to be highlighted *****/
|
||||||
|
Gbl.CurrentCrs.Notices.HighlightNotCod = NotCod;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -266,23 +283,26 @@ void Not_RequestRemNotice (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Do_you_really_want_to_remove_the_following_notice;
|
extern const char *Txt_Do_you_really_want_to_remove_the_following_notice;
|
||||||
extern const char *Txt_Remove;
|
extern const char *Txt_Remove;
|
||||||
|
long NotCod;
|
||||||
|
|
||||||
/***** Get the code of the notice to remove *****/
|
/***** Get the code of the notice to remove *****/
|
||||||
Gbl.CurrentCrs.Notices.NotCod = Not_GetParamNotCod ();
|
NotCod = Not_GetParamNotCod ();
|
||||||
|
|
||||||
/***** Show question and button to remove this notice *****/
|
/***** Show question and button to remove this notice *****/
|
||||||
/* Start alert */
|
/* Start alert */
|
||||||
Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_following_notice);
|
Ale_ShowAlertAndButton1 (Ale_QUESTION,Txt_Do_you_really_want_to_remove_the_following_notice);
|
||||||
|
|
||||||
/* Show notice */
|
/* Show notice */
|
||||||
Not_GetDataAndShowNotice (Gbl.CurrentCrs.Notices.NotCod);
|
Not_GetDataAndShowNotice (NotCod);
|
||||||
|
|
||||||
/* End alert */
|
/* End alert */
|
||||||
|
Gbl.CurrentCrs.Notices.NotCod = NotCod; // To put parameters
|
||||||
Ale_ShowAlertAndButton2 (ActRemNot,NULL,NULL,Not_PutParams,
|
Ale_ShowAlertAndButton2 (ActRemNot,NULL,NULL,Not_PutParams,
|
||||||
Btn_REMOVE_BUTTON,Txt_Remove);
|
Btn_REMOVE_BUTTON,Txt_Remove);
|
||||||
|
|
||||||
/***** Show all notices *****/
|
/***** Show all notices *****/
|
||||||
Not_ShowNotices (Not_LIST_FULL_NOTICES);
|
Not_ShowNotices (Not_LIST_FULL_NOTICES,
|
||||||
|
NotCod); // Highlight notice to be removed
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -322,24 +342,13 @@ void Not_RemoveNotice (void)
|
||||||
RSS_UpdateRSSFileForACrs (&Gbl.CurrentCrs.Crs);
|
RSS_UpdateRSSFileForACrs (&Gbl.CurrentCrs.Crs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/********************* Get notice to show highlighted ************************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
void Not_GetNotCodToHighlight (void)
|
|
||||||
{
|
|
||||||
/***** Get the code of the notice to highlight *****/
|
|
||||||
Gbl.CurrentCrs.Notices.HighlightNotCod = Not_GetParamNotCod ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************************** Show the notices ******************************/
|
/***************************** Show the notices ******************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Not_ShowNotices (Not_Listing_t TypeNoticesListing)
|
void Not_ShowNotices (Not_Listing_t TypeNoticesListing,long HighlightNotCod)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_MESSAGES_Notices;
|
extern const char *Hlp_MESSAGES_Notices;
|
||||||
extern const char *Txt_All_notices;
|
|
||||||
extern const char *Txt_Notices;
|
extern const char *Txt_Notices;
|
||||||
extern const char *Txt_No_notices;
|
extern const char *Txt_No_notices;
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
|
@ -395,8 +404,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing)
|
||||||
"%upx",
|
"%upx",
|
||||||
Not_ContainerWidth[Not_LIST_FULL_NOTICES] + 50);
|
Not_ContainerWidth[Not_LIST_FULL_NOTICES] + 50);
|
||||||
Box_StartBox (StrWidth,
|
Box_StartBox (StrWidth,
|
||||||
Gbl.CurrentCrs.Notices.HighlightNotCod > 0 ? Txt_All_notices :
|
Txt_Notices,
|
||||||
Txt_Notices,
|
|
||||||
Not_PutIconsListNotices,
|
Not_PutIconsListNotices,
|
||||||
Hlp_MESSAGES_Notices,Box_NOT_CLOSABLE);
|
Hlp_MESSAGES_Notices,Box_NOT_CLOSABLE);
|
||||||
if (!NumNotices)
|
if (!NumNotices)
|
||||||
|
@ -437,6 +445,7 @@ void Not_ShowNotices (Not_Listing_t TypeNoticesListing)
|
||||||
/* Draw the notice */
|
/* Draw the notice */
|
||||||
Not_DrawANotice (TypeNoticesListing,
|
Not_DrawANotice (TypeNoticesListing,
|
||||||
NotCod,
|
NotCod,
|
||||||
|
(NotCod == HighlightNotCod), // Highlighted?
|
||||||
TimeUTC,Content,UsrCod,Status);
|
TimeUTC,Content,UsrCod,Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -581,6 +590,7 @@ static void Not_GetDataAndShowNotice (long NotCod)
|
||||||
/***** Draw the notice *****/
|
/***** Draw the notice *****/
|
||||||
Not_DrawANotice (Not_LIST_FULL_NOTICES,
|
Not_DrawANotice (Not_LIST_FULL_NOTICES,
|
||||||
NotCod,
|
NotCod,
|
||||||
|
false, // Not highlighted
|
||||||
TimeUTC,Content,UsrCod,Status);
|
TimeUTC,Content,UsrCod,Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -593,7 +603,7 @@ static void Not_GetDataAndShowNotice (long NotCod)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
long NotCod,
|
long NotCod,bool Highlight,
|
||||||
time_t TimeUTC,
|
time_t TimeUTC,
|
||||||
const char *Content,
|
const char *Content,
|
||||||
long UsrCod,
|
long UsrCod,
|
||||||
|
@ -627,8 +637,19 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
};
|
};
|
||||||
static unsigned UniqueId = 0;
|
static unsigned UniqueId = 0;
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
|
char Anchor[16 + 10 + 1];
|
||||||
|
|
||||||
Gbl.CurrentCrs.Notices.NotCod = NotCod; // Parameter for forms
|
/***** Build anchor string *****/
|
||||||
|
snprintf (Anchor,sizeof (Anchor),
|
||||||
|
"NOT_%ld",NotCod);
|
||||||
|
|
||||||
|
/***** Start article for this notice *****/
|
||||||
|
if (TypeNoticesListing == Not_LIST_FULL_NOTICES)
|
||||||
|
{
|
||||||
|
Lay_StartArticle (Anchor);
|
||||||
|
if (Highlight)
|
||||||
|
fprintf (Gbl.F.Out,"<div class=\"NOTICE_HIGHLIGHT\">");
|
||||||
|
}
|
||||||
|
|
||||||
/***** Start yellow note *****/
|
/***** Start yellow note *****/
|
||||||
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"width:%upx;\">",
|
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"width:%upx;\">",
|
||||||
|
@ -641,6 +662,8 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
{
|
{
|
||||||
if (Not_CheckIfICanEditNotices ())
|
if (Not_CheckIfICanEditNotices ())
|
||||||
{
|
{
|
||||||
|
Gbl.CurrentCrs.Notices.NotCod = NotCod; // To put parameters
|
||||||
|
|
||||||
/***** Put form to remove announcement *****/
|
/***** Put form to remove announcement *****/
|
||||||
Ico_PutContextualIconToRemove (ActReqRemNot,Not_PutParams);
|
Ico_PutContextualIconToRemove (ActReqRemNot,Not_PutParams);
|
||||||
|
|
||||||
|
@ -648,12 +671,12 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
switch (Status)
|
switch (Status)
|
||||||
{
|
{
|
||||||
case Not_ACTIVE_NOTICE:
|
case Not_ACTIVE_NOTICE:
|
||||||
Lay_PutContextualLinkOnlyIcon (ActHidNot,NULL,Not_PutParams,
|
Lay_PutContextualLinkOnlyIcon (ActHidNot,Anchor,Not_PutParams,
|
||||||
"eye.svg",
|
"eye.svg",
|
||||||
Txt_NOTICE_Active_Mark_as_obsolete);
|
Txt_NOTICE_Active_Mark_as_obsolete);
|
||||||
break;
|
break;
|
||||||
case Not_OBSOLETE_NOTICE:
|
case Not_OBSOLETE_NOTICE:
|
||||||
Lay_PutContextualLinkOnlyIcon (ActRevNot,NULL,Not_PutParams,
|
Lay_PutContextualLinkOnlyIcon (ActRevNot,Anchor,Not_PutParams,
|
||||||
"eye-slash.svg",
|
"eye-slash.svg",
|
||||||
Txt_NOTICE_Obsolete_Mark_as_active);
|
Txt_NOTICE_Obsolete_Mark_as_active);
|
||||||
break;
|
break;
|
||||||
|
@ -696,7 +719,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES)
|
if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES)
|
||||||
{
|
{
|
||||||
/* Form to view full notice */
|
/* Form to view full notice */
|
||||||
Frm_StartForm (ActSeeOneNot);
|
Frm_StartFormAnchor (ActSeeOneNot,Anchor);
|
||||||
Not_PutHiddenParamNotCod (NotCod);
|
Not_PutHiddenParamNotCod (NotCod);
|
||||||
Frm_LinkFormSubmit (Txt_See_full_notice,DateClass[Status],NULL);
|
Frm_LinkFormSubmit (Txt_See_full_notice,DateClass[Status],NULL);
|
||||||
}
|
}
|
||||||
|
@ -722,7 +745,8 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
|
|
||||||
/* Put form to view full notice */
|
/* Put form to view full notice */
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
|
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
|
||||||
Lay_PutContextualLinkOnlyIcon (ActSeeOneNot,NULL,Not_PutParams,
|
Gbl.CurrentCrs.Notices.NotCod = NotCod; // To put parameters
|
||||||
|
Lay_PutContextualLinkOnlyIcon (ActSeeOneNot,Anchor,Not_PutParams,
|
||||||
"ellipsis-h.svg",
|
"ellipsis-h.svg",
|
||||||
Txt_See_full_notice);
|
Txt_See_full_notice);
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
@ -743,6 +767,14 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
|
|
||||||
/***** End yellow note *****/
|
/***** End yellow note *****/
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
|
||||||
|
/***** End article for this notice *****/
|
||||||
|
if (TypeNoticesListing == Not_LIST_FULL_NOTICES)
|
||||||
|
{
|
||||||
|
if (Highlight)
|
||||||
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
|
Lay_EndArticle ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1011,11 +1043,6 @@ void Not_PutHiddenParamNotCod (long NotCod)
|
||||||
|
|
||||||
static long Not_GetParamNotCod (void)
|
static long Not_GetParamNotCod (void)
|
||||||
{
|
{
|
||||||
long NotCod;
|
|
||||||
|
|
||||||
/***** Get notice code *****/
|
/***** Get notice code *****/
|
||||||
if ((NotCod = Par_GetParToLong ("NotCod")) <= 0)
|
return Par_GetParToLong ("NotCod");
|
||||||
Lay_ShowErrorAndExit ("Wrong code of notice.");
|
|
||||||
|
|
||||||
return NotCod;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@ void Not_ShowFormNotice (void);
|
||||||
void Not_ReceiveNotice (void);
|
void Not_ReceiveNotice (void);
|
||||||
void Not_ListNoticesAfterRemoval (void);
|
void Not_ListNoticesAfterRemoval (void);
|
||||||
void Not_ListFullNotices (void);
|
void Not_ListFullNotices (void);
|
||||||
|
void Not_GetHighLightedNotCod (void);
|
||||||
|
|
||||||
void Not_HideActiveNotice (void);
|
void Not_HideActiveNotice (void);
|
||||||
void Not_RevealHiddenNotice (void);
|
void Not_RevealHiddenNotice (void);
|
||||||
|
@ -66,8 +67,7 @@ void Not_RevealHiddenNotice (void);
|
||||||
void Not_RequestRemNotice (void);
|
void Not_RequestRemNotice (void);
|
||||||
void Not_RemoveNotice (void);
|
void Not_RemoveNotice (void);
|
||||||
|
|
||||||
void Not_GetNotCodToHighlight (void);
|
void Not_ShowNotices (Not_Listing_t TypeNoticesListing,long HighlightNotCod);
|
||||||
void Not_ShowNotices (Not_Listing_t TypeNoticesListing);
|
|
||||||
void Not_GetSummaryAndContentNotice (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
void Not_GetSummaryAndContentNotice (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||||
char **ContentStr,
|
char **ContentStr,
|
||||||
long NotCod,bool GetContent);
|
long NotCod,bool GetContent);
|
||||||
|
|
21
swad_text.c
21
swad_text.c
|
@ -1295,27 +1295,6 @@ const char *Txt_All_groups =
|
||||||
"Todos os grupos";
|
"Todos os grupos";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_All_notices =
|
|
||||||
#if L==1 // ca
|
|
||||||
"Tots els avisos";
|
|
||||||
#elif L==2 // de
|
|
||||||
"Alle Ankündigungen";
|
|
||||||
#elif L==3 // en
|
|
||||||
"All notices";
|
|
||||||
#elif L==4 // es
|
|
||||||
"Todos los avisos";
|
|
||||||
#elif L==5 // fr
|
|
||||||
"Tous les avis";
|
|
||||||
#elif L==6 // gn
|
|
||||||
"Todos los avisos"; // Okoteve traducción
|
|
||||||
#elif L==7 // it
|
|
||||||
"Tutti i avvisi";
|
|
||||||
#elif L==8 // pl
|
|
||||||
"Wszystkie ogloszenia";
|
|
||||||
#elif L==9 // pt
|
|
||||||
"Todos os avisos";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_All_places =
|
const char *Txt_All_places =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Tots els llocs";
|
"Tots els llocs";
|
||||||
|
|
Loading…
Reference in New Issue