mirror of https://github.com/acanas/swad-core.git
Version 16.107.4
This commit is contained in:
parent
3299bc6592
commit
f04ba7d3d2
|
@ -68,6 +68,8 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status,
|
||||||
bool ICanEdit);
|
bool ICanEdit);
|
||||||
static void Ann_PutParams (void);
|
static void Ann_PutParams (void);
|
||||||
static long Ann_GetParamAnnCod (void);
|
static long Ann_GetParamAnnCod (void);
|
||||||
|
static void Ann_PutSubjectMessage (const char *Field,const char *Label,
|
||||||
|
unsigned Rows);
|
||||||
static void Ann_CreateAnnouncement (unsigned Roles,const char *Subject,const char *Content);
|
static void Ann_CreateAnnouncement (unsigned Roles,const char *Subject,const char *Content);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -420,30 +422,8 @@ void Ann_ShowFormAnnouncement (void)
|
||||||
NULL,Hlp_MESSAGES_Announcements,2);
|
NULL,Hlp_MESSAGES_Announcements,2);
|
||||||
|
|
||||||
/***** Announcement subject and body *****/
|
/***** Announcement subject and body *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
Ann_PutSubjectMessage ("Subject",Txt_MSG_Subject, 2);
|
||||||
"<td class=\"RIGHT_TOP\">"
|
Ann_PutSubjectMessage ("Content",Txt_MSG_Message,20);
|
||||||
"<label for=\"Subject\" class=\"%s\">%s: </label>"
|
|
||||||
"</td>"
|
|
||||||
"<td class=\"LEFT_TOP\">"
|
|
||||||
"<textarea id=\"Subject\" name=\"Subject\""
|
|
||||||
" cols=\"75\" rows=\"2\">"
|
|
||||||
"</textarea>"
|
|
||||||
"</td>"
|
|
||||||
"</tr>"
|
|
||||||
"<tr>"
|
|
||||||
"<td class=\"RIGHT_TOP\">"
|
|
||||||
"<label for=\"Content\" class=\"%s\">%s: </label>"
|
|
||||||
"</td>"
|
|
||||||
"<td class=\"LEFT_TOP\">"
|
|
||||||
"<textarea id=\"Content\" name=\"Content\""
|
|
||||||
" cols=\"75\" rows=\"20\">"
|
|
||||||
"</textarea>"
|
|
||||||
"</td>"
|
|
||||||
"</tr>",
|
|
||||||
The_ClassForm[Gbl.Prefs.Theme],
|
|
||||||
Txt_MSG_Subject,
|
|
||||||
The_ClassForm[Gbl.Prefs.Theme],
|
|
||||||
Txt_MSG_Message);
|
|
||||||
|
|
||||||
/***** Users' roles who can view the announcement *****/
|
/***** Users' roles who can view the announcement *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
@ -472,6 +452,29 @@ void Ann_ShowFormAnnouncement (void)
|
||||||
Act_FormEnd ();
|
Act_FormEnd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*********** Put form field for message subject or message content ***********/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Ann_PutSubjectMessage (const char *Field,const char *Label,
|
||||||
|
unsigned Rows)
|
||||||
|
{
|
||||||
|
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||||
|
|
||||||
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
"<td class=\"RIGHT_TOP\">"
|
||||||
|
"<label for=\"%s\" class=\"%s\">%s:</label>"
|
||||||
|
"</td>"
|
||||||
|
"<td class=\"LEFT_TOP\">"
|
||||||
|
"<textarea id=\"%s\" name=\"%s\""
|
||||||
|
" cols=\"75\" rows=\"%u\">"
|
||||||
|
"</textarea>"
|
||||||
|
"</td>"
|
||||||
|
"</tr>",
|
||||||
|
Field,The_ClassForm[Gbl.Prefs.Theme],Label,
|
||||||
|
Field,Field,Rows);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****** Receive a new announcement from a form and store it in database ******/
|
/****** Receive a new announcement from a form and store it in database ******/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -519,7 +522,6 @@ static void Ann_CreateAnnouncement (unsigned Roles,const char *Subject,const cha
|
||||||
DB_QueryINSERT (Query,"can not create announcement");
|
DB_QueryINSERT (Query,"can not create announcement");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*********** Mark as hidden a global announcement that was active ************/
|
/*********** Mark as hidden a global announcement that was active ************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -189,13 +189,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.107.3 (2016-12-26)"
|
#define Log_PLATFORM_VERSION "SWAD 16.107.4 (2016-12-26)"
|
||||||
#define CSS_FILE "swad16.106.5.css"
|
#define CSS_FILE "swad16.106.5.css"
|
||||||
#define JS_FILE "swad16.101.js"
|
#define JS_FILE "swad16.101.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.107.4: Dec 26, 2016 Code refactoring in announcements. (211532 lines)
|
||||||
Version 16.107.3: Dec 26, 2016 Changes in behaviour of labels in forms. (211531 lines)
|
Version 16.107.3: Dec 26, 2016 Changes in behaviour of labels in forms. (211531 lines)
|
||||||
Version 16.107.2: Dec 26, 2016 Changes in behaviour of labels in forms. (211525 lines)
|
Version 16.107.2: Dec 26, 2016 Changes in behaviour of labels in forms. (211525 lines)
|
||||||
Version 16.107.1: Dec 26, 2016 Changes in behaviour of labels in forms.
|
Version 16.107.1: Dec 26, 2016 Changes in behaviour of labels in forms.
|
||||||
|
|
Loading…
Reference in New Issue