mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-10 10:45:23 +02:00
Version 16.95.2
This commit is contained in:
parent
a5bd0d8c5f
commit
fee40c4ef6
|
@ -309,7 +309,7 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status,
|
||||||
Txt_Remove,NULL,
|
Txt_Remove,NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/***** Put form to change the status of the notice *****/
|
/***** Put form to change the status of the announcement *****/
|
||||||
switch (Status)
|
switch (Status)
|
||||||
{
|
{
|
||||||
case Ann_ACTIVE_ANNOUNCEMENT:
|
case Ann_ACTIVE_ANNOUNCEMENT:
|
||||||
|
|
|
@ -185,7 +185,7 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.95.1 (2016-12-11)"
|
#define Log_PLATFORM_VERSION "SWAD 16.95.2 (2016-12-11)"
|
||||||
#define CSS_FILE "swad16.94.1.css"
|
#define CSS_FILE "swad16.94.1.css"
|
||||||
#define JS_FILE "swad16.90.2.js"
|
#define JS_FILE "swad16.90.2.js"
|
||||||
|
|
||||||
|
@ -196,6 +196,7 @@
|
||||||
1 change necessary in database:
|
1 change necessary in database:
|
||||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1619','es','N','');
|
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1619','es','N','');
|
||||||
|
|
||||||
|
Version 16.95.2: Dec 11, 2016 Code refactoring related with notices. (210514 lines)
|
||||||
Version 16.95.1: Dec 11, 2016 Code refactoring related with global announcements. (210534 lines)
|
Version 16.95.1: Dec 11, 2016 Code refactoring related with global announcements. (210534 lines)
|
||||||
Version 16.95: Dec 11, 2016 Code refactoring related with dates. (210559 lines)
|
Version 16.95: Dec 11, 2016 Code refactoring related with dates. (210559 lines)
|
||||||
Version 16.94.2: Dec 11, 2016 Contextual help on calendar.
|
Version 16.94.2: Dec 11, 2016 Contextual help on calendar.
|
||||||
|
|
|
@ -471,6 +471,7 @@ struct Globals
|
||||||
} Records;
|
} Records;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
long NotCod;
|
||||||
long HighlightNotCod; // Notice code of a notice to be highlighted
|
long HighlightNotCod; // Notice code of a notice to be highlighted
|
||||||
} Notices;
|
} Notices;
|
||||||
} CurrentCrs;
|
} CurrentCrs;
|
||||||
|
|
|
@ -79,6 +79,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
Not_Status_t Status);
|
Not_Status_t Status);
|
||||||
static long Not_InsertNoticeInDB (const char *Content);
|
static long Not_InsertNoticeInDB (const char *Content);
|
||||||
static void Not_UpdateNumUsrsNotifiedByEMailAboutNotice (long NotCod,unsigned NumUsrsToBeNotifiedByEMail);
|
static void Not_UpdateNumUsrsNotifiedByEMailAboutNotice (long NotCod,unsigned NumUsrsToBeNotifiedByEMail);
|
||||||
|
static void Not_PutParams (void);
|
||||||
static long Not_GetParamNotCod (void);
|
static long Not_GetParamNotCod (void);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -595,7 +596,6 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
long UsrCod,
|
long UsrCod,
|
||||||
Not_Status_t Status)
|
Not_Status_t Status)
|
||||||
{
|
{
|
||||||
extern const char *The_ClassForm[The_NUM_THEMES];
|
|
||||||
extern const char *Txt_NOTICE_Active_SINGULAR;
|
extern const char *Txt_NOTICE_Active_SINGULAR;
|
||||||
extern const char *Txt_NOTICE_Active_Mark_as_obsolete;
|
extern const char *Txt_NOTICE_Active_Mark_as_obsolete;
|
||||||
extern const char *Txt_NOTICE_Obsolete_SINGULAR;
|
extern const char *Txt_NOTICE_Obsolete_SINGULAR;
|
||||||
|
@ -626,6 +626,8 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
static unsigned UniqueId = 0;
|
static unsigned UniqueId = 0;
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
|
|
||||||
|
Gbl.CurrentCrs.Notices.NotCod = NotCod; // Parameter for forms
|
||||||
|
|
||||||
/***** 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;\">",
|
||||||
ContainerClass[Status],
|
ContainerClass[Status],
|
||||||
|
@ -637,48 +639,26 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
{
|
{
|
||||||
if (Not_CheckIfICanEditNotices ())
|
if (Not_CheckIfICanEditNotices ())
|
||||||
{
|
{
|
||||||
/* Form to remove notice */
|
/***** Put form to remove announcement *****/
|
||||||
Act_FormStart (ActReqRemNot);
|
Lay_PutContextualLink (ActReqRemNot,Not_PutParams,
|
||||||
Not_PutHiddenParamNotCod (NotCod);
|
"remove-on64x64.png",
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">"
|
Txt_Remove,NULL,
|
||||||
"<input type=\"image\""
|
NULL);
|
||||||
" src=\"%s/remove-on64x64.png\""
|
|
||||||
" alt=\"%s\" title=\"%s\""
|
|
||||||
" class=\"ICO20x20\" />"
|
|
||||||
"</div>",
|
|
||||||
Gbl.Prefs.IconsURL,
|
|
||||||
Txt_Remove,
|
|
||||||
Txt_Remove);
|
|
||||||
Act_FormEnd ();
|
|
||||||
|
|
||||||
/* Put form to change the status of the notice */
|
/***** Put form to change the status of the notice *****/
|
||||||
switch (Status)
|
switch (Status)
|
||||||
{
|
{
|
||||||
case Not_ACTIVE_NOTICE:
|
case Not_ACTIVE_NOTICE:
|
||||||
Act_FormStart (ActHidNot);
|
Lay_PutContextualLink (ActHidNot,Not_PutParams,
|
||||||
Not_PutHiddenParamNotCod (NotCod);
|
"eye-on64x64.png",
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">"
|
Txt_NOTICE_Active_Mark_as_obsolete,NULL,
|
||||||
"<input type=\"image\""
|
NULL);
|
||||||
" src=\"%s/eye-on64x64.png\""
|
|
||||||
" alt=%s\" title=\"%s\""
|
|
||||||
" class=\"ICO20x20\" />"
|
|
||||||
"</div>",
|
|
||||||
Gbl.Prefs.IconsURL,
|
|
||||||
Txt_NOTICE_Active_Mark_as_obsolete,
|
|
||||||
Txt_NOTICE_Active_Mark_as_obsolete);
|
|
||||||
break;
|
break;
|
||||||
case Not_OBSOLETE_NOTICE:
|
case Not_OBSOLETE_NOTICE:
|
||||||
Act_FormStart (ActRevNot);
|
Lay_PutContextualLink (ActRevNot,Not_PutParams,
|
||||||
Not_PutHiddenParamNotCod (NotCod);
|
"eye-slash-on64x64.png",
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">"
|
Txt_NOTICE_Obsolete_Mark_as_active,NULL,
|
||||||
"<input type=\"image\""
|
NULL);
|
||||||
" src=\"%s/eye-slash-on64x64.png\""
|
|
||||||
" alt=\"%s\" title=\"%s\""
|
|
||||||
" class=\"ICO20x20\" />"
|
|
||||||
"</div>",
|
|
||||||
Gbl.Prefs.IconsURL,
|
|
||||||
Txt_NOTICE_Obsolete_Mark_as_active,
|
|
||||||
Txt_NOTICE_Obsolete_Mark_as_active);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Act_FormEnd ();
|
Act_FormEnd ();
|
||||||
|
@ -739,22 +719,14 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
||||||
/***** Write the content of the notice *****/
|
/***** Write the content of the notice *****/
|
||||||
if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES)
|
if (TypeNoticesListing == Not_LIST_BRIEF_NOTICES)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<div class=\"NOTICE_TEXT_BRIEF\">%s</div>",
|
fprintf (Gbl.F.Out,"<div class=\"NOTICE_TEXT_BRIEF\">%s</div>",Content);
|
||||||
Content);
|
|
||||||
|
|
||||||
/* 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\">");
|
||||||
Act_FormStart (ActSeeOneNot);
|
Lay_PutContextualLink (ActSeeOneNot,Not_PutParams,
|
||||||
Not_PutHiddenParamNotCod (NotCod);
|
"ellipsis32x32.gif",
|
||||||
Act_LinkFormSubmit (Txt_See_full_notice,The_ClassForm[Gbl.Prefs.Theme],NULL);
|
Txt_See_full_notice,NULL,
|
||||||
fprintf (Gbl.F.Out,"<img src=\"%s/ellipsis32x32.gif\""
|
NULL);
|
||||||
" alt=\"%s\" title=\"%s\""
|
|
||||||
" class=\"ICO40x40\" />"
|
|
||||||
"</a>",
|
|
||||||
Gbl.Prefs.IconsURL,
|
|
||||||
Txt_See_full_notice,
|
|
||||||
Txt_See_full_notice);
|
|
||||||
Act_FormEnd ();
|
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1006,6 +978,15 @@ unsigned Not_GetNumNoticesDeleted (Sco_Scope_t Scope,unsigned *NumNotif)
|
||||||
/*************** Put parameter with the code of a notice *********************/
|
/*************** Put parameter with the code of a notice *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Not_PutParams (void)
|
||||||
|
{
|
||||||
|
Not_PutHiddenParamNotCod (Gbl.CurrentCrs.Notices.NotCod);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*************** Put parameter with the code of a notice *********************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Not_PutHiddenParamNotCod (long NotCod)
|
void Not_PutHiddenParamNotCod (long NotCod)
|
||||||
{
|
{
|
||||||
Par_PutHiddenParamLong ("NotCod",NotCod);
|
Par_PutHiddenParamLong ("NotCod",NotCod);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user