mirror of https://github.com/acanas/swad-core.git
Version19.71.3
This commit is contained in:
parent
23680ed22e
commit
5a2bb0aa92
|
@ -488,13 +488,14 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.71.2 (2019-11-17)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.71.3 (2019-11-17)"
|
||||
#define CSS_FILE "swad19.71.css"
|
||||
#define JS_FILE "swad19.70.js"
|
||||
/*
|
||||
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
||||
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
||||
|
||||
Version 19.71.3: Nov 17, 2019 Converting links to buttons. (247013 lines)
|
||||
Version 19.71.2: Nov 17, 2019 Converting links to buttons. (247034 lines)
|
||||
Version 19.71.1: Nov 17, 2019 Converting links to buttons.
|
||||
Changes in forums. (247029 lines)
|
||||
|
|
|
@ -166,14 +166,14 @@ void Con_ShowGlobalConnectedUsrs (void)
|
|||
Frm_StartFormUnique (ActLstCon); // Must be unique because
|
||||
// the list of connected users
|
||||
// is dynamically updated via AJAX
|
||||
Frm_LinkFormSubmitUnique (Txt_Connected_users,"CONNECTED_TXT");
|
||||
HTM_BUTTON_Begin (Txt_Connected_users,"CONNECTED_TXT",NULL);
|
||||
|
||||
/* Write total number of sessions */
|
||||
HTM_TxtF ("%u %s",Gbl.Session.NumSessions,
|
||||
Gbl.Session.NumSessions == 1 ? Txt_session :
|
||||
Txt_sessions);
|
||||
/* End link to view more details about connected users */
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
|
||||
if (NumUsrsTotal)
|
||||
|
@ -314,12 +314,12 @@ void Con_ShowConnectedUsrsBelongingToCurrentCrs (void)
|
|||
Frm_StartFormUnique (ActLstCon); // Must be unique because
|
||||
// the list of connected users
|
||||
// is dynamically updated via AJAX
|
||||
Frm_LinkFormSubmitUnique (Txt_Connected_users,"CONNECTED_TXT");
|
||||
HTM_BUTTON_Begin (Txt_Connected_users,"CONNECTED_TXT",NULL);
|
||||
Str_Copy (CourseName,Gbl.Hierarchy.Crs.ShrtName,
|
||||
Hie_MAX_BYTES_SHRT_NAME);
|
||||
Con_GetNumConnectedUsrsWithARoleBelongingCurrentLocation (Rol_UNK,&Usrs);
|
||||
HTM_TxtF ("%u %s %s",Usrs.NumUsrs,Txt_from,CourseName);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** Number of teachers and students *****/
|
||||
|
@ -406,9 +406,9 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Ro
|
|||
// the list of connected users
|
||||
// is dynamically updated via AJAX
|
||||
Sco_PutParamScope ("ScopeCon",Hie_CRS);
|
||||
Frm_LinkFormSubmitUnique (Txt_Connected_users,"CONNECTED_TXT");
|
||||
HTM_BUTTON_Begin (Txt_Connected_users,"CONNECTED_TXT",NULL);
|
||||
Ico_PutIcon ("ellipsis-h.svg",Txt_Connected_users,"ICO16x16");
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -783,7 +783,8 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
|
|||
extern const char *Txt_View_record_for_this_course;
|
||||
bool ShowPhoto;
|
||||
char PhotoURL[PATH_MAX + 1];
|
||||
const char *Font;
|
||||
const char *ClassTxt;
|
||||
const char *ClassLink;
|
||||
long UsrCod;
|
||||
bool ItsMe;
|
||||
struct UsrData *UsrDat;
|
||||
|
@ -818,9 +819,17 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
|
|||
HTM_TD_End ();
|
||||
|
||||
/***** Write full name and link *****/
|
||||
Font = (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].ThisCrs ? "CON_NAME_NARROW CON_CRS" :
|
||||
"CON_NAME_NARROW CON_NO_CRS");
|
||||
HTM_TD_Begin ("class=\"%s COLOR%u\"",Font,Gbl.RowEvenOdd);
|
||||
if (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].ThisCrs)
|
||||
{
|
||||
ClassTxt = "CON_NAME_NARROW CON_CRS";
|
||||
ClassLink = "BT_LINK CON_NAME_NARROW CON_CRS";
|
||||
}
|
||||
else
|
||||
{
|
||||
ClassTxt = "CON_NAME_NARROW CON_NO_CRS";
|
||||
ClassLink = "BT_LINK CON_NAME_NARROW CON_NO_CRS";
|
||||
}
|
||||
HTM_TD_Begin ("class=\"%s COLOR%u\"",ClassTxt,Gbl.RowEvenOdd);
|
||||
// The form must be unique because
|
||||
// the list of connected users
|
||||
// is dynamically updated via AJAX
|
||||
|
@ -840,18 +849,18 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
|
|||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
|
||||
HTM_DIV_Begin ("class=\"CON_NAME_NARROW\""); // Limited width
|
||||
Frm_LinkFormSubmitUnique (Txt_View_record_for_this_course,Font);
|
||||
HTM_BUTTON_Begin (Txt_View_record_for_this_course,ClassLink,NULL);
|
||||
Usr_WriteFirstNameBRSurnames (UsrDat);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
HTM_DIV_End ();
|
||||
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write time from last access *****/
|
||||
Font = (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].ThisCrs ? "CON_SINCE CON_CRS" :
|
||||
"CON_SINCE CON_NO_CRS");
|
||||
HTM_TD_Begin ("class=\"%s COLOR%u\"",Font,Gbl.RowEvenOdd);
|
||||
ClassTxt = (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].ThisCrs ? "CON_SINCE CON_CRS" :
|
||||
"CON_SINCE CON_NO_CRS");
|
||||
HTM_TD_Begin ("class=\"%s COLOR%u\"",ClassTxt,Gbl.RowEvenOdd);
|
||||
HTM_DIV_Begin ("id=\"hm%u\"",Gbl.Usrs.Connected.NumUsr); // Used for automatic update, only when displayed on right column
|
||||
Dat_WriteHoursMinutesSecondsFromSeconds (Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].TimeDiff);
|
||||
HTM_DIV_End (); // Used for automatic update, only when displayed on right column
|
||||
|
|
39
swad_form.c
39
swad_form.c
|
@ -231,45 +231,6 @@ void Frm_EndForm (void)
|
|||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************* Anchor directive used to send a form ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Frm_LinkFormSubmit (const char *Title,const char *LinkClass,
|
||||
const char *OnSubmit)
|
||||
{
|
||||
Frm_LinkFormSubmitId (Title,LinkClass,Gbl.Form.Id,OnSubmit);
|
||||
}
|
||||
|
||||
void Frm_LinkFormSubmitUnique (const char *Title,const char *LinkClass)
|
||||
{
|
||||
Frm_LinkFormSubmitId (Title,LinkClass,Gbl.Form.UniqueId,NULL);
|
||||
}
|
||||
|
||||
// Title can be NULL
|
||||
// LinkClass can be NULL
|
||||
// Id can not be NULL
|
||||
// OnSubmit can be NULL
|
||||
|
||||
void Frm_LinkFormSubmitId (const char *Title,const char *LinkClass,
|
||||
const char *Id,const char *OnSubmit)
|
||||
{
|
||||
HTM_Txt ("<a href=\"\"");
|
||||
if (Title)
|
||||
if (Title[0])
|
||||
HTM_TxtF (" title=\"%s\"",Title);
|
||||
if (LinkClass)
|
||||
if (LinkClass[0])
|
||||
HTM_TxtF (" class=\"%s\"",LinkClass);
|
||||
HTM_Txt (" onclick=\"");
|
||||
if (OnSubmit) // JavaScript function to be called
|
||||
// before submitting the form
|
||||
if (OnSubmit[0])
|
||||
HTM_TxtF ("%s;",OnSubmit);
|
||||
HTM_TxtF ("document.getElementById('%s').submit();return false;\">",
|
||||
Id);
|
||||
}
|
||||
|
||||
void Frm_LinkFormSubmitAnimated (const char *Title,const char *LinkClass,
|
||||
const char *OnSubmit)
|
||||
{
|
||||
|
|
|
@ -62,11 +62,6 @@ void Frm_StartFormId (Act_Action_t NextAction,const char *Id);
|
|||
void Frm_SetParamsForm (char ParamsStr[Frm_MAX_BYTES_PARAMS_STR],Act_Action_t NextAction,
|
||||
bool PutParameterLocationIfNoSesion);
|
||||
void Frm_EndForm (void);
|
||||
void Frm_LinkFormSubmit (const char *Title,const char *LinkClass,
|
||||
const char *OnSubmit);
|
||||
void Frm_LinkFormSubmitUnique (const char *Title,const char *LinkClass);
|
||||
void Frm_LinkFormSubmitId (const char *Title,const char *LinkClass,
|
||||
const char *Id,const char *OnSubmit);
|
||||
void Frm_LinkFormSubmitAnimated (const char *Title,const char *LinkClass,
|
||||
const char *OnSubmit);
|
||||
void Frm_LinkFormEnd (void);
|
||||
|
|
|
@ -153,9 +153,6 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
unsigned NumPage;
|
||||
char *ClassLink;
|
||||
|
||||
if (asprintf (&ClassLink,"BT_LINK PAG %s",ClassTxt) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
|
||||
/***** Link to page 1, including a text *****/
|
||||
if (Subject)
|
||||
{
|
||||
|
@ -246,7 +243,10 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
Txt_Page_X_of_Y,
|
||||
1,Pagination->NumPags);
|
||||
if (asprintf (&ClassLink,"BT_LINK LT %s",ClassTxt) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
HTM_BUTTON_Begin (Gbl.Title,ClassLink,NULL);
|
||||
free (ClassLink);
|
||||
}
|
||||
else
|
||||
HTM_SPAN_Begin ("class=\"%s\"",ClassTxt);
|
||||
|
@ -267,6 +267,9 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
/***** Links to several pages start here *****/
|
||||
if (Pagination->MoreThanOnePage)
|
||||
{
|
||||
if (asprintf (&ClassLink,"BT_LINK PAG %s",ClassTxt) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
|
||||
/***** Possible link to page 1 *****/
|
||||
if (Pagination->StartPage > 1)
|
||||
{
|
||||
|
@ -769,9 +772,9 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
}
|
||||
|
||||
free (ClassLink);
|
||||
free (ClassLink);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
16
swad_photo.c
16
swad_photo.c
|
@ -1187,17 +1187,11 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
|
|||
if (PutLinkToPublicProfile)
|
||||
{
|
||||
if (FormUnique)
|
||||
{
|
||||
Frm_StartFormUnique (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
Frm_LinkFormSubmitUnique (NULL,NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
Frm_StartForm (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
Frm_LinkFormSubmit (NULL,NULL,NULL);
|
||||
}
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
HTM_BUTTON_Begin (NULL,"BT_LINK",NULL);
|
||||
}
|
||||
|
||||
/***** Hidden div to pass user's name to Javascript *****/
|
||||
|
@ -1308,7 +1302,7 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
|
|||
/***** End form to go to public profile *****/
|
||||
if (PutLinkToPublicProfile)
|
||||
{
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
}
|
||||
|
@ -2472,7 +2466,7 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg,
|
|||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
Txt_Go_to_X,
|
||||
Deg->FullName);
|
||||
Frm_LinkFormSubmit (Gbl.Title,NULL,NULL);
|
||||
HTM_BUTTON_Begin (Gbl.Title,"BT_LINK",NULL);
|
||||
}
|
||||
|
||||
/***** Check if photo of degree can be shown *****/
|
||||
|
@ -2552,7 +2546,7 @@ static void Pho_ShowDegreeAvgPhotoAndStat (struct Degree *Deg,
|
|||
HTM_DIV_End ();
|
||||
if (SeeOrPrint == Pho_DEGREES_SEE)
|
||||
{
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,13 +123,13 @@ void Plc_SeePlaces (void)
|
|||
|
||||
Frm_StartForm (ActSeePlc);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Frm_LinkFormSubmit (Txt_PLACES_HELP_ORDER[Order],"TIT_TBL",NULL);
|
||||
HTM_BUTTON_Begin (Txt_PLACES_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Gbl.Plcs.SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
HTM_Txt (Txt_PLACES_ORDER[Order]);
|
||||
if (Order == Gbl.Plcs.SelectedOrder)
|
||||
HTM_U_End ();
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
|
||||
HTM_TH_End ();
|
||||
|
|
|
@ -946,7 +946,7 @@ static unsigned long Prf_GetNumUsrsWithNumClicksPerDay (void)
|
|||
|
||||
static void Prf_ShowRanking (unsigned long Rank,unsigned long NumUsrs)
|
||||
{
|
||||
extern const char *The_ClassFormOutBox[The_NUM_THEMES];
|
||||
extern const char *The_ClassFormLinkOutBox[The_NUM_THEMES];
|
||||
extern const char *Txt_of_PART_OF_A_TOTAL;
|
||||
|
||||
/***** Part of a total and end container *****/
|
||||
|
@ -958,9 +958,9 @@ static void Prf_ShowRanking (unsigned long Rank,unsigned long NumUsrs)
|
|||
Frm_StartForm (ActSeeUseGbl);
|
||||
Sco_PutParamScope ("ScopeSta",Hie_SYS);
|
||||
Par_PutHiddenParamUnsigned (NULL,"FigureType",(unsigned) Fig_USERS_RANKING);
|
||||
Frm_LinkFormSubmit (Gbl.Title,The_ClassFormOutBox[Gbl.Prefs.Theme],NULL);
|
||||
HTM_BUTTON_Begin (Gbl.Title,The_ClassFormLinkOutBox[Gbl.Prefs.Theme],NULL);
|
||||
HTM_TxtF ("#%lu",Rank);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
@ -1772,9 +1772,9 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank)
|
|||
Frm_StartForm (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
HTM_DIV_Begin ("class=\"RANK_USR\""); // Limited width
|
||||
Frm_LinkFormSubmit (Txt_Another_user_s_profile,"DAT_SMALL",NULL);
|
||||
HTM_BUTTON_Begin (Txt_Another_user_s_profile,"BT_LINK DAT_SMALL",NULL);
|
||||
Usr_WriteFirstNameBRSurnames (UsrDat);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
HTM_DIV_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
|
|
@ -904,13 +904,13 @@ static void Prj_ShowProjectsHead (Prj_ProjectView_t ProjectView)
|
|||
Order,
|
||||
Gbl.Prjs.CurrentPage,
|
||||
-1L);
|
||||
Frm_LinkFormSubmit (Txt_PROJECT_ORDER_HELP[Order],"TIT_TBL",NULL);
|
||||
HTM_BUTTON_Begin (Txt_PROJECT_ORDER_HELP[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Gbl.Prjs.SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
HTM_Txt (Txt_PROJECT_ORDER[Order]);
|
||||
if (Order == Gbl.Prjs.SelectedOrder)
|
||||
HTM_U_End ();
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
break;
|
||||
default:
|
||||
|
@ -1133,6 +1133,7 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj,
|
|||
const char *ClassLabel;
|
||||
const char *ClassDate;
|
||||
const char *ClassTitle;
|
||||
const char *ClassLink;
|
||||
const char *ClassData;
|
||||
struct Prj_Faults Faults;
|
||||
bool PrjIsFaulty;
|
||||
|
@ -1142,12 +1143,14 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj,
|
|||
/***** Set CSS classes *****/
|
||||
ClassLabel = (Prj->Hidden == Prj_HIDDEN) ? "ASG_LABEL_LIGHT" :
|
||||
"ASG_LABEL";
|
||||
ClassDate = (Prj->Hidden == Prj_HIDDEN) ? "DATE_BLUE_LIGHT" :
|
||||
"DATE_BLUE";
|
||||
ClassDate = (Prj->Hidden == Prj_HIDDEN) ? "DATE_BLUE_LIGHT" :
|
||||
"DATE_BLUE";
|
||||
ClassTitle = (Prj->Hidden == Prj_HIDDEN) ? "ASG_TITLE_LIGHT" :
|
||||
"ASG_TITLE";
|
||||
ClassData = (Prj->Hidden == Prj_HIDDEN) ? "DAT_LIGHT" :
|
||||
"DAT";
|
||||
ClassLink = (Prj->Hidden == Prj_HIDDEN) ? "BT_LINK ASG_TITLE_LIGHT" :
|
||||
"BT_LINK ASG_TITLE";
|
||||
ClassData = (Prj->Hidden == Prj_HIDDEN) ? "DAT_LIGHT" :
|
||||
"DAT";
|
||||
|
||||
/***** Set anchor string *****/
|
||||
Frm_SetAnchorStr (Prj->PrjCod,&Anchor);
|
||||
|
@ -1254,9 +1257,9 @@ static void Prj_ShowOneProject (unsigned NumIndex,struct Project *Prj,
|
|||
{
|
||||
Frm_StartForm (ActAdmDocPrj);
|
||||
Prj_PutCurrentParams ();
|
||||
Frm_LinkFormSubmit (Txt_Project_files,ClassTitle,NULL);
|
||||
HTM_BUTTON_Begin (Txt_Project_files,ClassLink,NULL);
|
||||
HTM_Txt (Prj->Title);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1483,16 +1483,16 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
|
|||
|
||||
static void Rec_ShowLinkToPrintPreviewOfRecords (void)
|
||||
{
|
||||
extern const char *The_ClassFormOutBoxBold[The_NUM_THEMES];
|
||||
extern const char *The_ClassFormLinkOutBoxBold[The_NUM_THEMES];
|
||||
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
||||
extern const char *Txt_Print;
|
||||
extern const char *Txt_record_cards_per_page;
|
||||
unsigned i;
|
||||
|
||||
Frm_LinkFormSubmit (Txt_Print,The_ClassFormOutBoxBold[Gbl.Prefs.Theme],NULL);
|
||||
Ico_PutIconTextLink ("print.svg",
|
||||
Txt_Print);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_Begin (Txt_Print,The_ClassFormLinkOutBoxBold[Gbl.Prefs.Theme],NULL);
|
||||
Ico_PutIconTextLink ("print.svg",Txt_Print);
|
||||
HTM_BUTTON_End ();
|
||||
|
||||
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_Txt ("(");
|
||||
HTM_SELECT_Begin (false,
|
||||
|
@ -2698,13 +2698,13 @@ static void Rec_ShowInstitutionInHead (struct Instit *Ins,bool PutFormLinks)
|
|||
{
|
||||
Frm_StartFormGoTo (ActSeeInsInf);
|
||||
Ins_PutParamInsCod (Ins->InsCod);
|
||||
Frm_LinkFormSubmit (Ins->FullName,NULL,NULL);
|
||||
HTM_BUTTON_Begin (Ins->FullName,"BT_LINK",NULL);
|
||||
}
|
||||
Log_DrawLogo (Hie_INS,Ins->InsCod,Ins->ShrtName,
|
||||
Rec_INSTITUTION_LOGO_SIZE,NULL,true);
|
||||
if (PutFormLinks)
|
||||
{
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
}
|
||||
|
@ -2719,12 +2719,12 @@ static void Rec_ShowInstitutionInHead (struct Instit *Ins,bool PutFormLinks)
|
|||
{
|
||||
Frm_StartFormGoTo (ActSeeInsInf);
|
||||
Ins_PutParamInsCod (Ins->InsCod);
|
||||
Frm_LinkFormSubmit (Ins->FullName,"REC_HEAD",NULL);
|
||||
HTM_BUTTON_Begin (Ins->FullName,"BT_LINK REC_HEAD",NULL);
|
||||
}
|
||||
HTM_Txt (Ins->FullName);
|
||||
if (PutFormLinks)
|
||||
{
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
}
|
||||
|
@ -2792,14 +2792,15 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
|
|||
ItsMe = Usr_ItsMe (UsrDat->UsrCod);
|
||||
Frm_StartForm (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
Frm_LinkFormSubmit (ItsMe ? Txt_My_public_profile :
|
||||
Txt_Another_user_s_profile,
|
||||
"REC_NICK",NULL);
|
||||
HTM_BUTTON_Begin (ItsMe ? Txt_My_public_profile :
|
||||
Txt_Another_user_s_profile,
|
||||
"BT_LINK REC_NICK",
|
||||
NULL);
|
||||
}
|
||||
HTM_TxtF ("@%s",UsrDat->Nickname);
|
||||
if (PutFormLinks)
|
||||
{
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1617,11 +1617,11 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
Txt_Show_previous_X_clicks,
|
||||
Gbl.Stat.RowsPerPage);
|
||||
Frm_LinkFormSubmit (Gbl.Title,"TIT_TBL",NULL);
|
||||
HTM_BUTTON_Begin (Gbl.Title,"BT_LINK TIT_TBL",NULL);
|
||||
HTM_STRONG_Begin ();
|
||||
HTM_TxtF ("<%s",Txt_PAGES_Previous);
|
||||
HTM_STRONG_End ();
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
}
|
||||
HTM_TD_End ();
|
||||
if (FirstRow > 1)
|
||||
|
@ -1655,11 +1655,11 @@ static void Sta_ShowDetailedAccessesList (unsigned long NumRows,MYSQL_RES *mysql
|
|||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
Txt_Show_next_X_clicks,
|
||||
Gbl.Stat.RowsPerPage);
|
||||
Frm_LinkFormSubmit (Gbl.Title,"TIT_TBL",NULL);
|
||||
HTM_BUTTON_Begin (Gbl.Title,"BT_LINK TIT_TBL",NULL);
|
||||
HTM_STRONG_Begin ();
|
||||
HTM_TxtF ("%s>",Txt_PAGES_Next);
|
||||
HTM_STRONG_End ();
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
}
|
||||
HTM_TD_End ();
|
||||
if (LastRow < NumRows)
|
||||
|
@ -3779,9 +3779,9 @@ static void Sta_ShowNumHitsPerCourse (unsigned long NumRows,
|
|||
snprintf (Gbl.Title,sizeof (Gbl.Title),
|
||||
Txt_Go_to_X,
|
||||
Crs.FullName);
|
||||
Frm_LinkFormSubmit (Gbl.Title,"LOG",NULL);
|
||||
HTM_BUTTON_Begin (Gbl.Title,"BT_LINK LOG",NULL);
|
||||
HTM_Txt (Crs.ShrtName);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
}
|
||||
else
|
||||
HTM_Hyphen ();
|
||||
|
|
|
@ -260,13 +260,13 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
|
|||
Grp_PutParamWhichGrps ();
|
||||
Pag_PutHiddenParamPagNum (Pag_SURVEYS,Gbl.Svys.CurrentPage);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Frm_LinkFormSubmit (Txt_START_END_TIME_HELP[Order],"TIT_TBL",NULL);
|
||||
HTM_BUTTON_Begin (Txt_START_END_TIME_HELP[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Gbl.Svys.SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
HTM_Txt (Txt_START_END_TIME[Order]);
|
||||
if (Order == Gbl.Svys.SelectedOrder)
|
||||
HTM_U_End ();
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
|
||||
HTM_TH_End ();
|
||||
|
@ -528,11 +528,12 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
|
|||
Svy_PutHiddenParamSvyOrder ();
|
||||
Grp_PutParamWhichGrps ();
|
||||
Pag_PutHiddenParamPagNum (Pag_SURVEYS,Gbl.Svys.CurrentPage);
|
||||
Frm_LinkFormSubmit (Txt_View_survey,
|
||||
Svy.Status.Visible ? "ASG_TITLE" :
|
||||
"ASG_TITLE_LIGHT",NULL);
|
||||
HTM_BUTTON_Begin (Txt_View_survey,
|
||||
Svy.Status.Visible ? "BT_LINK ASG_TITLE" :
|
||||
"BT_LINK ASG_TITLE_LIGHT",
|
||||
NULL);
|
||||
HTM_Txt (Svy.Title);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
HTM_ARTICLE_End ();
|
||||
|
||||
|
|
|
@ -2833,7 +2833,7 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows,
|
|||
Dat_WriteParamsIniEndDates ();
|
||||
Tst_WriteParamEditQst ();
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Frm_LinkFormSubmit (Txt_TST_STR_ORDER_FULL[Order],"TIT_TBL",NULL);
|
||||
HTM_BUTTON_Begin (Txt_TST_STR_ORDER_FULL[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Gbl.Test.SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
}
|
||||
|
@ -2842,7 +2842,7 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows,
|
|||
{
|
||||
if (Order == Gbl.Test.SelectedOrder)
|
||||
HTM_U_End ();
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
|
|
@ -1730,11 +1730,11 @@ static void TL_WriteTopMessage (TL_TopMessage_t TopMessage,long UsrCod)
|
|||
/***** Show user's name inside form to go to user's public profile *****/
|
||||
Frm_StartFormUnique (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod);
|
||||
Frm_LinkFormSubmitUnique (ItsMe ? Txt_My_public_profile :
|
||||
Txt_Another_user_s_profile,
|
||||
"TL_TOP_PUBLISHER");
|
||||
HTM_BUTTON_Begin (ItsMe ? Txt_My_public_profile :
|
||||
Txt_Another_user_s_profile,
|
||||
"BT_LINK TL_TOP_PUBLISHER",NULL);
|
||||
HTM_Txt (UsrDat.FullName);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** Show action made *****/
|
||||
|
@ -1763,21 +1763,21 @@ static void TL_WriteAuthorNote (const struct UsrData *UsrDat)
|
|||
/***** Show user's name inside form to go to user's public profile *****/
|
||||
Frm_StartFormUnique (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
Frm_LinkFormSubmitUnique (ItsMe ? Txt_My_public_profile :
|
||||
Txt_Another_user_s_profile,
|
||||
"DAT_N_BOLD");
|
||||
HTM_BUTTON_Begin (ItsMe ? Txt_My_public_profile :
|
||||
Txt_Another_user_s_profile,
|
||||
"BT_LINK DAT_N_BOLD",NULL);
|
||||
HTM_Txt (UsrDat->FullName);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** Show user's nickname inside form to go to user's public profile *****/
|
||||
Frm_StartFormUnique (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
Frm_LinkFormSubmitUnique (ItsMe ? Txt_My_public_profile :
|
||||
Txt_Another_user_s_profile,
|
||||
"DAT_LIGHT");
|
||||
HTM_BUTTON_Begin (ItsMe ? Txt_My_public_profile :
|
||||
Txt_Another_user_s_profile,
|
||||
"BT_LINK DAT_LIGHT",NULL);
|
||||
HTM_TxtF (" @%s",UsrDat->Nickname);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
|
||||
HTM_DIV_End ();
|
||||
|
@ -1876,7 +1876,7 @@ static void TL_PutFormGoToAction (const struct TL_Note *SocNot)
|
|||
extern const char *The_ClassFormInBoxBold[The_NUM_THEMES];
|
||||
extern const char *Txt_TIMELINE_NOTE[TL_NUM_NOTE_TYPES];
|
||||
extern const char *Txt_not_available;
|
||||
char Class[64];
|
||||
char *Class;
|
||||
char *Anchor = NULL;
|
||||
const Act_Action_t TL_DefaultActions[TL_NUM_NOTE_TYPES] =
|
||||
{
|
||||
|
@ -1967,7 +1967,7 @@ static void TL_PutFormGoToAction (const struct TL_Note *SocNot)
|
|||
{
|
||||
HTM_DIV_Begin ("class=\"TL_FORM\"");
|
||||
|
||||
/***** Parameters depending on the type of note *****/
|
||||
/***** Start form with parameters depending on the type of note *****/
|
||||
switch (SocNot->NoteType)
|
||||
{
|
||||
case TL_NOTE_INS_DOC_PUB_FILE:
|
||||
|
@ -2034,14 +2034,17 @@ static void TL_PutFormGoToAction (const struct TL_Note *SocNot)
|
|||
return;
|
||||
}
|
||||
|
||||
/***** Link and end form *****/
|
||||
snprintf (Class,sizeof (Class),
|
||||
"%s ICO_HIGHLIGHT",
|
||||
The_ClassFormInBoxBold[Gbl.Prefs.Theme]);
|
||||
Frm_LinkFormSubmitUnique (Txt_TIMELINE_NOTE[SocNot->NoteType],Class);
|
||||
/***** Icon and link to go to action *****/
|
||||
if (asprintf (&Class,"BT_LINK %s ICO_HIGHLIGHT",
|
||||
The_ClassFormInBoxBold[Gbl.Prefs.Theme]) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
HTM_BUTTON_Begin (Txt_TIMELINE_NOTE[SocNot->NoteType],Class,NULL);
|
||||
Ico_PutIcon (TL_Icons[SocNot->NoteType],Txt_TIMELINE_NOTE[SocNot->NoteType],"CONTEXT_ICO_x16");
|
||||
HTM_TxtF (" %s",Txt_TIMELINE_NOTE[SocNot->NoteType]);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
free (Class);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
||||
HTM_DIV_End ();
|
||||
|
@ -3076,21 +3079,21 @@ static void TL_WriteAuthorComment (struct UsrData *UsrDat)
|
|||
/***** Show user's name inside form to go to user's public profile *****/
|
||||
Frm_StartFormUnique (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
Frm_LinkFormSubmitUnique (ItsMe ? Txt_My_public_profile :
|
||||
Txt_Another_user_s_profile,
|
||||
"DAT_BOLD");
|
||||
HTM_BUTTON_Begin (ItsMe ? Txt_My_public_profile :
|
||||
Txt_Another_user_s_profile,
|
||||
"BT_LINK DAT_BOLD",NULL);
|
||||
HTM_Txt (UsrDat->FullName);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** Show user's nickname inside form to go to user's public profile *****/
|
||||
Frm_StartFormUnique (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
Frm_LinkFormSubmitUnique (ItsMe ? Txt_My_public_profile :
|
||||
Txt_Another_user_s_profile,
|
||||
"DAT_LIGHT");
|
||||
HTM_BUTTON_Begin (ItsMe ? Txt_My_public_profile :
|
||||
Txt_Another_user_s_profile,
|
||||
"BT_LINK DAT_LIGHT",NULL);
|
||||
HTM_TxtF (" @%s",UsrDat->Nickname);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** End container *****/
|
||||
|
|
26
swad_user.c
26
swad_user.c
|
@ -2806,6 +2806,7 @@ void Usr_WriteLoggedUsrHead (void)
|
|||
extern const char *The_ClassUsr[The_NUM_THEMES];
|
||||
extern const char *Txt_Role;
|
||||
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
char *ClassLink;
|
||||
bool ShowPhoto;
|
||||
char PhotoURL[PATH_MAX + 1];
|
||||
unsigned NumAvailableRoles = Rol_GetNumAvailableRoles ();
|
||||
|
@ -2815,11 +2816,17 @@ void Usr_WriteLoggedUsrHead (void)
|
|||
/***** User's role *****/
|
||||
if (NumAvailableRoles == 1)
|
||||
{
|
||||
if (asprintf (&ClassLink,"BT_LINK %s",The_ClassUsr[Gbl.Prefs.Theme]) < 0)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
|
||||
Frm_StartForm (ActFrmRolSes);
|
||||
Frm_LinkFormSubmit (Txt_Role,The_ClassUsr[Gbl.Prefs.Theme],NULL);
|
||||
HTM_BUTTON_Begin (Txt_Role,ClassLink,NULL);
|
||||
HTM_Txt (Txt_ROLES_SINGUL_Abc[Gbl.Usrs.Me.Role.Logged][Gbl.Usrs.Me.UsrDat.Sex]);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
|
||||
free (ClassLink);
|
||||
|
||||
HTM_Colon ();
|
||||
}
|
||||
else
|
||||
|
@ -6283,7 +6290,7 @@ void Usr_ShowFormsToSelectUsrListType (void (*FuncParams) (void))
|
|||
static void Usr_FormToSelectUsrListType (void (*FuncParams) (void),
|
||||
Usr_ShowUsrsType_t ListType)
|
||||
{
|
||||
extern const char *The_ClassFormInBoxNoWrap[The_NUM_THEMES];
|
||||
extern const char *The_ClassFormLinkInBoxNoWrap[The_NUM_THEMES];
|
||||
extern const char *Txt_USR_LIST_TYPES[Usr_NUM_USR_LIST_TYPES];
|
||||
|
||||
/***** Begin form *****/
|
||||
|
@ -6296,13 +6303,13 @@ static void Usr_FormToSelectUsrListType (void (*FuncParams) (void),
|
|||
FuncParams ();
|
||||
|
||||
/***** Link and image *****/
|
||||
Frm_LinkFormSubmit (Txt_USR_LIST_TYPES[ListType],
|
||||
The_ClassFormInBoxNoWrap[Gbl.Prefs.Theme],
|
||||
Gbl.Action.Act == ActReqMsgUsr ? "CopyMessageToHiddenFields();" :
|
||||
NULL);
|
||||
HTM_BUTTON_Begin (Txt_USR_LIST_TYPES[ListType],
|
||||
The_ClassFormLinkInBoxNoWrap[Gbl.Prefs.Theme],
|
||||
Gbl.Action.Act == ActReqMsgUsr ? "CopyMessageToHiddenFields();" :
|
||||
NULL);
|
||||
Ico_PutIcon (Usr_IconsClassPhotoOrList[ListType],Txt_USR_LIST_TYPES[ListType],"ICO20x20");
|
||||
HTM_TxtF (" %s",Txt_USR_LIST_TYPES[ListType]);
|
||||
Frm_LinkFormEnd ();
|
||||
HTM_BUTTON_End ();
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
@ -9898,7 +9905,7 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows)
|
|||
}
|
||||
Frm_StartForm (NextAction);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||
Frm_LinkFormSubmit (UsrDat->FullName,"AUTHOR_TXT",NULL);
|
||||
HTM_BUTTON_Begin (UsrDat->FullName,"BT_LINK AUTHOR_TXT",NULL);
|
||||
|
||||
/***** Show user's ID *****/
|
||||
ID_WriteUsrIDs (UsrDat,NULL);
|
||||
|
@ -9916,6 +9923,7 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows)
|
|||
}
|
||||
|
||||
/***** End form *****/
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue