mirror of https://github.com/acanas/swad-core.git
Version 16.199
This commit is contained in:
parent
794aac3960
commit
0b36aa168c
|
@ -1572,11 +1572,7 @@ static void Ctr_ListCentresForEdition (void)
|
||||||
UsrDat.UsrCod = Ctr->RequesterUsrCod;
|
UsrDat.UsrCod = Ctr->RequesterUsrCod;
|
||||||
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
|
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
||||||
Lay_StartTable (2);
|
Msg_WriteMsgAuthor (&UsrDat,true,NULL);
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
|
||||||
Msg_WriteMsgAuthor (&UsrDat,NULL,true,NULL);
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
Lay_EndTable ();
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/* Centre status */
|
/* Centre status */
|
||||||
|
@ -2517,11 +2513,7 @@ static void Ctr_PutFormToCreateCentre (void)
|
||||||
|
|
||||||
/***** Centre requester *****/
|
/***** Centre requester *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
||||||
Lay_StartTable (2);
|
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL);
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
|
||||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,NULL,true,NULL);
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
Lay_EndTable ();
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/***** Centre status *****/
|
/***** Centre status *****/
|
||||||
|
|
|
@ -223,13 +223,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.198.9 (2017-05-02)"
|
#define Log_PLATFORM_VERSION "SWAD 16.199 (2017-05-02)"
|
||||||
#define CSS_FILE "swad16.195.8.css"
|
#define CSS_FILE "swad16.195.8.css"
|
||||||
#define JS_FILE "swad16.181.js"
|
#define JS_FILE "swad16.181.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.199: May 02, 2017 Code refactoring related to message author. (218291 lines)
|
||||||
Version 16.198.9: May 02, 2017 Code refactoring related to message author. (218345 lines)
|
Version 16.198.9: May 02, 2017 Code refactoring related to message author. (218345 lines)
|
||||||
Version 16.198.8: May 01, 2017 Code refactoring related to tables. (218323 lines)
|
Version 16.198.8: May 01, 2017 Code refactoring related to tables. (218323 lines)
|
||||||
Version 16.198.7: May 01, 2017 Code refactoring related to tables. (218319 lines)
|
Version 16.198.7: May 01, 2017 Code refactoring related to tables. (218319 lines)
|
||||||
|
|
|
@ -1518,11 +1518,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
||||||
UsrDat.UsrCod = Crs->RequesterUsrCod;
|
UsrDat.UsrCod = Crs->RequesterUsrCod;
|
||||||
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
|
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
||||||
Lay_StartTable (2);
|
Msg_WriteMsgAuthor (&UsrDat,true,NULL);
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
|
||||||
Msg_WriteMsgAuthor (&UsrDat,NULL,true,NULL);
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
Lay_EndTable ();
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/* Course status */
|
/* Course status */
|
||||||
|
@ -1696,11 +1692,7 @@ static void Crs_PutFormToCreateCourse (void)
|
||||||
|
|
||||||
/***** Course requester *****/
|
/***** Course requester *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
||||||
Lay_StartTable (2);
|
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL);
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
|
||||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,NULL,true,NULL);
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
Lay_EndTable ();
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/***** Course status *****/
|
/***** Course status *****/
|
||||||
|
|
|
@ -818,11 +818,7 @@ static void Deg_ListDegreesForEdition (void)
|
||||||
UsrDat.UsrCod = Deg->RequesterUsrCod;
|
UsrDat.UsrCod = Deg->RequesterUsrCod;
|
||||||
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
|
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
||||||
Lay_StartTable (2);
|
Msg_WriteMsgAuthor (&UsrDat,true,NULL);
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
|
||||||
Msg_WriteMsgAuthor (&UsrDat,NULL,true,NULL);
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
Lay_EndTable ();
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/* Degree status */
|
/* Degree status */
|
||||||
|
@ -1003,11 +999,7 @@ static void Deg_PutFormToCreateDegree (void)
|
||||||
|
|
||||||
/***** Degree requester *****/
|
/***** Degree requester *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
||||||
Lay_StartTable (2);
|
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL);
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
|
||||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,NULL,true,NULL);
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
Lay_EndTable ();
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/***** Degree status *****/
|
/***** Degree status *****/
|
||||||
|
|
14
swad_forum.c
14
swad_forum.c
|
@ -1321,16 +1321,10 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod,
|
||||||
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
|
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
|
||||||
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"AUTHOR_TXT LEFT_TOP\""
|
fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"AUTHOR_TXT LEFT_TOP\""
|
||||||
" style=\"width:150px;\">");
|
" style=\"width:150px;\">");
|
||||||
Lay_StartTable (2);
|
Msg_WriteMsgAuthor (&UsrDat,Enabled,NULL);
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
|
||||||
Msg_WriteMsgAuthor (&UsrDat,NULL,Enabled,NULL);
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
Lay_EndTable ();
|
|
||||||
if (Enabled)
|
if (Enabled)
|
||||||
{
|
|
||||||
/* Write number of posts from this user */
|
/* Write number of posts from this user */
|
||||||
For_WriteNumberOfPosts (UsrDat.UsrCod);
|
For_WriteNumberOfPosts (UsrDat.UsrCod);
|
||||||
}
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/***** Write post content *****/
|
/***** Write post content *****/
|
||||||
|
@ -3410,11 +3404,7 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],
|
||||||
UsrDat.UsrCod = Thr.UsrCod[Order];
|
UsrDat.UsrCod = Thr.UsrCod[Order];
|
||||||
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
|
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP %s\">",Style,BgColor);
|
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP %s\">",Style,BgColor);
|
||||||
Lay_StartTable (2);
|
Msg_WriteMsgAuthor (&UsrDat,Thr.Enabled[Order],BgColor);
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
|
||||||
Msg_WriteMsgAuthor (&UsrDat,NULL,Thr.Enabled[Order],BgColor);
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
Lay_EndTable ();
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/* Write the date of first or last message (it's in YYYYMMDDHHMMSS format) */
|
/* Write the date of first or last message (it's in YYYYMMDDHHMMSS format) */
|
||||||
|
|
|
@ -1539,11 +1539,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
||||||
UsrDat.UsrCod = Ins->RequesterUsrCod;
|
UsrDat.UsrCod = Ins->RequesterUsrCod;
|
||||||
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
|
Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat);
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
||||||
Lay_StartTable (2);
|
Msg_WriteMsgAuthor (&UsrDat,true,NULL);
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
|
||||||
Msg_WriteMsgAuthor (&UsrDat,NULL,true,NULL);
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
Lay_EndTable ();
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/* Institution status */
|
/* Institution status */
|
||||||
|
@ -2233,11 +2229,7 @@ static void Ins_PutFormToCreateInstitution (void)
|
||||||
|
|
||||||
/***** Institution requester *****/
|
/***** Institution requester *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
fprintf (Gbl.F.Out,"<td class=\"DAT INPUT_REQUESTER LEFT_TOP\">");
|
||||||
Lay_StartTable (2);
|
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,true,NULL);
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
|
||||||
Msg_WriteMsgAuthor (&Gbl.Usrs.Me.UsrDat,NULL,true,NULL);
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
Lay_EndTable ();
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/***** Institution status *****/
|
/***** Institution status *****/
|
||||||
|
|
|
@ -2961,11 +2961,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
|
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",
|
||||||
Open ? "MSG_AUT_BG" :
|
Open ? "MSG_AUT_BG" :
|
||||||
"MSG_AUT_BG_NEW");
|
"MSG_AUT_BG_NEW");
|
||||||
Lay_StartTable (2);
|
Msg_WriteMsgAuthor (&UsrDat,true,NULL);
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
|
||||||
Msg_WriteMsgAuthor (&UsrDat,NULL,true,NULL);
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
Lay_EndTable ();
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/***** Write subject *****/
|
/***** Write subject *****/
|
||||||
|
@ -3169,19 +3165,19 @@ static void Msg_WriteSentOrReceivedMsgSubject (long MsgCod,const char *Subject,b
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// Input: UsrDat must hold user's data
|
// Input: UsrDat must hold user's data
|
||||||
|
|
||||||
void Msg_WriteMsgAuthor (struct UsrData *UsrDat,
|
void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor)
|
||||||
const char *Style,bool Enabled,const char *BgColor)
|
|
||||||
{
|
{
|
||||||
extern const char *Txt_Unknown_or_without_photo;
|
extern const char *Txt_Unknown_or_without_photo;
|
||||||
bool ShowPhoto = false;
|
bool ShowPhoto = false;
|
||||||
char PhotoURL[PATH_MAX + 1];
|
char PhotoURL[PATH_MAX + 1];
|
||||||
bool WriteAuthor = false;
|
bool WriteAuthor = false;
|
||||||
|
|
||||||
|
/***** Start table *****/
|
||||||
|
Lay_StartTable (2);
|
||||||
|
|
||||||
/***** Start first column *****/
|
/***** Start first column *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"");
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
if (Style)
|
"<td class=\"CENTER_TOP");
|
||||||
fprintf (Gbl.F.Out,"%s ",Style);
|
|
||||||
fprintf (Gbl.F.Out,"CENTER_TOP");
|
|
||||||
if (BgColor)
|
if (BgColor)
|
||||||
fprintf (Gbl.F.Out," %s",BgColor);
|
fprintf (Gbl.F.Out," %s",BgColor);
|
||||||
fprintf (Gbl.F.Out,"\" style=\"width:30px;\">");
|
fprintf (Gbl.F.Out,"\" style=\"width:30px;\">");
|
||||||
|
@ -3201,10 +3197,7 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/***** Second column with user name (if author has a web page, put a link to it) *****/
|
/***** Second column with user name (if author has a web page, put a link to it) *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"");
|
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP");
|
||||||
if (Style)
|
|
||||||
fprintf (Gbl.F.Out,"%s ",Style);
|
|
||||||
fprintf (Gbl.F.Out,"LEFT_TOP");
|
|
||||||
if (BgColor)
|
if (BgColor)
|
||||||
fprintf (Gbl.F.Out," %s",BgColor);
|
fprintf (Gbl.F.Out," %s",BgColor);
|
||||||
fprintf (Gbl.F.Out,"\">"
|
fprintf (Gbl.F.Out,"\">"
|
||||||
|
@ -3218,19 +3211,20 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,
|
||||||
" alt=\"%s\" title=\"%s\""
|
" alt=\"%s\" title=\"%s\""
|
||||||
" class=\"PHOTO30x40\" />"
|
" class=\"PHOTO30x40\" />"
|
||||||
"</td>"
|
"</td>"
|
||||||
"<td class=\"",
|
"<td class=\"LEFT_MIDDLE",
|
||||||
Gbl.Prefs.IconsURL,
|
Gbl.Prefs.IconsURL,
|
||||||
Txt_Unknown_or_without_photo,Txt_Unknown_or_without_photo);
|
Txt_Unknown_or_without_photo,Txt_Unknown_or_without_photo);
|
||||||
if (Style)
|
|
||||||
fprintf (Gbl.F.Out,"%s ",Style);
|
|
||||||
fprintf (Gbl.F.Out,"LEFT_MIDDLE");
|
|
||||||
if (BgColor)
|
if (BgColor)
|
||||||
fprintf (Gbl.F.Out," %s",BgColor);
|
fprintf (Gbl.F.Out," %s",BgColor);
|
||||||
fprintf (Gbl.F.Out,"\">");
|
fprintf (Gbl.F.Out,"\">");
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End second column *****/
|
/***** End second column *****/
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
|
"</tr>");
|
||||||
|
|
||||||
|
/***** End table *****/
|
||||||
|
Lay_EndTable ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -99,8 +99,7 @@ void Msg_GetNotifMessage (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||||
char **ContentStr,long MsgCod,bool GetContent);
|
char **ContentStr,long MsgCod,bool GetContent);
|
||||||
|
|
||||||
void Msg_WriteMsgNumber (unsigned long MsgNum,bool NewMsg);
|
void Msg_WriteMsgNumber (unsigned long MsgNum,bool NewMsg);
|
||||||
void Msg_WriteMsgAuthor (struct UsrData *UsrDat,
|
void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor);
|
||||||
const char *Style,bool Enabled,const char *BgColor);
|
|
||||||
bool Msg_WriteCrsOrgMsg (long CrsCod);
|
bool Msg_WriteCrsOrgMsg (long CrsCod);
|
||||||
void Msg_WriteListUsrsDstMsg (long MsgCod);
|
void Msg_WriteListUsrsDstMsg (long MsgCod);
|
||||||
void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassBackground);
|
void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassBackground);
|
||||||
|
|
|
@ -534,11 +534,7 @@ void Ntf_ShowMyNotifications (void)
|
||||||
|
|
||||||
/* Write user (from) */
|
/* Write user (from) */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",ClassAuthorBg);
|
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP\">",ClassAuthorBg);
|
||||||
Lay_StartTable (2);
|
Msg_WriteMsgAuthor (&UsrDat,true,NULL);
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
|
||||||
Msg_WriteMsgAuthor (&UsrDat,NULL,true,NULL);
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
Lay_EndTable ();
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/* Write location */
|
/* Write location */
|
||||||
|
|
Loading…
Reference in New Issue