Version 18.32

This commit is contained in:
Antonio Cañas Vargas 2019-01-12 03:00:59 +01:00
parent 89bba44701
commit 7ffed945b6
57 changed files with 768 additions and 1038 deletions

View File

@ -1123,6 +1123,7 @@ a:hover /* Default ==> underlined */
.CONNECTED_LIST .CONNECTED_LIST
{ {
box-sizing:border-box; box-sizing:border-box;
width:100%;
margin-top:2px; margin-top:2px;
padding-top:2px; padding-top:2px;
border-style:solid; border-style:solid;
@ -1153,7 +1154,7 @@ a:hover /* Default ==> underlined */
} }
.CON_USR_WIDE .CON_USR_WIDE
{ {
width:320px; width:340px;
text-align:left; text-align:left;
vertical-align:middle; vertical-align:middle;
} }
@ -1166,7 +1167,7 @@ a:hover /* Default ==> underlined */
} }
.CON_NAME_WIDE .CON_NAME_WIDE
{ {
max-width:320px; max-width:340px;
white-space:nowrap; white-space:nowrap;
overflow:hidden; overflow:hidden;
text-overflow:ellipsis; text-overflow:ellipsis;
@ -1595,18 +1596,15 @@ a:hover /* Default ==> underlined */
text-align:center; text-align:center;
vertical-align:top; vertical-align:top;
} }
/* .CONTEXT_ICO_16x16
.CONTEXT_ICO
{ {
width:16px; width:16px;
height:16px; height:16px;
margin-top:-2px; margin-top:-2px;
vertical-align:middle; vertical-align:middle;
} }
*/ .CONTEXT_ICO_x16
.CONTEXT_ICO
{ {
/* width:16px; */
height:16px; height:16px;
margin-top:-2px; margin-top:-2px;
vertical-align:middle; vertical-align:middle;

View File

@ -498,8 +498,9 @@ static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID,
UsrDat->IDs.List[NumID].ID); UsrDat->IDs.List[NumID].ID);
/***** Put link *****/ /***** Put link *****/
Ico_PutIconLink ("check.svg",Txt_Confirm_ID,Txt_Confirm_ID, Frm_LinkFormSubmit (Txt_Confirm_ID,The_ClassFormBold[Gbl.Prefs.Theme],NULL);
The_ClassFormBold[Gbl.Prefs.Theme],NULL); Ico_PutIconWithText ("check.svg",Txt_Confirm_ID,Txt_Confirm_ID);
fprintf (Gbl.F.Out,"</a>");
/***** End form *****/ /***** End form *****/
Frm_EndForm (); Frm_EndForm ();

View File

@ -69,10 +69,9 @@ void QR_PutLinkToPrintQRCode (Act_Action_t Action,void (*FuncParams) ())
extern const char *Txt_QR_code; extern const char *Txt_QR_code;
/***** Link to print QR *****/ /***** Link to print QR *****/
Lay_PutContextualLink (Action,NULL,FuncParams, Lay_PutContextualLinkOnlyIcon (Action,NULL,FuncParams,
"qrcode.svg", "qrcode.svg",
Txt_QR_code,NULL, Txt_QR_code);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -97,10 +97,10 @@ void Acc_PutLinkToCreateAccount (void)
{ {
extern const char *Txt_Create_account; extern const char *Txt_Create_account;
Lay_PutContextualLink (ActFrmMyAcc,NULL,NULL, Lay_PutContextualLinkIconText (ActFrmMyAcc,NULL,NULL,
"at.svg", "at.svg",
Txt_Create_account,Txt_Create_account, Txt_Create_account,
NULL); Txt_Create_account);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -532,10 +532,10 @@ void Acc_PutLinkToRemoveMyAccount (void)
extern const char *Txt_Remove_account; extern const char *Txt_Remove_account;
if (Acc_CheckIfICanEliminateAccount (Gbl.Usrs.Me.UsrDat.UsrCod)) if (Acc_CheckIfICanEliminateAccount (Gbl.Usrs.Me.UsrDat.UsrCod))
Lay_PutContextualLink (ActReqRemMyAcc,NULL,Acc_PutParamsToRemoveMyAccount, Lay_PutContextualLinkOnlyIcon (ActReqRemMyAcc,NULL,
"trash.svg", Acc_PutParamsToRemoveMyAccount,
Txt_Remove_account,NULL, "trash.svg",
NULL); Txt_Remove_account);
} }
static void Acc_PutParamsToRemoveMyAccount (void) static void Acc_PutParamsToRemoveMyAccount (void)
@ -1213,10 +1213,9 @@ void Acc_PutIconToChangeUsrAccount (void)
/***** Link for changing the account *****/ /***** Link for changing the account *****/
if (ItsMe) if (ItsMe)
Lay_PutContextualLink (ActFrmMyAcc,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActFrmMyAcc,NULL,NULL,
"at.svg", "at.svg",
Txt_Change_account,NULL, Txt_Change_account);
NULL);
else // Not me else // Not me
if (Usr_ICanEditOtherUsr (Gbl.Record.UsrDat)) if (Usr_ICanEditOtherUsr (Gbl.Record.UsrDat))
{ {
@ -1233,9 +1232,9 @@ void Acc_PutIconToChangeUsrAccount (void)
NextAction = ActFrmAccOth; NextAction = ActFrmAccOth;
break; break;
} }
Lay_PutContextualLink (NextAction,NULL,Rec_PutParamUsrCodEncrypted, Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
"at.svg", Rec_PutParamUsrCodEncrypted,
Txt_Change_account,NULL, "at.svg",
NULL); Txt_Change_account);
} }
} }

View File

@ -199,14 +199,8 @@ static void Agd_ShowFormToSelPast__FutureEvents (void)
Gbl.Agenda.HiddenVisiblEvents, Gbl.Agenda.HiddenVisiblEvents,
Gbl.Agenda.CurrentPage, Gbl.Agenda.CurrentPage,
-1L); -1L);
Ico_PutPrefIconLink (Image[PstFut],
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\"" Txt_AGENDA_PAST___FUTURE_EVENTS[PstFut]);
" alt=\"%s\" title=\"%s\" class=\"ICOx25\""
" style=\"margin:0 auto;\" />",
Gbl.Prefs.URLIcons,
Image[PstFut],
Txt_AGENDA_PAST___FUTURE_EVENTS[PstFut],
Txt_AGENDA_PAST___FUTURE_EVENTS[PstFut]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
@ -241,14 +235,8 @@ static void Agd_ShowFormToSelPrivatPublicEvents (void)
Gbl.Agenda.HiddenVisiblEvents, Gbl.Agenda.HiddenVisiblEvents,
Gbl.Agenda.CurrentPage, Gbl.Agenda.CurrentPage,
-1L); -1L);
Ico_PutPrefIconLink (Image[PrvPub],
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\"" Txt_AGENDA_PRIVAT_PUBLIC_EVENTS[PrvPub]);
" alt=\"%s\" title=\"%s\" class=\"ICOx25\""
" style=\"margin:0 auto;\" />",
Gbl.Prefs.URLIcons,
Image[PrvPub],
Txt_AGENDA_PRIVAT_PUBLIC_EVENTS[PrvPub],
Txt_AGENDA_PRIVAT_PUBLIC_EVENTS[PrvPub]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
@ -283,14 +271,8 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (void)
Gbl.Agenda.HiddenVisiblEvents ^ (1 << HidVis), // Toggle Gbl.Agenda.HiddenVisiblEvents ^ (1 << HidVis), // Toggle
Gbl.Agenda.CurrentPage, Gbl.Agenda.CurrentPage,
-1L); -1L);
Ico_PutPrefIconLink (Image[HidVis],
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\"" Txt_AGENDA_HIDDEN_VISIBL_EVENTS[HidVis]);
" alt=\"%s\" title=\"%s\" class=\"ICOx25\""
" style=\"margin:0 auto;\" />",
Gbl.Prefs.URLIcons,
Image[HidVis],
Txt_AGENDA_HIDDEN_VISIBL_EVENTS[HidVis],
Txt_AGENDA_HIDDEN_VISIBL_EVENTS[HidVis]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
@ -686,26 +668,23 @@ static void Agd_PutIconsOtherPublicAgenda (void)
/***** Button to view user's public profile *****/ /***** Button to view user's public profile *****/
if (Pri_ShowingIsAllowed (Gbl.Usrs.Other.UsrDat.ProfileVisibility, if (Pri_ShowingIsAllowed (Gbl.Usrs.Other.UsrDat.ProfileVisibility,
&Gbl.Usrs.Other.UsrDat)) &Gbl.Usrs.Other.UsrDat))
Lay_PutContextualLink (ActSeeOthPubPrf,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeOthPubPrf,NULL,
Usr_PutParamOtherUsrCodEncrypted, Usr_PutParamOtherUsrCodEncrypted,
"user.svg", "user.svg",
Txt_Another_user_s_profile,NULL, Txt_Another_user_s_profile);
NULL);
/***** Button to view user's record card *****/ /***** Button to view user's record card *****/
if (Usr_CheckIfICanViewRecordStd (&Gbl.Usrs.Other.UsrDat)) if (Usr_CheckIfICanViewRecordStd (&Gbl.Usrs.Other.UsrDat))
/* View student's records: common record card and course record card */ /* View student's records: common record card and course record card */
Lay_PutContextualLink (ActSeeRecOneStd,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeRecOneStd,NULL,
Usr_PutParamOtherUsrCodEncrypted, Usr_PutParamOtherUsrCodEncrypted,
"card.svg", "card.svg",
Txt_View_record_for_this_course,NULL, Txt_View_record_for_this_course);
NULL);
else if (Usr_CheckIfICanViewRecordTch (&Gbl.Usrs.Other.UsrDat)) else if (Usr_CheckIfICanViewRecordTch (&Gbl.Usrs.Other.UsrDat))
Lay_PutContextualLink (ActSeeRecOneTch,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeRecOneTch,NULL,
Usr_PutParamOtherUsrCodEncrypted, Usr_PutParamOtherUsrCodEncrypted,
"card.svg", "card.svg",
Txt_View_record_and_office_hours,NULL, Txt_View_record_and_office_hours);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -865,15 +844,15 @@ static void Agd_PutFormsToRemEditOneEvent (struct AgendaEvent *AgdEvent)
/***** Put form to make event public/private *****/ /***** Put form to make event public/private *****/
if (AgdEvent->Public) if (AgdEvent->Public)
Lay_PutContextualLink (ActPrvEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda, Lay_PutContextualLinkOnlyIcon (ActPrvEvtMyAgd,NULL,
"lock-open.svg", Agd_PutCurrentParamsMyAgenda,
Txt_Event_visible_to_the_users_of_your_courses_click_to_make_it_private,NULL, "lock-open.svg",
NULL); Txt_Event_visible_to_the_users_of_your_courses_click_to_make_it_private);
else else
Lay_PutContextualLink (ActPubEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda, Lay_PutContextualLinkOnlyIcon (ActPubEvtMyAgd,NULL,
"lock.svg", Agd_PutCurrentParamsMyAgenda,
Txt_Event_private_click_to_make_it_visible_to_the_users_of_your_courses,NULL, "lock.svg",
NULL); Txt_Event_private_click_to_make_it_visible_to_the_users_of_your_courses);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -316,16 +316,14 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status,
switch (Status) switch (Status)
{ {
case Ann_ACTIVE_ANNOUNCEMENT: case Ann_ACTIVE_ANNOUNCEMENT:
Lay_PutContextualLink (ActHidAnn,NULL,Ann_PutParams, Lay_PutContextualLinkOnlyIcon (ActHidAnn,NULL,Ann_PutParams,
"eye.svg", "eye.svg",
Txt_NOTICE_Active_Mark_as_obsolete,NULL, Txt_NOTICE_Active_Mark_as_obsolete);
NULL);
break; break;
case Ann_OBSOLETE_ANNOUNCEMENT: case Ann_OBSOLETE_ANNOUNCEMENT:
Lay_PutContextualLink (ActRevAnn,NULL,Ann_PutParams, Lay_PutContextualLinkOnlyIcon (ActRevAnn,NULL,Ann_PutParams,
"eye-slash.svg", "eye-slash.svg",
Txt_NOTICE_Obsolete_Mark_as_active,NULL, Txt_NOTICE_Obsolete_Mark_as_active);
NULL);
break; break;
} }
} }
@ -360,10 +358,10 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status,
} }
else else
/***** Put form to mark announcement as seen *****/ /***** Put form to mark announcement as seen *****/
Lay_PutContextualLink (ActAnnSee,NULL,Ann_PutParams, Lay_PutContextualLinkIconText (ActAnnSee,NULL,Ann_PutParams,
"trash.svg", "trash.svg",
Txt_Do_not_show_again,Txt_Do_not_show_again, Txt_Do_not_show_again,
NULL); Txt_Do_not_show_again);
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");

View File

@ -192,7 +192,6 @@ static void Asg_PutHeadForSeeing (bool PrintView)
extern const char *Txt_START_END_TIME_HELP[Dat_NUM_START_END_TIME]; extern const char *Txt_START_END_TIME_HELP[Dat_NUM_START_END_TIME];
extern const char *Txt_START_END_TIME[Dat_NUM_START_END_TIME]; extern const char *Txt_START_END_TIME[Dat_NUM_START_END_TIME];
extern const char *Txt_Assignment; extern const char *Txt_Assignment;
extern const char *Txt_Upload_files_QUESTION;
extern const char *Txt_Folder; extern const char *Txt_Folder;
Dat_StartEndTime_t Order; Dat_StartEndTime_t Order;
@ -226,9 +225,6 @@ static void Asg_PutHeadForSeeing (bool PrintView)
fprintf (Gbl.F.Out,"</th>"); fprintf (Gbl.F.Out,"</th>");
} }
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE\">" fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE\">"
"%s"
"</th>"
"<th class=\"CENTER_MIDDLE\">"
"%s" "%s"
"</th>" "</th>"
"<th class=\"LEFT_MIDDLE\">" "<th class=\"LEFT_MIDDLE\">"
@ -236,7 +232,6 @@ static void Asg_PutHeadForSeeing (bool PrintView)
"</th>" "</th>"
"</tr>", "</tr>",
Txt_Assignment, Txt_Assignment,
Txt_Upload_files_QUESTION,
Txt_Folder); Txt_Folder);
} }
@ -347,9 +342,6 @@ void Asg_PrintOneAssignment (void)
static void Asg_ShowOneAssignment (long AsgCod,bool PrintView) static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
{ {
extern const char *Txt_Today; extern const char *Txt_Today;
extern const char *Txt_ASSIGNMENT_TYPES[Asg_NUM_TYPES_SEND_WORK];
extern const char *Txt_Yes;
extern const char *Txt_No;
static unsigned UniqueId = 0; static unsigned UniqueId = 0;
struct Assignment Asg; struct Assignment Asg;
char Txt[Cns_MAX_BYTES_TEXT + 1]; char Txt[Cns_MAX_BYTES_TEXT + 1];
@ -420,25 +412,6 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
Asg.Title); Asg.Title);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/* Send work? */
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP",
(Asg.SendWork == Asg_SEND_WORK) ? "DAT_N" :
"DAT");
if (!PrintView)
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">"
"<img src=\"%s/file.svg\""
" alt=\"%s\" title=\"%s\" class=\"%sICO16x16\" />"
"<br />%s"
"</td>",
Gbl.Prefs.URLIcons,
Txt_ASSIGNMENT_TYPES[Asg.SendWork],
Txt_ASSIGNMENT_TYPES[Asg.SendWork],
(Asg.SendWork == Asg_SEND_WORK) ? "" :
"ICO_HIDDEN ",
(Asg.SendWork == Asg_SEND_WORK) ? Txt_Yes :
Txt_No);
/* Assignment folder */ /* Assignment folder */
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP"); fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP");
if (!PrintView) if (!PrintView)
@ -466,7 +439,7 @@ static void Asg_ShowOneAssignment (long AsgCod,bool PrintView)
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
fprintf (Gbl.F.Out,"<td colspan=\"3\" class=\"LEFT_TOP"); fprintf (Gbl.F.Out,"<td colspan=\"2\" class=\"LEFT_TOP");
if (!PrintView) if (!PrintView)
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd); fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">"); fprintf (Gbl.F.Out,"\">");
@ -524,21 +497,13 @@ static void Asg_WriteAssignmentFolder (struct Assignment *Asg,bool PrintView)
snprintf (Gbl.Title,sizeof (Gbl.Title), snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Upload_file_or_create_folder_in_FOLDER, Txt_Upload_file_or_create_folder_in_FOLDER,
Asg->Folder); Asg->Folder);
fprintf (Gbl.F.Out,"<input type=\"image\"" Ico_PutIconLink ("folder-open-green.svg",Gbl.Title);
" src=\"%s/folder-open-plus16x16.gif\""
" alt=\"%s\" title=\"%s\" class=\"ICO20x20\" />",
Gbl.Prefs.URLIcons,
Gbl.Title,
Gbl.Title);
Frm_EndForm (); Frm_EndForm ();
} }
else // I can't send files to this assignment folder else // Sending of files disabled
fprintf (Gbl.F.Out,"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\"" Ico_PutIconOff (ICanSendFiles ? "folder-open-green.svg" :
" class=\"ICO20x20\" />", "folder-red.svg",
Gbl.Prefs.URLIcons, Txt_Folder);
ICanSendFiles ? "folder-open16x16.gif" :
"folder-closed16x16.gif",
Txt_Folder,Txt_Folder);
/***** Folder name *****/ /***** Folder name *****/
fprintf (Gbl.F.Out,"%s",Asg->Folder); fprintf (Gbl.F.Out,"%s",Asg->Folder);

View File

@ -535,10 +535,10 @@ static void Att_PutFormToListMyAttendance (void)
{ {
extern const char *Txt_Attendance_list; extern const char *Txt_Attendance_list;
Lay_PutContextualLink (ActSeeLstMyAtt,NULL,NULL, Lay_PutContextualLinkIconText (ActSeeLstMyAtt,NULL,NULL,
"list-ol.svg", "list-ol.svg",
Txt_Attendance_list,Txt_Attendance_list, Txt_Attendance_list,
NULL); Txt_Attendance_list);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -549,10 +549,11 @@ static void Att_PutFormToListStdsAttendance (void)
{ {
extern const char *Txt_Attendance_list; extern const char *Txt_Attendance_list;
Lay_PutContextualLink (ActReqLstStdAtt,NULL,Att_PutFormToListStdsParams, Lay_PutContextualLinkIconText (ActReqLstStdAtt,NULL,
"list-ol.svg", Att_PutFormToListStdsParams,
Txt_Attendance_list,Txt_Attendance_list, "list-ol.svg",
NULL); Txt_Attendance_list,
Txt_Attendance_list);
} }
static void Att_PutFormToListStdsParams (void) static void Att_PutFormToListStdsParams (void)

View File

@ -371,10 +371,9 @@ void Ban_PutIconToViewBanners (void)
{ {
extern const char *Txt_Banners; extern const char *Txt_Banners;
Lay_PutContextualLink (ActSeeBan,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeBan,NULL,NULL,
"flag.svg", "flag.svg",
Txt_Banners,NULL, Txt_Banners);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -415,15 +414,10 @@ static void Ban_ListBannersForEdition (void)
Frm_StartForm (Ban->Hidden ? ActShoBan : Frm_StartForm (Ban->Hidden ? ActShoBan :
ActHidBan); ActHidBan);
Ban_PutParamBanCod (Ban->BanCod); Ban_PutParamBanCod (Ban->BanCod);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\"" Ico_PutIconLink (Ban->Hidden ? "eye-slash.svg" :
" alt=\"%s\" title=\"%s\" class=\"ICO_HIGHLIGHT ICO16x16\" />", "eye.svg",
Gbl.Prefs.URLIcons, Ban->Hidden ? Txt_Show :
Ban->Hidden ? "eye-slash.svg" : Txt_Hide);
"eye.svg",
Ban->Hidden ? Txt_Show :
Txt_Hide,
Ban->Hidden ? Txt_Show :
Txt_Hide);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");

View File

@ -148,29 +148,23 @@ static void Box_StartBoxInternal (const char *Width,const char *Title,
fprintf (Gbl.F.Out,"<div class=\"FRAME_ICO_RIGHT\">"); fprintf (Gbl.F.Out,"<div class=\"FRAME_ICO_RIGHT\">");
if (HelpLink) // Link to help if (HelpLink) // Link to help
fprintf (Gbl.F.Out,"<a href=\"%s%s\" target=\"_blank\">" {
"<div class=\"CONTEXT_OPT HLP_HIGHLIGHT\">" fprintf (Gbl.F.Out,"<a href=\"%s%s\" target=\"_blank\">",
"<img src=\"%s/question.svg\"" Hlp_WIKI,HelpLink);
" alt=\"%s\" title=\"%s\"" Ico_PutDivIcon ("CONTEXT_OPT HLP_HIGHLIGHT",
" class=\"CONTEXT_ICO\" />" "question.svg",Txt_Help);
"</div>" fprintf (Gbl.F.Out,"</a>");
"</a>", }
Hlp_WIKI,HelpLink,
Gbl.Prefs.URLIcons,
Txt_Help,Txt_Help);
if (Closable == Box_CLOSABLE) // Icon to close the box if (Closable == Box_CLOSABLE) // Icon to close the box
{
fprintf (Gbl.F.Out,"<a href=\"\"" fprintf (Gbl.F.Out,"<a href=\"\""
" onclick=\"toggleDisplay('%s');return false;\" />" " onclick=\"toggleDisplay('%s');return false;\" />",
"<div class=\"CONTEXT_OPT HLP_HIGHLIGHT\">" IdFrame);
"<img src=\"%s/close.svg\"" Ico_PutDivIcon ("CONTEXT_OPT HLP_HIGHLIGHT",
" alt=\"%s\" title=\"%s\"" "close.svg",Txt_Close);
" class=\"CONTEXT_ICO\" />" fprintf (Gbl.F.Out,"</a>");
"</div>" }
"</a>",
IdFrame,
Gbl.Prefs.URLIcons,
Txt_Close,Txt_Close);
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");

View File

@ -89,7 +89,7 @@ void Cal_PutIconsToSelectFirstDayOfWeek (void)
Box_StartBox (NULL,Txt_Calendar,Cal_PutIconsFirstDayOfWeek, Box_StartBox (NULL,Txt_Calendar,Cal_PutIconsFirstDayOfWeek,
Hlp_PROFILE_Preferences_calendar,Box_NOT_CLOSABLE); Hlp_PROFILE_Preferences_calendar,Box_NOT_CLOSABLE);
Cal_ShowFormToSelFirstDayOfWeek (ActChg1stDay,NULL,"ICOx25"); Cal_ShowFormToSelFirstDayOfWeek (ActChg1stDay,NULL);
Box_EndBox (); Box_EndBox ();
} }
@ -108,12 +108,12 @@ static void Cal_PutIconsFirstDayOfWeek (void)
/************** Show form to select the first day of the week ****************/ /************** Show form to select the first day of the week ****************/
/*****************************************************************************/ /*****************************************************************************/
void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) (), void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) ())
const char *ClassIcon)
{ {
extern const char *Txt_First_day_of_the_week; extern const char *Txt_First_day_of_the_week;
extern const char *Txt_DAYS_SMALL[7]; extern const char *Txt_DAYS_SMALL[7];
unsigned FirstDayOfWeek; unsigned FirstDayOfWeek;
char Icon[32 + 1];
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">"); fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
for (FirstDayOfWeek = 0; // Monday for (FirstDayOfWeek = 0; // Monday
@ -128,13 +128,13 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) (),
Par_PutHiddenParamUnsigned ("FirstDayOfWeek",FirstDayOfWeek); Par_PutHiddenParamUnsigned ("FirstDayOfWeek",FirstDayOfWeek);
if (FuncParams) // Extra parameters depending on the action if (FuncParams) // Extra parameters depending on the action
FuncParams (); FuncParams ();
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/first-day-of-week-%u.png\"" snprintf (Gbl.Title,sizeof (Gbl.Title),
" alt=\"%s\" title=\"%s: %s\" class=\"%s\" />", "%s: %s",
Gbl.Prefs.URLIcons, Txt_First_day_of_the_week,Txt_DAYS_SMALL[FirstDayOfWeek]);
FirstDayOfWeek, snprintf (Icon,sizeof (Icon),
Txt_DAYS_SMALL[FirstDayOfWeek], "first-day-of-week-%u.png",
Txt_First_day_of_the_week,Txt_DAYS_SMALL[FirstDayOfWeek], FirstDayOfWeek);
ClassIcon); Ico_PutPrefIconLink (Icon,Gbl.Title);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
@ -324,7 +324,7 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
/***** Draw several months *****/ /***** Draw several months *****/
/* Show form to change first day of week */ /* Show form to change first day of week */
if (!PrintView) if (!PrintView)
Cal_ShowFormToSelFirstDayOfWeek (ActionChangeCalendar1stDay,NULL,"ICOx25"); Cal_ShowFormToSelFirstDayOfWeek (ActionChangeCalendar1stDay,NULL);
/* JavaScript will write HTML here */ /* JavaScript will write HTML here */
fprintf (Gbl.F.Out,"<div id=\"calendar\">" fprintf (Gbl.F.Out,"<div id=\"calendar\">"
@ -375,12 +375,11 @@ static void Cal_PutIconToPrintCalendarIns (void)
Ico_PutContextualIconToPrint (ActPrnCalIns,NULL); Ico_PutContextualIconToPrint (ActPrnCalIns,NULL);
/***** View holidays *****/ /***** View holidays *****/
if (Gbl.Hlds.Num || // There are holidays if (Gbl.Hlds.Num || // There are holidays
Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) // Institution admin or system admin Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) // Institution admin or system admin
Lay_PutContextualLink (ActSeeHld,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeHld,NULL,NULL,
"holiday.png", "holiday.png",
Txt_Holidays,NULL, Txt_Holidays);
NULL);
} }
static void Cal_PutIconToPrintCalendarCtr (void) static void Cal_PutIconToPrintCalendarCtr (void)

View File

@ -44,8 +44,7 @@
/*****************************************************************************/ /*****************************************************************************/
void Cal_PutIconsToSelectFirstDayOfWeek (void); void Cal_PutIconsToSelectFirstDayOfWeek (void);
void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) (), void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) ());
const char *ClassIcon);
void Cal_ChangeFirstDayOfWeek (void); void Cal_ChangeFirstDayOfWeek (void);
unsigned Cal_GetFirstDayOfWeekFromStr (const char *Str); unsigned Cal_GetFirstDayOfWeekFromStr (const char *Str);

View File

@ -722,11 +722,10 @@ static void Ctr_PutIconToChangePhoto (void)
(unsigned) Gbl.CurrentCtr.Ctr.CtrCod, (unsigned) Gbl.CurrentCtr.Ctr.CtrCod,
(unsigned) Gbl.CurrentCtr.Ctr.CtrCod); (unsigned) Gbl.CurrentCtr.Ctr.CtrCod);
PhotoExists = Fil_CheckIfPathExists (PathPhoto); PhotoExists = Fil_CheckIfPathExists (PathPhoto);
Lay_PutContextualLink (ActReqCtrPho,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActReqCtrPho,NULL,NULL,
"camera.svg", "camera.svg",
PhotoExists ? Txt_Change_photo : PhotoExists ? Txt_Change_photo :
Txt_Upload_photo,NULL, Txt_Upload_photo);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1034,10 +1033,9 @@ void Ctr_PutIconToViewCentres (void)
{ {
extern const char *Txt_Centres; extern const char *Txt_Centres;
Lay_PutContextualLink (ActSeeCtr,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeCtr,NULL,NULL,
"building.svg", "building.svg",
Txt_Centres,NULL, Txt_Centres);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -346,6 +346,8 @@ Buenos d
// TODO: Un administrador de centro ahora no tiene permisos para editar horario asignatura, pero le sale el icono de editar // TODO: Un administrador de centro ahora no tiene permisos para editar horario asignatura, pero le sale el icono de editar
// O le damos permisos o quitamos el icono de editar. Comprobar para admin. de titulaciones. // O le damos permisos o quitamos el icono de editar. Comprobar para admin. de titulaciones.
// TODO: Chequear todas las directivas <label>
/*****************************************************************************/ /*****************************************************************************/
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
@ -365,10 +367,11 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 18.31.6 (2019-01-11)" #define Log_PLATFORM_VERSION "SWAD 18.32 (2019-01-12)"
#define CSS_FILE "swad18.31.css" #define CSS_FILE "swad18.32.css"
#define JS_FILE "swad17.17.1.js" #define JS_FILE "swad17.17.1.js"
/* /*
Version 18.32: Jan 12, 2019 Code refactoring related to icons. (239311 lines)
Version 18.31.6: Jan 11, 2019 Fixed bug in user administration. (239587 lines) Version 18.31.6: Jan 11, 2019 Fixed bug in user administration. (239587 lines)
Version 18.31.5: Jan 11, 2019 Fixed bug in link to my courses. (239583 lines) Version 18.31.5: Jan 11, 2019 Fixed bug in link to my courses. (239583 lines)
Version 18.31.4: Jan 11, 2019 Option for last clicks is moved to analytics tab. (239587 lines) Version 18.31.4: Jan 11, 2019 Option for last clicks is moved to analytics tab. (239587 lines)

View File

@ -269,10 +269,9 @@ void Cla_PutIconToViewClassrooms (void)
{ {
extern const char *Txt_Classrooms; extern const char *Txt_Classrooms;
Lay_PutContextualLink (ActSeeCla,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeCla,NULL,NULL,
"classroom.svg", "classroom.svg",
Txt_Classrooms,NULL, Txt_Classrooms);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1001,10 +1001,9 @@ static void Cty_PutIconToViewCountries (void)
{ {
extern const char *Txt_Countries; extern const char *Txt_Countries;
Lay_PutContextualLink (ActSeeCty,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeCty,NULL,NULL,
"globe.svg", "globe.svg",
Txt_Countries,NULL, Txt_Countries);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -571,7 +571,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
ClassNormal,NULL); ClassNormal,NULL);
fprintf (Gbl.F.Out,"<img src=\"%s/sitemap.svg\"" fprintf (Gbl.F.Out,"<img src=\"%s/sitemap.svg\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />&nbsp;%s</a>", " class=\"ICO16x16\" />&nbsp;%s</a>",
Gbl.Prefs.URLIcons, Gbl.Prefs.URLIcons,
Txt_System, Txt_System,
Txt_System, Txt_System,
@ -609,7 +609,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
/* Country map */ /* Country map */
fprintf (Gbl.F.Out,"<img src=\"%s/%s/%s/%s.png\"" fprintf (Gbl.F.Out,"<img src=\"%s/%s/%s/%s.png\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />&nbsp;%s</a>", " class=\"ICO16x16\" />&nbsp;%s</a>",
Gbl.Prefs.URLIcons,Cfg_ICON_FOLDER_COUNTRIES, Gbl.Prefs.URLIcons,Cfg_ICON_FOLDER_COUNTRIES,
Cty.Alpha2, Cty.Alpha2,
Cty.Alpha2, Cty.Alpha2,
@ -647,7 +647,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
Frm_LinkFormSubmit (Act_GetActionTextFromDB (Act_GetActCod (ActSeeInsInf),ActTxt), Frm_LinkFormSubmit (Act_GetActionTextFromDB (Act_GetActCod (ActSeeInsInf),ActTxt),
Highlight ? ClassHighlight : Highlight ? ClassHighlight :
ClassNormal,NULL); ClassNormal,NULL);
Log_DrawLogo (Sco_SCOPE_INS,Ins.InsCod,Ins.ShrtName,20,NULL,true); Log_DrawLogo (Sco_SCOPE_INS,Ins.InsCod,Ins.ShrtName,16,NULL,true);
fprintf (Gbl.F.Out,"&nbsp;%s</a>",Ins.FullName); fprintf (Gbl.F.Out,"&nbsp;%s</a>",Ins.FullName);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</li>"); fprintf (Gbl.F.Out,"</li>");
@ -680,7 +680,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
Frm_LinkFormSubmit (Act_GetActionTextFromDB (Act_GetActCod (ActSeeCtrInf),ActTxt), Frm_LinkFormSubmit (Act_GetActionTextFromDB (Act_GetActCod (ActSeeCtrInf),ActTxt),
Highlight ? ClassHighlight : Highlight ? ClassHighlight :
ClassNormal,NULL); ClassNormal,NULL);
Log_DrawLogo (Sco_SCOPE_CTR,Ctr.CtrCod,Ctr.ShrtName,20,NULL,true); Log_DrawLogo (Sco_SCOPE_CTR,Ctr.CtrCod,Ctr.ShrtName,16,NULL,true);
fprintf (Gbl.F.Out,"&nbsp;%s</a>",Ctr.FullName); fprintf (Gbl.F.Out,"&nbsp;%s</a>",Ctr.FullName);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</li>"); fprintf (Gbl.F.Out,"</li>");
@ -713,7 +713,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
Frm_LinkFormSubmit (Act_GetActionTextFromDB (Act_GetActCod (ActSeeDegInf),ActTxt), Frm_LinkFormSubmit (Act_GetActionTextFromDB (Act_GetActCod (ActSeeDegInf),ActTxt),
Highlight ? ClassHighlight : Highlight ? ClassHighlight :
ClassNormal,NULL); ClassNormal,NULL);
Log_DrawLogo (Sco_SCOPE_DEG,Deg.DegCod,Deg.ShrtName,20,NULL,true); Log_DrawLogo (Sco_SCOPE_DEG,Deg.DegCod,Deg.ShrtName,16,NULL,true);
fprintf (Gbl.F.Out,"&nbsp;%s</a>",Deg.FullName); fprintf (Gbl.F.Out,"&nbsp;%s</a>",Deg.FullName);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</li>"); fprintf (Gbl.F.Out,"</li>");
@ -1388,10 +1388,9 @@ static void Crs_PutIconToViewCourses (void)
{ {
extern const char *Txt_Courses; extern const char *Txt_Courses;
Lay_PutContextualLink (ActSeeCrs,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeCrs,NULL,NULL,
"list-ol.svg", "list-ol.svg",
Txt_Courses,NULL, Txt_Courses);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2962,16 +2961,15 @@ static void Crs_PutIconToSearchCourses (void)
extern const char *Txt_Search_courses; extern const char *Txt_Search_courses;
/***** Put form to search / select courses *****/ /***** Put form to search / select courses *****/
Lay_PutContextualLink ( Gbl.CurrentCrs.Crs.CrsCod > 0 ? ActCrsReqSch : Lay_PutContextualLinkOnlyIcon ( Gbl.CurrentCrs.Crs.CrsCod > 0 ? ActCrsReqSch :
(Gbl.CurrentDeg.Deg.DegCod > 0 ? ActDegReqSch : (Gbl.CurrentDeg.Deg.DegCod > 0 ? ActDegReqSch :
(Gbl.CurrentCtr.Ctr.CtrCod > 0 ? ActCtrReqSch : (Gbl.CurrentCtr.Ctr.CtrCod > 0 ? ActCtrReqSch :
(Gbl.CurrentIns.Ins.InsCod > 0 ? ActInsReqSch : (Gbl.CurrentIns.Ins.InsCod > 0 ? ActInsReqSch :
(Gbl.CurrentCty.Cty.CtyCod > 0 ? ActCtyReqSch : (Gbl.CurrentCty.Cty.CtyCod > 0 ? ActCtyReqSch :
ActSysReqSch)))), ActSysReqSch)))),
NULL,Sch_PutLinkToSearchCoursesParams, NULL,Sch_PutLinkToSearchCoursesParams,
"search.svg", "search.svg",
Txt_Search_courses,NULL, Txt_Search_courses);
NULL);
} }
static void Sch_PutLinkToSearchCoursesParams (void) // TODO: Move to search module static void Sch_PutLinkToSearchCoursesParams (void) // TODO: Move to search module
@ -3017,10 +3015,9 @@ void Crs_PutIconToSelectMyCourses (void)
if (Gbl.Usrs.Me.Logged) // I am logged if (Gbl.Usrs.Me.Logged) // I am logged
/***** Put icon with link *****/ /***** Put icon with link *****/
Lay_PutContextualLink (ActMyCrs,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActMyCrs,NULL,NULL,
"sitemap.svg", "sitemap.svg",
Txt_My_courses,NULL, Txt_My_courses);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3390,10 +3387,10 @@ void Crs_PutLinkToRemoveOldCrss (void)
extern const char *Txt_Eliminate_old_courses; extern const char *Txt_Eliminate_old_courses;
/***** Put form to remove old courses *****/ /***** Put form to remove old courses *****/
Lay_PutContextualLink (ActReqRemOldCrs,NULL,NULL, Lay_PutContextualLinkIconText (ActReqRemOldCrs,NULL,NULL,
"trash.svg", "trash.svg",
Txt_Eliminate_old_courses,Txt_Eliminate_old_courses, Txt_Eliminate_old_courses,
NULL); Txt_Eliminate_old_courses);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1418,10 +1418,9 @@ void Deg_PutIconToViewDegrees (void)
{ {
extern const char *Txt_Degrees; extern const char *Txt_Degrees;
Lay_PutContextualLink (ActSeeDeg,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeDeg,NULL,NULL,
"graduation-cap.svg", "graduation-cap.svg",
Txt_Degrees,NULL, Txt_Degrees);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -288,10 +288,9 @@ void DT_PutIconToViewDegreeTypes (void)
{ {
extern const char *Txt_Types_of_degree; extern const char *Txt_Types_of_degree;
Lay_PutContextualLink (ActSeeDegTyp,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeDegTyp,NULL,NULL,
"sitemap.svg", "sitemap.svg",
Txt_Types_of_degree,NULL, Txt_Types_of_degree);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -120,10 +120,10 @@ void Dup_PutLinkToListDupUsrs (void)
extern const char *Txt_Duplicate_USERS; extern const char *Txt_Duplicate_USERS;
/***** Put form to remove old users *****/ /***** Put form to remove old users *****/
Lay_PutContextualLink (ActLstDupUsr,NULL,NULL, Lay_PutContextualLinkIconText (ActLstDupUsr,NULL,NULL,
"user-friends.svg", "user-friends.svg",
Txt_Duplicate_USERS,Txt_Duplicate_USERS, Txt_Duplicate_USERS,
NULL); Txt_Duplicate_USERS);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -198,10 +198,10 @@ void Enr_PutLinkToRequestSignUp (void)
extern const char *Txt_Sign_up; extern const char *Txt_Sign_up;
/***** Show the form *****/ /***** Show the form *****/
Lay_PutContextualLink (ActReqSignUp,NULL,NULL, Lay_PutContextualLinkIconText (ActReqSignUp,NULL,NULL,
"hand-point-up.svg", "hand-point-up.svg",
Txt_Sign_up,Txt_Sign_up, Txt_Sign_up,
NULL); Txt_Sign_up);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -780,10 +780,10 @@ void Enr_PutLinkToRemOldUsrs (void)
extern const char *Txt_Eliminate_old_users; extern const char *Txt_Eliminate_old_users;
/***** Put form to remove old users *****/ /***** Put form to remove old users *****/
Lay_PutContextualLink (ActReqRemOldUsr,NULL,NULL, Lay_PutContextualLinkIconText (ActReqRemOldUsr,NULL,NULL,
"trash.svg", "trash.svg",
Txt_Eliminate_old_users,Txt_Eliminate_old_users, Txt_Eliminate_old_users,
NULL); Txt_Eliminate_old_users);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1862,10 +1862,10 @@ static void Enr_PutLinkToRemAllStdsThisCrs (void)
extern const char *Txt_Remove_all_students; extern const char *Txt_Remove_all_students;
/***** Put form to remove all the students in the current course *****/ /***** Put form to remove all the students in the current course *****/
Lay_PutContextualLink (ActReqRemAllStdCrs,NULL,NULL, Lay_PutContextualLinkIconText (ActReqRemAllStdCrs,NULL,NULL,
"trash.svg", "trash.svg",
Txt_Remove_all_students,Txt_Remove_all_students, Txt_Remove_all_students,
NULL); Txt_Remove_all_students);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3088,10 +3088,10 @@ void Enr_PutLinkToAdminOneUsr (Act_Action_t NextAction)
const char *TitleText = Enr_ICanAdminOtherUsrs[Gbl.Usrs.Me.Role.Logged] ? Txt_Administer_one_user : const char *TitleText = Enr_ICanAdminOtherUsrs[Gbl.Usrs.Me.Role.Logged] ? Txt_Administer_one_user :
Txt_Administer_me; Txt_Administer_me;
Lay_PutContextualLink (NextAction,NULL,NULL, Lay_PutContextualLinkIconText (NextAction,NULL,NULL,
"user-cog.svg", "user-cog.svg",
TitleText,TitleText, TitleText,
NULL); TitleText);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3125,10 +3125,10 @@ void Enr_PutLinkToAdminSeveralUsrs (Rol_Role_t Role)
TitleText = NULL; TitleText = NULL;
Lay_ShowErrorAndExit ("Wrong role."); Lay_ShowErrorAndExit ("Wrong role.");
} }
Lay_PutContextualLink (NextAction,NULL,NULL, Lay_PutContextualLinkIconText (NextAction,NULL,NULL,
"users-cog.svg", "users-cog.svg",
TitleText,TitleText, TitleText,
NULL); TitleText);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1250,15 +1250,12 @@ static void Brw_PutIconsRemoveCopyPaste (unsigned Level,
const char PathInTree[PATH_MAX + 1], const char PathInTree[PATH_MAX + 1],
const char *FileName,const char *FileNameToShow); const char *FileName,const char *FileNameToShow);
static bool Brw_CheckIfCanPasteIn (unsigned Level); static bool Brw_CheckIfCanPasteIn (unsigned Level);
static void Brw_PutIconRemoveFile (const char PathInTree[PATH_MAX + 1], static void Brw_PutIconRemove (const char PathInTree[PATH_MAX + 1],
const char *FileName,const char *FileNameToShow); const char *FileName,const char *FileNameToShow);
static void Brw_PutIconRemoveDir (const char PathInTree[PATH_MAX + 1],
const char *FileName,const char *FileNameToShow);
static void Brw_PutIconCopy (const char PathInTree[PATH_MAX + 1], static void Brw_PutIconCopy (const char PathInTree[PATH_MAX + 1],
const char *FileName,const char *FileNameShow); const char *FileName,const char *FileNameShow);
static void Brw_PutIconPasteOn (const char PathInTree[PATH_MAX + 1], static void Brw_PutIconPaste (unsigned Level,const char PathInTree[PATH_MAX + 1],
const char *FileName,const char *FileNameToShow); const char *FileName,const char *FileNameToShow);
static void Brw_PutIconPasteOff (void);
static void Brw_IndentAndWriteIconExpandContract (unsigned Level, static void Brw_IndentAndWriteIconExpandContract (unsigned Level,
const char *FileBrowserId,const char *RowId, const char *FileBrowserId,const char *RowId,
Brw_IconTree_t IconThisRow, Brw_IconTree_t IconThisRow,
@ -5773,43 +5770,13 @@ static void Brw_PutIconsRemoveCopyPaste (unsigned Level,
const char *FileName,const char *FileNameToShow) const char *FileName,const char *FileNameToShow)
{ {
/***** Icon to remove folder, file or link *****/ /***** Icon to remove folder, file or link *****/
switch (Gbl.FileBrowser.FileType) Brw_PutIconRemove (PathInTree,FileName,FileNameToShow);
{
case Brw_IS_FILE:
case Brw_IS_LINK:
/* Icon to remove a file or link */
Brw_PutIconRemoveFile (PathInTree,FileName,FileNameToShow);
break;
case Brw_IS_FOLDER:
/* Icon to remove a folder */
Brw_PutIconRemoveDir (PathInTree,FileName,FileNameToShow);
break;
default:
break;
}
/***** Icon to copy *****/ /***** Icon to copy *****/
Brw_PutIconCopy (PathInTree,FileName,FileNameToShow); Brw_PutIconCopy (PathInTree,FileName,FileNameToShow);
/***** Icon to paste *****/ /***** Icon to paste *****/
switch (Gbl.FileBrowser.FileType) Brw_PutIconPaste (Level,PathInTree,FileName,FileNameToShow);
{
case Brw_IS_FILE:
case Brw_IS_LINK:
/* File or link. Can't paste in a file or link */
fprintf (Gbl.F.Out,"<td class=\"BM%u\"></td>",Gbl.RowEvenOdd);
break;
case Brw_IS_FOLDER:
if (Brw_CheckIfCanPasteIn (Level))
/* Icon to paste active */
Brw_PutIconPasteOn (PathInTree,FileName,FileNameToShow);
else
/* Icon to paste inactive */
Brw_PutIconPasteOff ();
break;
default:
break;
}
} }
/*****************************************************************************/ /*****************************************************************************/
@ -5856,72 +5823,49 @@ static bool Brw_CheckIfCanPasteIn (unsigned Level)
} }
/*****************************************************************************/ /*****************************************************************************/
/******************* Write link e icon to remove a file **********************/ /********** Write link and icon to remove a file, link or folder *************/
/*****************************************************************************/ /*****************************************************************************/
// Gbl.FileBrowser.FileType can be Brw_IS_FILE or Brw_IS_LINK
static void Brw_PutIconRemoveFile (const char PathInTree[PATH_MAX + 1], static void Brw_PutIconRemove (const char PathInTree[PATH_MAX + 1],
const char *FileName,const char *FileNameToShow) const char *FileName,const char *FileNameToShow)
{ {
extern const char *Txt_Remove_FILE_OR_LINK_X; extern const char *Txt_Remove_FILE_OR_LINK_X;
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
if (Gbl.FileBrowser.ICanEditFileOrFolder) // Can I remove this file?
{
/***** Form to remove a file *****/
Frm_StartForm (Brw_ActAskRemoveFile[Gbl.FileBrowser.Type]);
Brw_PutParamsFileBrowser (Brw_ActAskRemoveFile[Gbl.FileBrowser.Type],
PathInTree,FileName,
Gbl.FileBrowser.FileType,-1L);
snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Remove_FILE_OR_LINK_X,
FileNameToShow);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/trash.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_OPT ICO_HIGHLIGHT ICO16x16\" />",
Gbl.Prefs.URLIcons,
Gbl.Title,
Gbl.Title);
Frm_EndForm ();
}
else
// Ico_PutIconBRemovalNotAllowed ();
Ico_PutIconRemovalNotAllowed ();
fprintf (Gbl.F.Out,"</td>");
}
/*****************************************************************************/
/****************** Write link and icon to remove a folder *******************/
/*****************************************************************************/
static void Brw_PutIconRemoveDir (const char PathInTree[PATH_MAX + 1],
const char *FileName,const char *FileNameToShow)
{
extern const char *Txt_Remove_folder_X; extern const char *Txt_Remove_folder_X;
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd); fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
if (Gbl.FileBrowser.ICanEditFileOrFolder) // Can I remove this folder? if (Gbl.FileBrowser.ICanEditFileOrFolder) // Can I remove this?
{ switch (Gbl.FileBrowser.FileType)
/***** Form to remove a folder *****/ {
Frm_StartForm (Brw_ActRemoveFolder[Gbl.FileBrowser.Type]); case Brw_IS_FILE:
Brw_PutParamsFileBrowser (Brw_ActRemoveFolder[Gbl.FileBrowser.Type], case Brw_IS_LINK:
PathInTree,FileName, /***** Form to remove a file or link *****/
Brw_IS_FOLDER,-1L); Frm_StartForm (Brw_ActAskRemoveFile[Gbl.FileBrowser.Type]);
snprintf (Gbl.Title,sizeof (Gbl.Title), Brw_PutParamsFileBrowser (Brw_ActAskRemoveFile[Gbl.FileBrowser.Type],
Txt_Remove_folder_X, PathInTree,FileName,
FileNameToShow); Gbl.FileBrowser.FileType,-1L);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/trash.svg\"" snprintf (Gbl.Title,sizeof (Gbl.Title),
" alt=\"%s\" title=\"%s\"" Txt_Remove_FILE_OR_LINK_X,
" class=\"CONTEXT_OPT ICO_HIGHLIGHT ICO16x16\" />", FileNameToShow);
Gbl.Prefs.URLIcons, Ico_PutIconLink ("trash.svg",Gbl.Title);
Gbl.Title, Frm_EndForm ();
Gbl.Title); break;
Frm_EndForm (); case Brw_IS_FOLDER:
} /***** Form to remove a folder *****/
Frm_StartForm (Brw_ActRemoveFolder[Gbl.FileBrowser.Type]);
Brw_PutParamsFileBrowser (Brw_ActRemoveFolder[Gbl.FileBrowser.Type],
PathInTree,FileName,
Gbl.FileBrowser.FileType,-1L);
snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Remove_folder_X,
FileNameToShow);
Ico_PutIconLink ("trash.svg",Gbl.Title);
Frm_EndForm ();
break;
default:
break;
}
else else
// Ico_PutIconBRemovalNotAllowed ();
Ico_PutIconRemovalNotAllowed (); Ico_PutIconRemovalNotAllowed ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -5945,12 +5889,7 @@ static void Brw_PutIconCopy (const char PathInTree[PATH_MAX + 1],
snprintf (Gbl.Title,sizeof (Gbl.Title), snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Copy_FOLDER_FILE_OR_LINK_X, Txt_Copy_FOLDER_FILE_OR_LINK_X,
FileNameToShow); FileNameToShow);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/copy.svg\"" Ico_PutIconLink ("copy.svg",Gbl.Title);
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_OPT ICO_HIGHLIGHT ICO16x16\" />",
Gbl.Prefs.URLIcons,
Gbl.Title,
Gbl.Title);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -5960,49 +5899,38 @@ static void Brw_PutIconCopy (const char PathInTree[PATH_MAX + 1],
/************** Write link e icon to paste a file or a folder ****************/ /************** Write link e icon to paste a file or a folder ****************/
/*****************************************************************************/ /*****************************************************************************/
static void Brw_PutIconPasteOn (const char PathInTree[PATH_MAX + 1], static void Brw_PutIconPaste (unsigned Level,const char PathInTree[PATH_MAX + 1],
const char *FileName,const char *FileNameToShow) const char *FileName,const char *FileNameToShow)
{ {
extern const char *Txt_Paste_in_X; extern const char *Txt_Paste_in_X;
extern const char *Txt_Copy_not_allowed;
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd); fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
/***** Form to paste the content of the clipboard *****/ if (Gbl.FileBrowser.FileType == Brw_IS_FOLDER) // Can't paste in a file or link
Frm_StartForm (Brw_ActPaste[Gbl.FileBrowser.Type]); {
Brw_PutParamsFileBrowser (Brw_ActPaste[Gbl.FileBrowser.Type], /* Icon to paste */
PathInTree,FileName, if (Brw_CheckIfCanPasteIn (Level))
Brw_IS_FOLDER,-1L); {
snprintf (Gbl.Title,sizeof (Gbl.Title), /***** Form to paste the content of the clipboard *****/
Txt_Paste_in_X, Frm_StartForm (Brw_ActPaste[Gbl.FileBrowser.Type]);
FileNameToShow); Brw_PutParamsFileBrowser (Brw_ActPaste[Gbl.FileBrowser.Type],
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/paste.svg\"" PathInTree,FileName,
" alt=\"%s\" title=\"%s\"" Brw_IS_FOLDER,-1L);
" class=\"CONTEXT_OPT ICO_HIGHLIGHT ICO16x16\" />", snprintf (Gbl.Title,sizeof (Gbl.Title),
Gbl.Prefs.URLIcons, Txt_Paste_in_X,
Gbl.Title, FileNameToShow);
Gbl.Title); Ico_PutIconLink ("paste.svg",Gbl.Title);
Frm_EndForm (); Frm_EndForm ();
}
else
/* Icon to paste inactive */
Ico_PutIconOff ("paste.svg",Txt_Copy_not_allowed);
}
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
/*****************************************************************************/
/**************** Write link e icon to paste a file o a folder ***************/
/*****************************************************************************/
static void Brw_PutIconPasteOff (void)
{
extern const char *Txt_Copy_not_allowed;
fprintf (Gbl.F.Out,"<td class=\"BM%u\">"
"<img src=\"%s/paste.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_OPT ICO_HIDDEN ICO16x16\" />"
"</td>",
Gbl.RowEvenOdd,Gbl.Prefs.URLIcons,
Txt_Copy_not_allowed,
Txt_Copy_not_allowed);
}
/*****************************************************************************/ /*****************************************************************************/
/*************** Indent and write icon to expand/contract folder *************/ /*************** Indent and write icon to expand/contract folder *************/
/*****************************************************************************/ /*****************************************************************************/
@ -6026,7 +5954,7 @@ static void Brw_IndentAndWriteIconExpandContract (unsigned Level,
case Brw_ICON_TREE_NOTHING: case Brw_ICON_TREE_NOTHING:
fprintf (Gbl.F.Out,"<img src=\"%s/tr16x16.gif\"" fprintf (Gbl.F.Out,"<img src=\"%s/tr16x16.gif\""
" alt=\"\" title=\"\"" " alt=\"\" title=\"\""
" class=\"ICO16x16\" />", " class=\"ICO20x20\" />",
Gbl.Prefs.URLIcons); Gbl.Prefs.URLIcons);
break; break;
case Brw_ICON_TREE_EXPAND: case Brw_ICON_TREE_EXPAND:
@ -6070,12 +5998,13 @@ static void Brw_IndentDependingOnLevel (unsigned Level)
for (i = 1; for (i = 1;
i < Level; i < Level;
i++) i++)
fprintf (Gbl.F.Out,"<td style=\"width:20px;\">" fprintf (Gbl.F.Out,"<td class=\"BM%u\">"
"<img src=\"%s/tr16x16.gif\"" "<img src=\"%s/tr16x16.gif\""
" alt=\"\" title=\"\"" " alt=\"\" title=\"\""
" class=\"ICO16x16\" />" " class=\"ICO20x20\" />"
"</td>", "</td>",
Gbl.Prefs.URLIcons); Gbl.RowEvenOdd,
Gbl.Prefs.URLIcons);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -6111,12 +6040,7 @@ static void Brw_PutIconToExpandFolder (const char *FileBrowserId,const char *Row
snprintf (Gbl.Title,sizeof (Gbl.Title), snprintf (Gbl.Title,sizeof (Gbl.Title),
"%s %s", "%s %s",
Txt_Expand,FileNameToShow); Txt_Expand,FileNameToShow);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/caret-right.svg\"" Ico_PutIconLink ("caret-right.svg",Gbl.Title);
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Gbl.Prefs.URLIcons,
Gbl.Title,
Gbl.Title);
Frm_EndForm (); Frm_EndForm ();
/***** End container *****/ /***** End container *****/
@ -6156,12 +6080,7 @@ static void Brw_PutIconToContractFolder (const char *FileBrowserId,const char *R
snprintf (Gbl.Title,sizeof (Gbl.Title), snprintf (Gbl.Title,sizeof (Gbl.Title),
"%s %s", "%s %s",
Txt_Contract,FileNameToShow); Txt_Contract,FileNameToShow);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/caret-down.svg\"" Ico_PutIconLink ("caret-down.svg",Gbl.Title);
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Gbl.Prefs.URLIcons,
Gbl.Title,
Gbl.Title);
Frm_EndForm (); Frm_EndForm ();
/***** End container *****/ /***** End container *****/
@ -6186,11 +6105,11 @@ static void Brw_PutIconShow (unsigned Level,const char *PathInTree,const char *F
FileNameToShow); FileNameToShow);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/eye-slash.svg\"" fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/eye-slash.svg\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICO16x16%s\" />", " class=\"%sCONTEXT_ICO\" />",
Gbl.Prefs.URLIcons, Gbl.Prefs.URLIcons,
Gbl.Title, Gbl.Title,
Gbl.Title, Gbl.Title,
Brw_CheckIfAnyUpperLevelIsHidden (Level) ? " ICO_HIDDEN" : Brw_CheckIfAnyUpperLevelIsHidden (Level) ? "ICO_HIDDEN " :
""); "");
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -6214,11 +6133,11 @@ static void Brw_PutIconHide (unsigned Level,const char *PathInTree,const char *F
FileNameToShow); FileNameToShow);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/eye.svg\"" fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/eye.svg\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICO16x16%s\" />", " class=\"%sCONTEXT_ICO\" />",
Gbl.Prefs.URLIcons, Gbl.Prefs.URLIcons,
Gbl.Title, Gbl.Title,
Gbl.Title, Gbl.Title,
Brw_CheckIfAnyUpperLevelIsHidden (Level) ? " ICO_HIDDEN" : Brw_CheckIfAnyUpperLevelIsHidden (Level) ? "ICO_HIDDEN " :
""); "");
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -6383,15 +6302,9 @@ static void Brw_PutIconFolderWithPlus (const char *FileBrowserId,const char *Row
snprintf (Gbl.Title,sizeof (Gbl.Title), snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Upload_file_or_create_folder_in_FOLDER, Txt_Upload_file_or_create_folder_in_FOLDER,
FileNameToShow); FileNameToShow);
fprintf (Gbl.F.Out,"<input type=\"image\"" Ico_PutIconLink (Open ? "folder-open-plus16x16.gif" :
" src=\"%s/folder-%s-plus16x16.gif\"" "folder-closed-plus16x16.gif",
" alt=\"%s\" title=\"%s\"" Gbl.Title);
" class=\"ICO20x20\" />",
Gbl.Prefs.URLIcons,
Open ? "open" :
"closed",
Gbl.Title,
Gbl.Title);
Frm_EndForm (); Frm_EndForm ();
/***** End container *****/ /***** End container *****/
@ -12584,11 +12497,11 @@ static void Brw_PutLinkToAskRemOldFiles (void)
{ {
extern const char *Txt_Remove_old_files; extern const char *Txt_Remove_old_files;
Lay_PutContextualLink (ActReqRemOldBrf,NULL, Lay_PutContextualLinkIconText (ActReqRemOldBrf,NULL,
Brw_PutHiddenParamFullTreeIfSelected, Brw_PutHiddenParamFullTreeIfSelected,
"trash.svg", "trash.svg",
Txt_Remove_old_files,Txt_Remove_old_files, Txt_Remove_old_files,
NULL); Txt_Remove_old_files);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -99,10 +99,10 @@ void Fol_PutLinkWhoToFollow (void)
{ {
extern const char *Txt_Who_to_follow; extern const char *Txt_Who_to_follow;
Lay_PutContextualLink (ActSeeSocPrf,NULL,NULL, Lay_PutContextualLinkIconText (ActSeeSocPrf,NULL,NULL,
"user-plus.svg", "user-plus.svg",
Txt_Who_to_follow,Txt_Who_to_follow, Txt_Who_to_follow,
NULL); Txt_Who_to_follow);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1239,14 +1239,9 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod,
Enabled ? Txt_Post_X_allowed_Click_to_ban_it : Enabled ? Txt_Post_X_allowed_Click_to_ban_it :
Txt_Post_X_banned_Click_to_unban_it, Txt_Post_X_banned_Click_to_unban_it,
PstNum); PstNum);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\"" Ico_PutIconLink (Enabled ? "eye.svg" :
" alt=\"%s\" title=\"%s\"" "eye-slash.svg",
" class=\"ICO16x16\" />", Gbl.Title);
Gbl.Prefs.URLIcons,
Enabled ? "eye.svg" :
"eye-slash.svg",
Gbl.Title,
Gbl.Title);
Frm_EndForm (); Frm_EndForm ();
} }
else else

View File

@ -824,10 +824,9 @@ static void Gam_PutFormsToRemEditOneGame (long GamCod,bool Visible,
Ico_PutContextualIconToRemove (ActReqRemGam,Gam_PutParams); Ico_PutContextualIconToRemove (ActReqRemGam,Gam_PutParams);
/***** Put icon to reset game *****/ /***** Put icon to reset game *****/
Lay_PutContextualLink (ActReqRstGam,NULL,Gam_PutParams, Lay_PutContextualLinkOnlyIcon (ActReqRstGam,NULL,Gam_PutParams,
"recycle.svg", "recycle.svg",
Txt_Reset,NULL, Txt_Reset);
NULL);
/***** Put icon to hide/show game *****/ /***** Put icon to hide/show game *****/
if (Visible) if (Visible)
@ -840,16 +839,15 @@ static void Gam_PutFormsToRemEditOneGame (long GamCod,bool Visible,
if (ShowOnlyThisGame) if (ShowOnlyThisGame)
/***** Put icon to show first question *****/ /***** Put icon to show first question *****/
Lay_PutContextualLink (ActPlyGam1stQst,NULL,Gam_PutParamsToPlayGame1stQst, Lay_PutContextualLinkOnlyIcon (ActPlyGam1stQst,NULL,
"play.svg", Gam_PutParamsToPlayGame1stQst,
Txt_Play,NULL, "play.svg",
NULL); Txt_Play);
else else
/***** Put icon to play game *****/ /***** Put icon to play game *****/
Lay_PutContextualLink (ActPlyGam,NULL,Gam_PutParams, Lay_PutContextualLinkOnlyIcon (ActPlyGam,NULL,Gam_PutParams,
"play.svg", "play.svg",
Txt_Play,NULL, Txt_Play);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2901,10 +2899,9 @@ static void Gam_ListOneOrMoreQuestionsForEdition (struct Game *Game,
snprintf (Gbl.Title,sizeof (Gbl.Title), snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Move_up_X, Txt_Move_up_X,
StrNumQst); StrNumQst);
Lay_PutContextualLink (ActUp_GamQst,NULL,Gam_PutParamsOneQst, Lay_PutContextualLinkOnlyIcon (ActUp_GamQst,NULL,Gam_PutParamsOneQst,
"arrow-up.svg", "arrow-up.svg",
Gbl.Title,NULL, Gbl.Title);
NULL);
} }
else else
Ico_PutIconOff ("arrow-up.svg",Txt_Movement_not_allowed); Ico_PutIconOff ("arrow-up.svg",Txt_Movement_not_allowed);
@ -2915,10 +2912,9 @@ static void Gam_ListOneOrMoreQuestionsForEdition (struct Game *Game,
snprintf (Gbl.Title,sizeof (Gbl.Title), snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Move_down_X, Txt_Move_down_X,
StrNumQst); StrNumQst);
Lay_PutContextualLink (ActDwnGamQst,NULL,Gam_PutParamsOneQst, Lay_PutContextualLinkOnlyIcon (ActDwnGamQst,NULL,Gam_PutParamsOneQst,
"arrow-down.svg", "arrow-down.svg",
Gbl.Title,NULL, Gbl.Title);
NULL);
} }
else else
Ico_PutIconOff ("arrow-down.svg",Txt_Movement_not_allowed); Ico_PutIconOff ("arrow-down.svg",Txt_Movement_not_allowed);

View File

@ -1545,14 +1545,9 @@ static void Grp_ListGroupsForEdition (void)
Grp->Open ? Txt_Group_X_open_click_to_close_it : Grp->Open ? Txt_Group_X_open_click_to_close_it :
Txt_Group_X_closed_click_to_open_it, Txt_Group_X_closed_click_to_open_it,
Grp->GrpName); Grp->GrpName);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\"" Ico_PutIconLink (Grp->Open ? "lock-open.svg" :
" alt=\"%s\" title=\"%s\"" "lock.svg",
" class=\"ICOx16\" />", Gbl.Title);
Gbl.Prefs.URLIcons,
Grp->Open ? "lock-open.svg" :
"lock.svg",
Gbl.Title,
Gbl.Title);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -1566,14 +1561,9 @@ static void Grp_ListGroupsForEdition (void)
Grp->FileZones ? Txt_File_zones_of_the_group_X_enabled_click_to_disable_them : Grp->FileZones ? Txt_File_zones_of_the_group_X_enabled_click_to_disable_them :
Txt_File_zones_of_the_group_X_disabled_click_to_enable_them, Txt_File_zones_of_the_group_X_disabled_click_to_enable_them,
Grp->GrpName); Grp->GrpName);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\"" Ico_PutIconLink (Grp->FileZones ? "folder-open-green.svg" :
" alt=\"%s\" title=\"%s\"" "folder-red.svg",
" class=\"ICOx16\" />", Gbl.Title);
Gbl.Prefs.URLIcons,
Grp->FileZones ? "folder-open-green.svg" :
"folder-red.svg",
Gbl.Title,
Gbl.Title);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
@ -5095,14 +5085,9 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,void (*FuncParams) ())
Par_PutHiddenParamUnsigned ("WhichGrps",(unsigned) WhichGrps); Par_PutHiddenParamUnsigned ("WhichGrps",(unsigned) WhichGrps);
if (FuncParams) // Extra parameters depending on the action if (FuncParams) // Extra parameters depending on the action
FuncParams (); FuncParams ();
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\"" Ico_PutPrefIconLink (WhichGrps == Grp_ONLY_MY_GROUPS ? "mysitemap.png" :
" alt=\"%s\" title=\"%s\" class=\"ICOx25\"" "sitemap.svg",
" style=\"margin:0 auto;\" />", Txt_GROUP_WHICH_GROUPS[WhichGrps]);
Gbl.Prefs.URLIcons,
WhichGrps == Grp_ONLY_MY_GROUPS ? "mysitemap.png" :
"sitemap.svg",
Txt_GROUP_WHICH_GROUPS[WhichGrps],
Txt_GROUP_WHICH_GROUPS[WhichGrps]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }

View File

@ -115,6 +115,7 @@ void Ico_PutIconsToSelectIconSet (void)
extern const char *Hlp_PROFILE_Preferences_icons; extern const char *Hlp_PROFILE_Preferences_icons;
extern const char *Txt_Icons; extern const char *Txt_Icons;
Ico_IconSet_t IconSet; Ico_IconSet_t IconSet;
char Icon[PATH_MAX + 1];
Box_StartBox (NULL,Txt_Icons,Ico_PutIconsIconSet, Box_StartBox (NULL,Txt_Icons,Ico_PutIconsIconSet,
Hlp_PROFILE_Preferences_icons,Box_NOT_CLOSABLE); Hlp_PROFILE_Preferences_icons,Box_NOT_CLOSABLE);
@ -128,13 +129,11 @@ void Ico_PutIconsToSelectIconSet (void)
"PREF_OFF"); "PREF_OFF");
Frm_StartForm (ActChgIco); Frm_StartForm (ActChgIco);
Par_PutHiddenParamString ("IconSet",Ico_IconSetId[IconSet]); Par_PutHiddenParamString ("IconSet",Ico_IconSetId[IconSet]);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s/%s/cog.svg\"" snprintf (Icon,sizeof (Icon),
" alt=\"%s\" title=\"%s\" class=\"ICOx25\" />", "%s/%s/cog.svg",
Gbl.Prefs.URLIcons, Cfg_ICON_FOLDER_ICON_SETS,
Cfg_ICON_FOLDER_ICON_SETS, Ico_IconSetId[IconSet]);
Ico_IconSetId[IconSet], Ico_PutPrefIconLink (Icon,Ico_IconSetNames[IconSet]);
Ico_IconSetNames[IconSet],
Ico_IconSetNames[IconSet]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
@ -222,97 +221,132 @@ void Ico_PutContextualIconToAdd (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (), void (*FuncParams) (),
const char *Txt) const char *Txt)
{ {
Lay_PutContextualLink (NextAction,Anchor,FuncParams, Lay_PutContextualLinkOnlyIcon (NextAction,Anchor,FuncParams,
"plus.svg", "plus.svg",
Txt,NULL, Txt);
NULL);
} }
void Ico_PutContextualIconToRemove (Act_Action_t NextAction,void (*FuncParams) ()) void Ico_PutContextualIconToRemove (Act_Action_t NextAction,void (*FuncParams) ())
{ {
extern const char *Txt_Remove; extern const char *Txt_Remove;
Lay_PutContextualLink (NextAction,NULL,FuncParams, Lay_PutContextualLinkOnlyIcon (NextAction,NULL,FuncParams,
"trash.svg", "trash.svg",
Txt_Remove,NULL, Txt_Remove);
NULL);
} }
void Ico_PutContextualIconToEdit (Act_Action_t NextAction,void (*FuncParams) ()) void Ico_PutContextualIconToEdit (Act_Action_t NextAction,void (*FuncParams) ())
{ {
extern const char *Txt_Edit; extern const char *Txt_Edit;
Lay_PutContextualLink (NextAction,NULL,FuncParams, Lay_PutContextualLinkOnlyIcon (NextAction,NULL,FuncParams,
"pen.svg", "pen.svg",
Txt_Edit,NULL, Txt_Edit);
NULL);
} }
void Ico_PutContextualIconToViewFiles (Act_Action_t NextAction,void (*FuncParams) ()) void Ico_PutContextualIconToViewFiles (Act_Action_t NextAction,void (*FuncParams) ())
{ {
extern const char *Txt_Files; extern const char *Txt_Files;
Lay_PutContextualLink (NextAction,NULL,FuncParams, Lay_PutContextualLinkOnlyIcon (NextAction,NULL,FuncParams,
"folder-open.svg", "folder-open.svg",
Txt_Files,NULL, Txt_Files);
NULL);
} }
void Ico_PutContextualIconToView (Act_Action_t NextAction,void (*FuncParams) ()) void Ico_PutContextualIconToView (Act_Action_t NextAction,void (*FuncParams) ())
{ {
extern const char *Txt_View; extern const char *Txt_View;
Lay_PutContextualLink (NextAction,NULL,FuncParams, Lay_PutContextualLinkOnlyIcon (NextAction,NULL,FuncParams,
"eye.svg", "eye.svg",
Txt_View,NULL, Txt_View);
NULL);
} }
void Ico_PutContextualIconToHide (Act_Action_t NextAction,void (*FuncParams) ()) void Ico_PutContextualIconToHide (Act_Action_t NextAction,void (*FuncParams) ())
{ {
extern const char *Txt_Hide; extern const char *Txt_Hide;
Lay_PutContextualLink (NextAction,NULL,FuncParams, Lay_PutContextualLinkOnlyIcon (NextAction,NULL,FuncParams,
"eye.svg", "eye.svg",
Txt_Hide,NULL, Txt_Hide);
NULL);
} }
void Ico_PutContextualIconToUnhide (Act_Action_t NextAction,void (*FuncParams) ()) void Ico_PutContextualIconToUnhide (Act_Action_t NextAction,void (*FuncParams) ())
{ {
extern const char *Txt_Show; extern const char *Txt_Show;
Lay_PutContextualLink (NextAction,NULL,FuncParams, Lay_PutContextualLinkOnlyIcon (NextAction,NULL,FuncParams,
"eye-slash.svg", "eye-slash.svg",
Txt_Show,NULL, Txt_Show);
NULL);
} }
void Ico_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) ()) void Ico_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) ())
{ {
extern const char *Txt_Print; extern const char *Txt_Print;
Lay_PutContextualLink (NextAction,NULL,FuncParams, Lay_PutContextualLinkOnlyIcon (NextAction,NULL,FuncParams,
"print.svg", "print.svg",
Txt_Print,NULL, Txt_Print);
NULL); }
/*****************************************************************************/
/**************** Show an icon inside a div (without text) *******************/
/*****************************************************************************/
void Ico_PutDivIcon (const char *DivClass,const char *Icon,const char *Title)
{
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO_16x16\" />"
"</div>",
DivClass,
Gbl.Prefs.URLIcons,Icon,
Title,Title);
}
/*****************************************************************************/
/*********** Show an icon with a link inside a div (without text) ************/
/*****************************************************************************/
void Ico_PutDivIconLink (const char *DivClass,const char *Icon,const char *Title)
{
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"<input type=\"image\""
" src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_OPT ICO_HIGHLIGHT CONTEXT_ICO_16x16\" />"
"</div>",
DivClass,
Gbl.Prefs.URLIcons,Icon,
Title,Title);
} }
/*****************************************************************************/ /*****************************************************************************/
/****************** Show an icon with a link (without text) ******************/ /****************** Show an icon with a link (without text) ******************/
/*****************************************************************************/ /*****************************************************************************/
void Ico_PutIconLink (const char *Icon,const char *Title,const char *Text, void Ico_PutIconLink (const char *Icon,const char *Title)
const char *LinkStyle,const char *OnSubmit)
{ {
Frm_LinkFormSubmit (Title,LinkStyle,OnSubmit); fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\""
if (Text) " alt=\"%s\" title=\"%s\""
Ico_PutIconWithText (Icon,Title,Text); " class=\"CONTEXT_OPT ICO_HIGHLIGHT CONTEXT_ICO_16x16\" />",
else Gbl.Prefs.URLIcons,Icon,
fprintf (Gbl.F.Out,"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\"" Title,Title);
" class=\"CONTEXT_OPT ICO_HIGHLIGHT CONTEXT_ICO\" />", }
Gbl.Prefs.URLIcons,Icon,Title,Title);
fprintf (Gbl.F.Out,"</a>"); /*****************************************************************************/
/************************** Show a preference selector ***********************/
/*****************************************************************************/
void Ico_PutPrefIconLink (const char *Icon,const char *Title)
{
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO_HIGHLIGHT ICOx25\""
" style=\"margin:0 auto;\"\" />",
Gbl.Prefs.URLIcons,Icon,
Title,Title);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -322,7 +356,7 @@ void Ico_PutIconLink (const char *Icon,const char *Title,const char *Text,
void Ico_PutIconOff (const char *Icon,const char *Alt) void Ico_PutIconOff (const char *Icon,const char *Alt)
{ {
fprintf (Gbl.F.Out,"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\"" fprintf (Gbl.F.Out,"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_OPT ICO_HIDDEN CONTEXT_ICO\" />", " class=\"CONTEXT_OPT ICO_HIDDEN CONTEXT_ICO_16x16\" />",
Gbl.Prefs.URLIcons,Icon,Alt,Alt); Gbl.Prefs.URLIcons,Icon,Alt,Alt);
} }
@ -335,7 +369,7 @@ void Ico_PutIconWithText (const char *Icon,const char *Alt,const char *Text)
/***** Print icon and optional text *****/ /***** Print icon and optional text *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">" fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">"
"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\"" "<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />", " class=\"CONTEXT_ICO_x16\" />",
Gbl.Prefs.URLIcons,Icon,Alt,Text ? Text : Gbl.Prefs.URLIcons,Icon,Alt,Text ? Text :
Alt); Alt);
if (Text) if (Text)
@ -354,10 +388,10 @@ void Ico_PutCalculateIcon (const char *Alt)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">" fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">"
"<img id=\"update_%d\" src=\"%s/recycle16x16.gif\"" // TODO: change name and resolution to refresh64x64.png "<img id=\"update_%d\" src=\"%s/recycle16x16.gif\"" // TODO: change name and resolution to refresh64x64.png
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />" " class=\"CONTEXT_ICO_16x16\" />"
"<img id=\"updating_%d\" src=\"%s/working16x16.gif\"" // TODO: change name and resolution to refreshing64x64.gif "<img id=\"updating_%d\" src=\"%s/working16x16.gif\"" // TODO: change name and resolution to refreshing64x64.gif
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" style=\"display:none;\" />" // Animated icon hidden " class=\"CONTEXT_ICO_16x16\" style=\"display:none;\" />" // Animated icon hidden
"</div>" "</div>"
"</a>", "</a>",
Gbl.Form.Num,Gbl.Prefs.URLIcons,Alt,Alt, Gbl.Form.Num,Gbl.Prefs.URLIcons,Alt,Alt,
@ -406,12 +440,7 @@ void Ico_PutIconRemove (void)
{ {
extern const char *Txt_Remove; extern const char *Txt_Remove;
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/trash.svg\"" Ico_PutIconLink ("trash.svg",Txt_Remove);
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_OPT ICO_HIGHLIGHT ICO16x16\" />",
Gbl.Prefs.URLIcons,
Txt_Remove,
Txt_Remove);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -422,12 +451,7 @@ void Ico_PutIconCut (void)
{ {
extern const char *Txt_Cut; extern const char *Txt_Cut;
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/cut.svg\"" Ico_PutIconLink ("cut.svg",Txt_Cut);
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_OPT ICO_HIGHLIGHT ICO16x16\" />",
Gbl.Prefs.URLIcons,
Txt_Cut,
Txt_Cut);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -438,10 +462,5 @@ void Ico_PutIconPaste (void)
{ {
extern const char *Txt_Paste; extern const char *Txt_Paste;
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/paste.svg\"" Ico_PutIconLink ("paste.svg",Txt_Paste);
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_OPT ICO_HIGHLIGHT ICO16x16\" />",
Gbl.Prefs.URLIcons,
Txt_Paste,
Txt_Paste);
} }

View File

@ -66,8 +66,10 @@ void Ico_PutContextualIconToUnhide (Act_Action_t NextAction,void (*FuncParams) (
void Ico_PutContextualIconToHide (Act_Action_t NextAction,void (*FuncParams) ()); void Ico_PutContextualIconToHide (Act_Action_t NextAction,void (*FuncParams) ());
void Ico_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) ()); void Ico_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) ());
void Ico_PutIconLink (const char *Icon,const char *Title,const char *Text, void Ico_PutDivIcon (const char *DivClass,const char *Icon,const char *Title);
const char *LinkStyle,const char *OnSubmit); void Ico_PutDivIconLink (const char *DivClass,const char *Icon,const char *Title);
void Ico_PutIconLink (const char *Icon,const char *Title);
void Ico_PutPrefIconLink (const char *Icon,const char *Title);
void Ico_PutIconOff (const char *Icon,const char *Alt); void Ico_PutIconOff (const char *Icon,const char *Alt);
void Ico_PutIconWithText (const char *Icon,const char *Alt,const char *Text); void Ico_PutIconWithText (const char *Icon,const char *Alt,const char *Text);

View File

@ -982,10 +982,9 @@ static void Ins_PutIconToViewInstitutions (void)
{ {
extern const char *Txt_Institutions; extern const char *Txt_Institutions;
Lay_PutContextualLink (ActSeeIns,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeIns,NULL,NULL,
"university.svg", "university.svg",
Txt_Institutions,NULL, Txt_Institutions);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -77,10 +77,10 @@ static void Lan_PutParamLanguage (void);
void Lan_PutLinkToChangeLanguage (void) void Lan_PutLinkToChangeLanguage (void)
{ {
Lay_PutContextualLink (ActEdiPrf,NULL,NULL, Lay_PutContextualLinkIconText (ActEdiPrf,NULL,NULL,
"globe.svg", "globe.svg",
"Change language","Change language", "Change language",
NULL); "Change language");
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1089,17 +1089,72 @@ static void Lay_ShowRightColumn (void)
/**************** Show an icon with a link in contextual menu ****************/ /**************** Show an icon with a link in contextual menu ****************/
/*****************************************************************************/ /*****************************************************************************/
void Lay_PutContextualLink (Act_Action_t NextAction,const char *Anchor, void Lay_PutContextualLinkOnlyIcon (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (), void (*FuncParams) (),
const char *Icon, const char *Icon,
const char *Title,const char *Text, const char *Title)
const char *OnSubmit) {
/***** Start form *****/
Frm_StartFormAnchor (NextAction,Anchor);
if (FuncParams)
FuncParams ();
/***** Put icon with link *****/
Ico_PutIconLink (Icon,Title);
/***** End form *****/
Frm_EndForm ();
}
/*****************************************************************************/
/**************** Show an icon with a link in contextual menu ****************/
/*****************************************************************************/
void Lay_PutContextualLinkIconText (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (),
const char *Icon,
const char *Title,
const char *Text)
{ {
extern const char *The_ClassFormBold[The_NUM_THEMES]; extern const char *The_ClassFormBold[The_NUM_THEMES];
/***** Separator *****/ /***** Separator *****/
if (Text) fprintf (Gbl.F.Out," "); // This space is necessary to enable
fprintf (Gbl.F.Out," "); // This space is necessary to enable // jumping to the next line on narrow screens
/***** Start form *****/
Frm_StartFormAnchor (NextAction,Anchor);
if (FuncParams)
FuncParams ();
/***** Put icon and text with link *****/
Frm_LinkFormSubmit (Title,The_ClassFormBold[Gbl.Prefs.Theme],NULL);
Ico_PutIconWithText (Icon,Title,Text);
fprintf (Gbl.F.Out,"</a>");
/***** End form *****/
Frm_EndForm ();
/***** Separator *****/
fprintf (Gbl.F.Out," "); // This space is necessary to enable
// jumping to the next line on narrow screens
}
/*****************************************************************************/
/**************** Show an icon with a link in contextual menu ****************/
/*****************************************************************************/
void Lay_PutContextualLinkIconTextOnSubmit (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (),
const char *Icon,
const char *Title,
const char *Text,
const char *OnSubmit)
{
extern const char *The_ClassFormBold[The_NUM_THEMES];
/***** Separator *****/
fprintf (Gbl.F.Out," "); // This space is necessary to enable
// jumping to the next line on narrow screens // jumping to the next line on narrow screens
/***** Start form *****/ /***** Start form *****/
@ -1108,17 +1163,15 @@ void Lay_PutContextualLink (Act_Action_t NextAction,const char *Anchor,
FuncParams (); FuncParams ();
/***** Put icon with link *****/ /***** Put icon with link *****/
Ico_PutIconLink (Icon,Title,Text, Frm_LinkFormSubmit (Title,The_ClassFormBold[Gbl.Prefs.Theme],OnSubmit);
Text ? The_ClassFormBold[Gbl.Prefs.Theme] : Ico_PutIconWithText (Icon,Title,Text);
NULL, fprintf (Gbl.F.Out,"</a>");
OnSubmit);
/***** End form *****/ /***** End form *****/
Frm_EndForm (); Frm_EndForm ();
/***** Separator *****/ /***** Separator *****/
if (Text) fprintf (Gbl.F.Out," "); // This space is necessary to enable
fprintf (Gbl.F.Out," "); // This space is necessary to enable
// jumping to the next line on narrow screens // jumping to the next line on narrow screens
} }

View File

@ -52,11 +52,21 @@ void Lay_WriteStartOfPage (void);
void Lay_WriteHTTPStatus204NoContent (void); void Lay_WriteHTTPStatus204NoContent (void);
void Lay_PutContextualLink (Act_Action_t NextAction,const char *Anchor, void Lay_PutContextualLinkOnlyIcon (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (), void (*FuncParams) (),
const char *Icon, const char *Icon,
const char *Title,const char *Text, const char *Title);
const char *OnSubmit); void Lay_PutContextualLinkIconText (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (),
const char *Icon,
const char *Title,
const char *Text);
void Lay_PutContextualLinkIconTextOnSubmit (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (),
const char *Icon,
const char *Title,
const char *Text,
const char *OnSubmit);
void Lay_PutContextualCheckbox (Act_Action_t NextAction, void Lay_PutContextualCheckbox (Act_Action_t NextAction,
void (*FuncParams) (), void (*FuncParams) (),
const char *CheckboxName, const char *CheckboxName,

View File

@ -256,10 +256,9 @@ void Lnk_PutIconToViewLinks (void)
{ {
extern const char *Txt_Links; extern const char *Txt_Links;
Lay_PutContextualLink (ActSeeLnk,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeLnk,NULL,NULL,
"link.svg", "link.svg",
Txt_Links,NULL, Txt_Links);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -219,11 +219,10 @@ void Log_PutIconToChangeLogo (Sco_Scope_t Scope)
LogoExists = Fil_CheckIfPathExists (PathLogo); LogoExists = Fil_CheckIfPathExists (PathLogo);
/***** Link for changing / uploading the logo *****/ /***** Link for changing / uploading the logo *****/
Lay_PutContextualLink (Action,NULL,NULL, Lay_PutContextualLinkOnlyIcon (Action,NULL,NULL,
"shield-alt.svg", "shield-alt.svg",
LogoExists ? Txt_Change_logo : LogoExists ? Txt_Change_logo :
Txt_Upload_logo,NULL, Txt_Upload_logo);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -279,10 +278,10 @@ void Log_RequestLogo (Sco_Scope_t Scope)
{ {
/***** Form to remove photo *****/ /***** Form to remove photo *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">"); fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
Lay_PutContextualLink (ActionRem,NULL,NULL, Lay_PutContextualLinkIconText (ActionRem,NULL,NULL,
"trash.svg", "trash.svg",
Txt_Remove_logo,Txt_Remove_logo, Txt_Remove_logo,
NULL); Txt_Remove_logo);
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }

View File

@ -426,12 +426,7 @@ void Mnu_PutIconsToSelectMenu (void)
"PREF_OFF"); "PREF_OFF");
Frm_StartForm (ActChgMnu); Frm_StartForm (ActChgMnu);
Par_PutHiddenParamUnsigned ("Menu",(unsigned) Menu); Par_PutHiddenParamUnsigned ("Menu",(unsigned) Menu);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\"" Ico_PutPrefIconLink (Mnu_MenuIcons[Menu],Txt_MENU_NAMES[Menu]);
" alt=\"%s\" title=\"%s\" class=\"ICOx25\" />",
Gbl.Prefs.URLIcons,
Mnu_MenuIcons[Menu],
Txt_MENU_NAMES[Menu],
Txt_MENU_NAMES[Menu]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }

View File

@ -363,11 +363,12 @@ static void Msg_PutLinkToShowMorePotentialRecipients (void)
extern const char *Txt_Show_more_recipients; extern const char *Txt_Show_more_recipients;
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Lay_PutContextualLink (ActReqMsgUsr,NULL, Lay_PutContextualLinkIconTextOnSubmit (ActReqMsgUsr,NULL,
Msg_PutParamsShowMorePotentialRecipients, Msg_PutParamsShowMorePotentialRecipients,
"users.svg", "users.svg",
Txt_Show_more_recipients,Txt_Show_more_recipients, Txt_Show_more_recipients,
"CopyMessageToHiddenFields()"); Txt_Show_more_recipients,
"CopyMessageToHiddenFields()");
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
@ -1872,10 +1873,10 @@ static void Msg_PutLinkToViewBannedUsers(void)
{ {
extern const char *Txt_Banned_users; extern const char *Txt_Banned_users;
Lay_PutContextualLink (ActLstBanUsr,NULL,NULL, Lay_PutContextualLinkIconText (ActLstBanUsr,NULL,NULL,
"lock.svg", "lock.svg",
Txt_Banned_users,Txt_Banned_users, Txt_Banned_users,
NULL); Txt_Banned_users);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -3340,8 +3341,7 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod,
FromThisCrs ? (Replied ? Txt_Reply_again : FromThisCrs ? (Replied ? Txt_Reply_again :
Txt_Reply) : Txt_Reply) :
(Replied ? Txt_Go_to_course_and_reply_again : (Replied ? Txt_Go_to_course_and_reply_again :
Txt_Go_to_course_and_reply), Txt_Go_to_course_and_reply));
NULL,NULL,NULL);
Frm_EndForm (); Frm_EndForm ();
} }
@ -3388,6 +3388,7 @@ static void Msg_WriteMsgFrom (struct UsrData *UsrDat,bool Deleted)
fprintf (Gbl.F.Out,"%s",UsrDat->FullName); fprintf (Gbl.F.Out,"%s",UsrDat->FullName);
if (Act_GetSuperAction (Gbl.Action.Act) == ActSeeRcvMsg) if (Act_GetSuperAction (Gbl.Action.Act) == ActSeeRcvMsg)
{ {
fprintf (Gbl.F.Out,"&nbsp;");
if (Msg_CheckIfUsrIsBanned (UsrDat->UsrCod,Gbl.Usrs.Me.UsrDat.UsrCod)) if (Msg_CheckIfUsrIsBanned (UsrDat->UsrCod,Gbl.Usrs.Me.UsrDat.UsrCod))
// Sender is banned // Sender is banned
Msg_PutFormToUnbanSender (UsrDat); Msg_PutFormToUnbanSender (UsrDat);
@ -3674,12 +3675,7 @@ static void Msg_PutFormToBanSender (struct UsrData *UsrDat)
Gbl.Msg.CurrentPage); Gbl.Msg.CurrentPage);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Msg_PutHiddenParamsMsgsFilters (); Msg_PutHiddenParamsMsgsFilters ();
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/lock-open.svg\"" Ico_PutIconLink ("lock-open.svg",Txt_Sender_permitted_click_to_ban_him);
" alt=\"%s\" title=\"%s\""
" class=\"ICOx16\" style=\"margin-left:12px;\" />",
Gbl.Prefs.URLIcons,
Txt_Sender_permitted_click_to_ban_him,
Txt_Sender_permitted_click_to_ban_him);
Frm_EndForm (); Frm_EndForm ();
} }
@ -3696,12 +3692,7 @@ static void Msg_PutFormToUnbanSender (struct UsrData *UsrDat)
Gbl.Msg.CurrentPage); Gbl.Msg.CurrentPage);
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
Msg_PutHiddenParamsMsgsFilters (); Msg_PutHiddenParamsMsgsFilters ();
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/lock.svg\"" Ico_PutIconLink ("lock.svg",Txt_Sender_banned_click_to_unban_him);
" alt=\"%s\" title=\"%s\""
" class=\"ICOx16\" style=\"margin-left:12px;\" />",
Gbl.Prefs.URLIcons,
Txt_Sender_banned_click_to_unban_him,
Txt_Sender_banned_click_to_unban_him);
Frm_EndForm (); Frm_EndForm ();
} }
@ -3875,13 +3866,7 @@ void Msg_ListBannedUsrs (void)
"<td class=\"BM\">"); "<td class=\"BM\">");
Frm_StartForm (ActUnbUsrLst); Frm_StartForm (ActUnbUsrLst);
Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (UsrDat.EncryptedUsrCod);
fprintf (Gbl.F.Out,"<input type=\"image\"" Ico_PutIconLink ("lock.svg",Txt_Sender_banned_click_to_unban_him);
" src=\"%s/lock.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"ICOx16\" />",
Gbl.Prefs.URLIcons,
Txt_Sender_banned_click_to_unban_him,
Txt_Sender_banned_click_to_unban_him);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");

View File

@ -652,16 +652,14 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
switch (Status) switch (Status)
{ {
case Not_ACTIVE_NOTICE: case Not_ACTIVE_NOTICE:
Lay_PutContextualLink (ActHidNot,NULL,Not_PutParams, Lay_PutContextualLinkOnlyIcon (ActHidNot,NULL,Not_PutParams,
"eye.svg", "eye.svg",
Txt_NOTICE_Active_Mark_as_obsolete,NULL, Txt_NOTICE_Active_Mark_as_obsolete);
NULL);
break; break;
case Not_OBSOLETE_NOTICE: case Not_OBSOLETE_NOTICE:
Lay_PutContextualLink (ActRevNot,NULL,Not_PutParams, Lay_PutContextualLinkOnlyIcon (ActRevNot,NULL,Not_PutParams,
"eye-slash.svg", "eye-slash.svg",
Txt_NOTICE_Obsolete_Mark_as_active,NULL, Txt_NOTICE_Obsolete_Mark_as_active);
NULL);
break; break;
} }
Frm_EndForm (); Frm_EndForm ();
@ -728,10 +726,9 @@ 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_PutContextualLink (ActSeeOneNot,NULL,Not_PutParams, Lay_PutContextualLinkOnlyIcon (ActSeeOneNot,NULL,Not_PutParams,
"ellipsis-h.svg", "ellipsis-h.svg",
Txt_See_full_notice,NULL, Txt_See_full_notice);
NULL);
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
else else

View File

@ -371,23 +371,22 @@ void Ntf_ShowMyNotifications (void)
if (NumNotifications) // TODO: Show message only when I don't have notificacions at all if (NumNotifications) // TODO: Show message only when I don't have notificacions at all
/* Put form to change notification preferences */ /* Put form to change notification preferences */
Lay_PutContextualLink (ActMrkNtfSee,NULL,NULL, Lay_PutContextualLinkIconText (ActMrkNtfSee,NULL,NULL,
"eye.svg", "eye.svg",
Txt_Mark_all_notifications_as_read, Txt_Mark_all_notifications_as_read,
Txt_Mark_all_NOTIFICATIONS_as_read, Txt_Mark_all_NOTIFICATIONS_as_read);
NULL);
/* Put form to change notification preferences */ /* Put form to change notification preferences */
Lay_PutContextualLink (ActEdiPrf,NULL,NULL, Lay_PutContextualLinkIconText (ActEdiPrf,NULL,NULL,
"cog.svg", "cog.svg",
Txt_Change_preferences,Txt_Settings, Txt_Change_preferences,
NULL); Txt_Settings);
/* Put form to view allowed mail domains */ /* Put form to view allowed mail domains */
Lay_PutContextualLink (ActSeeMai,NULL,NULL, Lay_PutContextualLinkIconText (ActSeeMai,NULL,NULL,
"envelope.svg", "envelope.svg",
Txt_Email_domains_allowed_for_notifications,Txt_Domains, Txt_Email_domains_allowed_for_notifications,
NULL); Txt_Domains);
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
@ -509,23 +508,13 @@ void Ntf_ShowMyNotifications (void)
if (PutLink) if (PutLink)
{ {
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\"" Ico_PutIconLink (Ntf_Icons[NotifyEvent],
" alt=\"%s\" title=\"%s\"" Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent]);
" class=\"ICO16x16\" />",
Gbl.Prefs.URLIcons,
Ntf_Icons[NotifyEvent],
Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent],
Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent]);
Frm_EndForm (); Frm_EndForm ();
} }
else else
fprintf (Gbl.F.Out,"<img src=\"%s/%s\"" Ico_PutIconOff (Ntf_Icons[NotifyEvent],
" alt=\"%s\" title=\"%s\"" Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent]);
" class=\"ICO16x16\" />",
Gbl.Prefs.URLIcons,
Ntf_Icons[NotifyEvent],
Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent],
Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent]);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/* Write event type */ /* Write event type */

View File

@ -259,11 +259,11 @@ void Pwd_PutLinkToSendNewPasswd (void)
{ {
extern const char *Txt_Forgotten_password; extern const char *Txt_Forgotten_password;
Lay_PutContextualLink (ActReqSndNewPwd,NULL, Lay_PutContextualLinkIconText (ActReqSndNewPwd,NULL,
Pwd_PutLinkToSendNewPasswdParams, Pwd_PutLinkToSendNewPasswdParams,
"key.svg", "key.svg",
Txt_Forgotten_password,Txt_Forgotten_password, Txt_Forgotten_password,
NULL); Txt_Forgotten_password);
} }
static void Pwd_PutLinkToSendNewPasswdParams (void) static void Pwd_PutLinkToSendNewPasswdParams (void)

View File

@ -182,10 +182,9 @@ void Pho_PutIconToChangeUsrPhoto (void)
{ {
TitleText = Gbl.Usrs.Me.MyPhotoExists ? Txt_Change_photo : TitleText = Gbl.Usrs.Me.MyPhotoExists ? Txt_Change_photo :
Txt_Upload_photo; Txt_Upload_photo;
Lay_PutContextualLink (ActReqMyPho,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActReqMyPho,NULL,NULL,
"camera.svg", "camera.svg",
TitleText,NULL, TitleText);
NULL);
} }
else // Not me else // Not me
if (Pho_ICanChangeOtherUsrPhoto (Gbl.Record.UsrDat)) if (Pho_ICanChangeOtherUsrPhoto (Gbl.Record.UsrDat))
@ -206,10 +205,10 @@ void Pho_PutIconToChangeUsrPhoto (void)
NextAction = ActReqOthPho; NextAction = ActReqOthPho;
break; break;
} }
Lay_PutContextualLink (NextAction,NULL,Rec_PutParamUsrCodEncrypted, Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
"camera.svg", Rec_PutParamUsrCodEncrypted,
TitleText,NULL, "camera.svg",
NULL); TitleText);
} }
} }
@ -223,10 +222,9 @@ static void Pho_PutIconToRequestRemoveMyPhoto (void)
/***** Link to request the removal of my photo *****/ /***** Link to request the removal of my photo *****/
if (Gbl.Usrs.Me.MyPhotoExists) if (Gbl.Usrs.Me.MyPhotoExists)
Lay_PutContextualLink (ActReqRemMyPho,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActReqRemMyPho,NULL,NULL,
"trash.svg", "trash.svg",
Txt_Remove_photo,NULL, Txt_Remove_photo);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -257,11 +255,10 @@ static void Pho_PutIconToRequestRemoveOtherUsrPhoto (void)
NextAction = ActReqRemOthPho; NextAction = ActReqRemOthPho;
break; break;
} }
Lay_PutContextualLink (NextAction,NULL, Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
Usr_PutParamOtherUsrCodEncrypted, Usr_PutParamOtherUsrCodEncrypted,
"trash.svg", "trash.svg",
Txt_Remove_photo,NULL, Txt_Remove_photo);
NULL);
} }
} }

View File

@ -299,10 +299,9 @@ void Plc_PutIconToViewPlaces (void)
{ {
extern const char *Txt_Places; extern const char *Txt_Places;
Lay_PutContextualLink (ActSeePlc,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActSeePlc,NULL,NULL,
"map-marker-alt.svg", "map-marker-alt.svg",
Txt_Places,NULL, Txt_Places);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -232,6 +232,7 @@ static void Pre_PutIconsToSelectSideCols (void)
extern const char *Txt_Columns; extern const char *Txt_Columns;
extern const char *Txt_LAYOUT_SIDE_COLUMNS[4]; extern const char *Txt_LAYOUT_SIDE_COLUMNS[4];
unsigned SideCols; unsigned SideCols;
char Icon[32 + 1];
Box_StartBox (NULL,Txt_Columns,Pre_PutIconsSideColumns, Box_StartBox (NULL,Txt_Columns,Pre_PutIconsSideColumns,
Hlp_PROFILE_Preferences_columns,Box_NOT_CLOSABLE); Hlp_PROFILE_Preferences_columns,Box_NOT_CLOSABLE);
@ -245,12 +246,10 @@ static void Pre_PutIconsToSelectSideCols (void)
"PREF_OFF"); "PREF_OFF");
Frm_StartForm (ActChgCol); Frm_StartForm (ActChgCol);
Par_PutHiddenParamUnsigned ("SideCols",SideCols); Par_PutHiddenParamUnsigned ("SideCols",SideCols);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/layout%u%u_32x20.gif\"" snprintf (Icon,sizeof (Icon),
" alt=\"%s\" title=\"%s\" class=\"ICO40x25\" />", "layout%u%u_32x20.gif",
Gbl.Prefs.URLIcons, SideCols >> 1,SideCols & 1);
SideCols >> 1,SideCols & 1, Ico_PutPrefIconLink (Icon,Txt_LAYOUT_SIDE_COLUMNS[SideCols]);
Txt_LAYOUT_SIDE_COLUMNS[SideCols],
Txt_LAYOUT_SIDE_COLUMNS[SideCols]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }

View File

@ -136,10 +136,11 @@ void Prf_PutLinkMyPublicProfile (void)
{ {
extern const char *Txt_My_public_profile; extern const char *Txt_My_public_profile;
Lay_PutContextualLink (ActSeeOthPubPrf,NULL,Usr_PutParamMyUsrCodEncrypted, Lay_PutContextualLinkIconText (ActSeeOthPubPrf,NULL,
"user.svg", Usr_PutParamMyUsrCodEncrypted,
Txt_My_public_profile,Txt_My_public_profile, "user.svg",
NULL); Txt_My_public_profile,
Txt_My_public_profile);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -150,10 +151,10 @@ void Prf_PutLinkRequestAnotherUserProfile (void)
{ {
extern const char *Txt_Another_user_s_profile; extern const char *Txt_Another_user_s_profile;
Lay_PutContextualLink (ActReqOthPubPrf,NULL,NULL, Lay_PutContextualLinkIconText (ActReqOthPubPrf,NULL,NULL,
"user.svg", "user.svg",
Txt_Another_user_s_profile,Txt_Another_user_s_profile, Txt_Another_user_s_profile,
NULL); Txt_Another_user_s_profile);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -380,12 +380,8 @@ static void Prj_ShowFormToFilterByMy_All (void)
Gbl.Prjs.SelectedOrder, Gbl.Prjs.SelectedOrder,
Gbl.Prjs.CurrentPage, Gbl.Prjs.CurrentPage,
-1L); -1L);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\"" Ico_PutPrefIconLink (WhoseProjectsImage[My_All],
" alt=\"%s\" title=\"%s\" class=\"ICOx25\"" Txt_PROJECT_MY_ALL_PROJECTS[My_All]);
" style=\"margin:0 auto;\" />",
Gbl.Prefs.URLIcons,WhoseProjectsImage[My_All],
Txt_PROJECT_MY_ALL_PROJECTS[My_All],
Txt_PROJECT_MY_ALL_PROJECTS[My_All]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
@ -419,12 +415,8 @@ static void Prj_ShowFormToFilterByPreassignedNonPreassig (void)
Gbl.Prjs.SelectedOrder, Gbl.Prjs.SelectedOrder,
Gbl.Prjs.CurrentPage, Gbl.Prjs.CurrentPage,
-1L); -1L);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\"" Ico_PutPrefIconLink (PreassignedNonpreassigImage[PreNon],
" alt=\"%s\" title=\"%s\" class=\"ICOx25\"" Txt_PROJECT_PREASSIGNED_NONPREASSIGNED_PLURAL[PreNon]);
" style=\"margin:0 auto;\" />",
Gbl.Prefs.URLIcons,PreassignedNonpreassigImage[PreNon],
Txt_PROJECT_PREASSIGNED_NONPREASSIGNED_PLURAL[PreNon],
Txt_PROJECT_PREASSIGNED_NONPREASSIGNED_PLURAL[PreNon]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
@ -463,13 +455,8 @@ static void Prj_ShowFormToFilterByHidden (void)
Gbl.Prjs.SelectedOrder, Gbl.Prjs.SelectedOrder,
Gbl.Prjs.CurrentPage, Gbl.Prjs.CurrentPage,
-1L); -1L);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\"" Ico_PutPrefIconLink (HiddenVisiblImage[HidVis],
" alt=\"%s\" title=\"%s\" class=\"ICOx25\"" Txt_PROJECT_HIDDEN_VISIBL_PROJECTS[HidVis]);
" style=\"margin:0 auto;\" />",
Gbl.Prefs.URLIcons,
HiddenVisiblImage[HidVis],
Txt_PROJECT_HIDDEN_VISIBL_PROJECTS[HidVis],
Txt_PROJECT_HIDDEN_VISIBL_PROJECTS[HidVis]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
@ -847,10 +834,9 @@ static void Prj_PutIconToShowAllData (void)
{ {
extern const char *Txt_Show_all_data_in_a_table; extern const char *Txt_Show_all_data_in_a_table;
Lay_PutContextualLink (ActSeeTblAllPrj,NULL,Prj_PutCurrentParams, Lay_PutContextualLinkOnlyIcon (ActSeeTblAllPrj,NULL,Prj_PutCurrentParams,
"table.svg", "table.svg",
Txt_Show_all_data_in_a_table,NULL, Txt_Show_all_data_in_a_table);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -1677,10 +1663,10 @@ static void Prj_ShowOneProjectMembersWithARole (const struct Project *Prj,
if (ProjectView == Prj_EDIT_ONE_PROJECT) if (ProjectView == Prj_EDIT_ONE_PROJECT)
{ {
fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP\" style=\"width:30px;\">"); fprintf (Gbl.F.Out,"<td class=\"CENTER_TOP\" style=\"width:30px;\">");
Lay_PutContextualLink (ActionReqRemUsr[RoleInProject],NULL,Prj_PutCurrentParams, Lay_PutContextualLinkOnlyIcon (ActionReqRemUsr[RoleInProject],NULL,
"trash.svg", Prj_PutCurrentParams,
Txt_Remove,NULL, "trash.svg",
NULL); Txt_Remove);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }

View File

@ -995,10 +995,10 @@ void Rec_PutLinkToEditRecordFields (void)
extern const char *Txt_Edit_record_fields; extern const char *Txt_Edit_record_fields;
/***** Link to edit record fields *****/ /***** Link to edit record fields *****/
Lay_PutContextualLink (ActEdiRecFie,NULL,NULL, Lay_PutContextualLinkIconText (ActEdiRecFie,NULL,NULL,
"pen.svg", "pen.svg",
Txt_Edit_record_fields,Txt_Edit_record_fields, Txt_Edit_record_fields,
NULL); Txt_Edit_record_fields);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2549,45 +2549,40 @@ static void Rec_PutIconsCommands (void)
if (ItsMe) if (ItsMe)
/***** Button to edit my record card *****/ /***** Button to edit my record card *****/
Lay_PutContextualLink (ActReqEdiRecSha,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActReqEdiRecSha,NULL,NULL,
"pen.svg", "pen.svg",
Txt_Edit_my_personal_data,NULL, Txt_Edit_my_personal_data);
NULL);
if (ICanViewUsrProfile) if (ICanViewUsrProfile)
/***** Button to view user's profile *****/ /***** Button to view user's profile *****/
Lay_PutContextualLink (ActSeeOthPubPrf,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeOthPubPrf,NULL,
Rec_PutParamUsrCodEncrypted, Rec_PutParamUsrCodEncrypted,
"user.svg", "user.svg",
ItsMe ? Txt_My_public_profile : ItsMe ? Txt_My_public_profile :
Txt_Another_user_s_profile,NULL, Txt_Another_user_s_profile);
NULL);
/***** Button to view user's record card *****/ /***** Button to view user's record card *****/
if (Usr_CheckIfICanViewRecordStd (Gbl.Record.UsrDat)) if (Usr_CheckIfICanViewRecordStd (Gbl.Record.UsrDat))
/* View student's records: common record card and course record card */ /* View student's records: common record card and course record card */
Lay_PutContextualLink (ActSeeRecOneStd,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeRecOneStd,NULL,
Rec_PutParamUsrCodEncrypted, Rec_PutParamUsrCodEncrypted,
"card.svg", "card.svg",
Txt_View_record_for_this_course,NULL, Txt_View_record_for_this_course);
NULL);
else if (Usr_CheckIfICanViewRecordTch (Gbl.Record.UsrDat)) else if (Usr_CheckIfICanViewRecordTch (Gbl.Record.UsrDat))
Lay_PutContextualLink (ActSeeRecOneTch,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeRecOneTch,NULL,
Rec_PutParamUsrCodEncrypted, Rec_PutParamUsrCodEncrypted,
"card.svg", "card.svg",
Txt_View_record_and_office_hours,NULL, Txt_View_record_and_office_hours);
NULL);
/***** Button to view user's agenda *****/ /***** Button to view user's agenda *****/
if (ItsMe) if (ItsMe)
Lay_PutContextualLink (ActSeeMyAgd,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeMyAgd,NULL,NULL,
"calendar.svg", "calendar.svg",
Txt_Show_agenda,NULL, Txt_Show_agenda);
NULL);
else if (Usr_CheckIfICanViewUsrAgenda (Gbl.Record.UsrDat)) else if (Usr_CheckIfICanViewUsrAgenda (Gbl.Record.UsrDat))
Lay_PutContextualLink (ActSeeUsrAgd,NULL,Rec_PutParamUsrCodEncrypted, Lay_PutContextualLinkOnlyIcon (ActSeeUsrAgd,NULL,
"calendar.svg", Rec_PutParamUsrCodEncrypted,
Txt_Show_agenda,NULL, "calendar.svg",
NULL); Txt_Show_agenda);
/***** Button to admin user *****/ /***** Button to admin user *****/
if (ItsMe || if (ItsMe ||
@ -2612,11 +2607,10 @@ static void Rec_PutIconsCommands (void)
NextAction = ActReqMdfOth; NextAction = ActReqMdfOth;
break; break;
} }
Lay_PutContextualLink (NextAction,NULL, Lay_PutContextualLinkOnlyIcon (NextAction,NULL,
Rec_PutParamUsrCodEncrypted, Rec_PutParamUsrCodEncrypted,
"user-cog.svg", "user-cog.svg",
Txt_Administer_user,NULL, Txt_Administer_user);
NULL);
} }
if (Gbl.CurrentCrs.Crs.CrsCod > 0) // A course is selected if (Gbl.CurrentCrs.Crs.CrsCod > 0) // A course is selected
@ -2627,45 +2621,42 @@ static void Rec_PutIconsCommands (void)
if (Usr_CheckIfICanViewTst (Gbl.Record.UsrDat)) if (Usr_CheckIfICanViewTst (Gbl.Record.UsrDat))
{ {
if (ItsMe) if (ItsMe)
Lay_PutContextualLink (ActSeeMyTstRes,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeMyTstRes,NULL,NULL,
"check.svg", "check.svg",
Txt_View_test_results,NULL, Txt_View_test_results);
NULL);
else // Not me else // Not me
Lay_PutContextualLink (ActSeeUsrTstRes,NULL,Rec_PutParamsStudent, Lay_PutContextualLinkOnlyIcon (ActSeeUsrTstRes,NULL,
"check.svg", Rec_PutParamsStudent,
Txt_View_test_results,NULL, "check.svg",
NULL); Txt_View_test_results);
} }
/***** Button to view student's assignments and works *****/ /***** Button to view student's assignments and works *****/
if (Usr_CheckIfICanViewAsgWrk (Gbl.Record.UsrDat)) if (Usr_CheckIfICanViewAsgWrk (Gbl.Record.UsrDat))
{ {
if (ItsMe) if (ItsMe)
Lay_PutContextualLink (ActAdmAsgWrkUsr,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActAdmAsgWrkUsr,NULL,NULL,
"folder-open.svg", "folder-open.svg",
Txt_View_homework,NULL, Txt_View_homework);
NULL); else // Not me, I am not a student in current course
else // Not me // I am not a student in current course Lay_PutContextualLinkOnlyIcon (ActAdmAsgWrkCrs,NULL,
Lay_PutContextualLink (ActAdmAsgWrkCrs,NULL,Rec_PutParamsWorks, Rec_PutParamsWorks,
"folder-open.svg", "folder-open.svg",
Txt_View_homework,NULL, Txt_View_homework);
NULL);
} }
/***** Button to view student's attendance *****/ /***** Button to view student's attendance *****/
if (Usr_CheckIfICanViewAtt (Gbl.Record.UsrDat)) if (Usr_CheckIfICanViewAtt (Gbl.Record.UsrDat))
{ {
if (ItsMe) if (ItsMe)
Lay_PutContextualLink (ActSeeLstMyAtt,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActSeeLstMyAtt,NULL,NULL,
"calendar-check.svg", "calendar-check.svg",
Txt_View_attendance,NULL, Txt_View_attendance);
NULL);
else // Not me else // Not me
Lay_PutContextualLink (ActSeeLstStdAtt,NULL,Rec_PutParamsStudent, Lay_PutContextualLinkOnlyIcon (ActSeeLstStdAtt,NULL,
"calendar-check.svg", Rec_PutParamsStudent,
Txt_View_attendance,NULL, "calendar-check.svg",
NULL); Txt_View_attendance);
} }
} }
} }
@ -2674,10 +2665,9 @@ static void Rec_PutIconsCommands (void)
QR_PutLinkToPrintQRCode (ActPrnUsrQR,Rec_PutParamUsrCodEncrypted); QR_PutLinkToPrintQRCode (ActPrnUsrQR,Rec_PutParamUsrCodEncrypted);
/***** Button to send a message *****/ /***** Button to send a message *****/
Lay_PutContextualLink (ActReqMsgUsr,NULL,Rec_PutParamsMsgUsr, Lay_PutContextualLinkOnlyIcon (ActReqMsgUsr,NULL,Rec_PutParamsMsgUsr,
"envelope.svg", "envelope.svg",
Txt_Write_a_message,NULL, Txt_Write_a_message);
NULL);
/***** Button to follow / unfollow *****/ /***** Button to follow / unfollow *****/
if (!ItsMe) // Not me if (!ItsMe) // Not me
@ -2685,15 +2675,15 @@ static void Rec_PutIconsCommands (void)
if (Fol_CheckUsrIsFollowerOf (Gbl.Usrs.Me.UsrDat.UsrCod, if (Fol_CheckUsrIsFollowerOf (Gbl.Usrs.Me.UsrDat.UsrCod,
Gbl.Record.UsrDat->UsrCod)) Gbl.Record.UsrDat->UsrCod))
// I follow user // I follow user
Lay_PutContextualLink (ActUnfUsr,NULL,Rec_PutParamUsrCodEncrypted, Lay_PutContextualLinkOnlyIcon (ActUnfUsr,NULL,
"user-check.svg", Rec_PutParamUsrCodEncrypted,
Txt_Following_unfollow,NULL, "user-check.svg",
NULL); // Put button to unfollow, even if I can not view user's profile Txt_Following_unfollow); // Put button to unfollow, even if I can not view user's profile
else if (ICanViewUsrProfile) else if (ICanViewUsrProfile)
Lay_PutContextualLink (ActFolUsr,NULL,Rec_PutParamUsrCodEncrypted, Lay_PutContextualLinkOnlyIcon (ActFolUsr,NULL,
"user-plus.svg", Rec_PutParamUsrCodEncrypted,
Txt_Follow,NULL, "user-plus.svg",
NULL); // Put button to follow Txt_Follow); // Put button to follow
} }
/***** Button to change user's photo *****/ /***** Button to change user's photo *****/

View File

@ -333,13 +333,7 @@ void Sch_PutMagnifyingGlassButton (const char *Icon)
extern const char *Txt_Search; extern const char *Txt_Search;
/***** Send button *****/ /***** Send button *****/
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\"" Ico_PutIconLink (Icon,Txt_Search);
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />",
Gbl.Prefs.URLIcons,
Icon,
Txt_Search,
Txt_Search);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1879,7 +1879,7 @@ static void Soc_PutFormGoToAction (const struct SocialNote *SocNot)
Frm_LinkFormSubmitUnique (Txt_SOCIAL_NOTE[SocNot->NoteType],Class); Frm_LinkFormSubmitUnique (Txt_SOCIAL_NOTE[SocNot->NoteType],Class);
fprintf (Gbl.F.Out,"<img src=\"%s/%s\"" fprintf (Gbl.F.Out,"<img src=\"%s/%s\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />" " class=\"CONTEXT_ICO_x16\" />"
"&nbsp;%s" "&nbsp;%s"
"</a>", "</a>",
Gbl.Prefs.URLIcons,Soc_Icons[SocNot->NoteType], Gbl.Prefs.URLIcons,Soc_Icons[SocNot->NoteType],
@ -2360,7 +2360,7 @@ static void Soc_PutIconToToggleCommentSocialNote (const char UniqueId[Frm_MAX_BY
" onclick=\"toggleDisplay('%s');return false;\" />" " onclick=\"toggleDisplay('%s');return false;\" />"
"<img src=\"%s/edit.svg\"" "<img src=\"%s/edit.svg\""
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />" " class=\"CONTEXT_ICO_x16\" />"
"</a>" "</a>"
"</div>", "</div>",
UniqueId, UniqueId,
@ -2672,15 +2672,8 @@ static void Soc_PutFormToRemoveComment (long PubCod)
/***** Form to remove social publishing *****/ /***** Form to remove social publishing *****/
Soc_FormStart (ActReqRemSocComGbl,ActReqRemSocComUsr); Soc_FormStart (ActReqRemSocComGbl,ActReqRemSocComUsr);
Soc_PutHiddenParamPubCod (PubCod); Soc_PutHiddenParamPubCod (PubCod);
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICO_REMOVE ICO_HIGHLIGHT\">" Ico_PutDivIconLink ("SOCIAL_ICO_REMOVE",
"<input type=\"image\"" "trash.svg",Txt_Remove);
" src=\"%s/trash.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />"
"</div>",
Gbl.Prefs.URLIcons,
Txt_Remove,
Txt_Remove);
Frm_EndForm (); Frm_EndForm ();
} }
@ -2696,14 +2689,8 @@ static void Soc_PutFormToFavSocialComment (long PubCod)
/***** Form to mark social comment as favourite *****/ /***** Form to mark social comment as favourite *****/
Soc_FormStart (ActFavSocComGbl,ActFavSocComUsr); Soc_FormStart (ActFavSocComGbl,ActFavSocComUsr);
Soc_PutHiddenParamPubCod (PubCod); Soc_PutHiddenParamPubCod (PubCod);
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICO_FAV ICO_HIGHLIGHT\">" Ico_PutDivIconLink ("SOCIAL_ICO_FAV",
"<input type=\"image\"" "star.svg",Txt_Mark_as_favourite);
" src=\"%s/star.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />"
"</div>",
Gbl.Prefs.URLIcons,
Txt_Mark_as_favourite,Txt_Mark_as_favourite);
Frm_EndForm (); Frm_EndForm ();
} }
@ -2725,13 +2712,8 @@ static void Soc_PutDisabledIconShare (unsigned NumShared)
Lay_MAX_BYTES_TITLE); Lay_MAX_BYTES_TITLE);
/***** Disabled icon to share *****/ /***** Disabled icon to share *****/
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICO_SHARE_DISABLED\">" Ico_PutDivIcon ("SOCIAL_ICO_SHARE_DISABLED",
"<img src=\"%s/share-alt.svg\"" "share-alt.svg",Gbl.Title);
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />"
"</div>",
Gbl.Prefs.URLIcons,
Gbl.Title,Gbl.Title);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2752,13 +2734,8 @@ static void Soc_PutDisabledIconFav (unsigned NumFavs)
Lay_MAX_BYTES_TITLE); Lay_MAX_BYTES_TITLE);
/***** Disabled icon to mark as favourite *****/ /***** Disabled icon to mark as favourite *****/
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICO_FAV_DISABLED\">" Ico_PutDivIcon ("SOCIAL_ICO_FAV_DISABLED",
"<img src=\"%s/star.svg\"" "star.svg",Gbl.Title);
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />"
"</div>",
Gbl.Prefs.URLIcons,
Gbl.Title,Gbl.Title);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2773,14 +2750,8 @@ static void Soc_PutFormToShareSocialNote (long NotCod)
/***** Form to share social note *****/ /***** Form to share social note *****/
Soc_FormStart (ActShaSocNotGbl,ActShaSocNotUsr); Soc_FormStart (ActShaSocNotGbl,ActShaSocNotUsr);
Soc_PutHiddenParamNotCod (NotCod); Soc_PutHiddenParamNotCod (NotCod);
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICO_SHARE ICO_HIGHLIGHT\">" Ico_PutDivIconLink ("SOCIAL_ICO_SHARE",
"<input type=\"image\"" "share-alt.svg",Txt_Share);
" src=\"%s/share-alt.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />"
"</div>",
Gbl.Prefs.URLIcons,
Txt_Share,Txt_Share);
Frm_EndForm (); Frm_EndForm ();
} }
@ -2796,14 +2767,8 @@ static void Soc_PutFormToFavSocialNote (long NotCod)
/***** Form to mark social note as favourite *****/ /***** Form to mark social note as favourite *****/
Soc_FormStart (ActFavSocNotGbl,ActFavSocNotUsr); Soc_FormStart (ActFavSocNotGbl,ActFavSocNotUsr);
Soc_PutHiddenParamNotCod (NotCod); Soc_PutHiddenParamNotCod (NotCod);
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICO_FAV ICO_HIGHLIGHT\">" Ico_PutDivIconLink ("SOCIAL_ICO_FAV",
"<input type=\"image\"" "star.svg",Txt_Mark_as_favourite);
" src=\"%s/star.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />"
"</div>",
Gbl.Prefs.URLIcons,
Txt_Mark_as_favourite,Txt_Mark_as_favourite);
Frm_EndForm (); Frm_EndForm ();
} }
@ -2819,14 +2784,8 @@ static void Soc_PutFormToUnshareSocialNote (long NotCod)
/***** Form to share social publishing *****/ /***** Form to share social publishing *****/
Soc_FormStart (ActUnsSocNotGbl,ActUnsSocNotUsr); Soc_FormStart (ActUnsSocNotGbl,ActUnsSocNotUsr);
Soc_PutHiddenParamNotCod (NotCod); Soc_PutHiddenParamNotCod (NotCod);
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICO_SHARE ICO_HIGHLIGHT\">" Ico_PutDivIconLink ("SOCIAL_ICO_SHARE",
"<input type=\"image\"" "share-alt-green.svg",Txt_SOCIAL_NOTE_Shared);
" src=\"%s/share-alt-green.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />"
"</div>",
Gbl.Prefs.URLIcons,
Txt_SOCIAL_NOTE_Shared,Txt_SOCIAL_NOTE_Shared);
Frm_EndForm (); Frm_EndForm ();
} }
@ -2842,14 +2801,8 @@ static void Soc_PutFormToUnfavSocialNote (long NotCod)
/***** Form to unfav social note *****/ /***** Form to unfav social note *****/
Soc_FormStart (ActUnfSocNotGbl,ActUnfSocNotUsr); Soc_FormStart (ActUnfSocNotGbl,ActUnfSocNotUsr);
Soc_PutHiddenParamNotCod (NotCod); Soc_PutHiddenParamNotCod (NotCod);
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICO_FAV ICO_HIGHLIGHT\">" Ico_PutDivIconLink ("SOCIAL_ICO_FAV",
"<input type=\"image\"" "star-yellow.svg",Txt_SOCIAL_NOTE_Favourite);
" src=\"%s/star-yellow.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />"
"</div>",
Gbl.Prefs.URLIcons,
Txt_SOCIAL_NOTE_Favourite,Txt_SOCIAL_NOTE_Favourite);
Frm_EndForm (); Frm_EndForm ();
} }
@ -2865,14 +2818,8 @@ static void Soc_PutFormToUnfavSocialComment (long PubCod)
/***** Form to unfav social comment *****/ /***** Form to unfav social comment *****/
Soc_FormStart (ActUnfSocComGbl,ActUnfSocComUsr); Soc_FormStart (ActUnfSocComGbl,ActUnfSocComUsr);
Soc_PutHiddenParamPubCod (PubCod); Soc_PutHiddenParamPubCod (PubCod);
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICO_FAV ICO_HIGHLIGHT\">" Ico_PutDivIconLink ("SOCIAL_ICO_FAV",
"<input type=\"image\"" "star-yellow.svg",Txt_SOCIAL_NOTE_Favourite);
" src=\"%s/star-yellow.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />"
"</div>",
Gbl.Prefs.URLIcons,
Txt_SOCIAL_NOTE_Favourite,Txt_SOCIAL_NOTE_Favourite);
Frm_EndForm (); Frm_EndForm ();
} }
@ -2888,15 +2835,8 @@ static void Soc_PutFormToRemoveSocialPublishing (long NotCod)
/***** Form to remove social publishing *****/ /***** Form to remove social publishing *****/
Soc_FormStart (ActReqRemSocPubGbl,ActReqRemSocPubUsr); Soc_FormStart (ActReqRemSocPubGbl,ActReqRemSocPubUsr);
Soc_PutHiddenParamNotCod (NotCod); Soc_PutHiddenParamNotCod (NotCod);
fprintf (Gbl.F.Out,"<div class=\"SOCIAL_ICO_REMOVE ICO_HIGHLIGHT\">" Ico_PutDivIconLink ("SOCIAL_ICO_REMOVE",
"<input type=\"image\"" "trash.svg",Txt_Remove);
" src=\"%s/trash.svg\""
" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />"
"</div>",
Gbl.Prefs.URLIcons,
Txt_Remove,
Txt_Remove);
Frm_EndForm (); Frm_EndForm ();
} }

View File

@ -752,10 +752,10 @@ static void Sta_PutLinkToCourseHits (void)
case Rol_NET: case Rol_NET:
case Rol_TCH: case Rol_TCH:
case Rol_SYS_ADM: case Rol_SYS_ADM:
Lay_PutContextualLink (ActReqAccCrs,NULL,NULL, Lay_PutContextualLinkIconText (ActReqAccCrs,NULL,NULL,
"chart-line.svg", "chart-line.svg",
Txt_Visits_to_course,Txt_Visits_to_course, Txt_Visits_to_course,
NULL); Txt_Visits_to_course);
break; break;
default: default:
break; break;
@ -770,10 +770,10 @@ static void Sta_PutLinkToGlobalHits (void)
{ {
extern const char *Txt_Global_visits; extern const char *Txt_Global_visits;
Lay_PutContextualLink (ActReqAccGbl,NULL,NULL, Lay_PutContextualLinkIconText (ActReqAccGbl,NULL,NULL,
"chart-line.svg", "chart-line.svg",
Txt_Global_visits,Txt_Global_visits, Txt_Global_visits,
NULL); Txt_Global_visits);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -4133,10 +4133,9 @@ void Sta_PutIconToShowFigure (void)
{ {
extern const char *Txt_Show_statistic; extern const char *Txt_Show_statistic;
Lay_PutContextualLink (ActSeeUseGbl,NULL,Sta_PutParamsToShowFigure, Lay_PutContextualLinkOnlyIcon (ActSeeUseGbl,NULL,Sta_PutParamsToShowFigure,
"chart-pie.svg", "chart-pie.svg",
Txt_Show_statistic,NULL, Txt_Show_statistic);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -9665,10 +9664,10 @@ void Con_PutLinkToLastClicks (void)
{ {
extern const char *Txt_Last_clicks; extern const char *Txt_Last_clicks;
Lay_PutContextualLink (ActLstClk,NULL,NULL, Lay_PutContextualLinkIconText (ActLstClk,NULL,NULL,
"mouse-pointer.svg", "mouse-pointer.svg",
Txt_Last_clicks,Txt_Last_clicks, Txt_Last_clicks,
NULL); Txt_Last_clicks);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -811,10 +811,9 @@ static void Svy_PutFormsToRemEditOneSvy (long SvyCod,bool Visible)
Ico_PutContextualIconToRemove (ActReqRemSvy,Svy_PutParams); Ico_PutContextualIconToRemove (ActReqRemSvy,Svy_PutParams);
/***** Put form to reset survey *****/ /***** Put form to reset survey *****/
Lay_PutContextualLink (ActReqRstSvy,NULL,Svy_PutParams, Lay_PutContextualLinkOnlyIcon (ActReqRstSvy,NULL,Svy_PutParams,
"recycle.svg", "recycle.svg",
Txt_Reset,NULL, Txt_Reset);
NULL);
/***** Put form to hide/show survey *****/ /***** Put form to hide/show survey *****/
if (Visible) if (Visible)

View File

@ -628,12 +628,11 @@ static void Syl_ShowRowSyllabus (unsigned NumItem,
LstItemsSyllabus.Lst[NumItem].HasChildren ? Txt_Move_up_X_and_its_subsections : LstItemsSyllabus.Lst[NumItem].HasChildren ? Txt_Move_up_X_and_its_subsections :
Txt_Move_up_X, Txt_Move_up_X,
StrItemCod); StrItemCod);
Lay_PutContextualLink (Gbl.CurrentCrs.Info.Type == Inf_LECTURES ? ActUp_IteSylLec : Lay_PutContextualLinkOnlyIcon (Gbl.CurrentCrs.Info.Type == Inf_LECTURES ? ActUp_IteSylLec :
ActUp_IteSylPra, ActUp_IteSylPra,
NULL,Syl_PutParamNumItem, NULL,Syl_PutParamNumItem,
"arrow-up.svg", "arrow-up.svg",
Gbl.Title,NULL, Gbl.Title);
NULL);
} }
else else
Ico_PutIconOff ("arrow-up.svg",Txt_Movement_not_allowed); Ico_PutIconOff ("arrow-up.svg",Txt_Movement_not_allowed);
@ -648,12 +647,11 @@ static void Syl_ShowRowSyllabus (unsigned NumItem,
LstItemsSyllabus.Lst[NumItem].HasChildren ? Txt_Move_down_X_and_its_subsections : LstItemsSyllabus.Lst[NumItem].HasChildren ? Txt_Move_down_X_and_its_subsections :
Txt_Move_down_X, Txt_Move_down_X,
StrItemCod); StrItemCod);
Lay_PutContextualLink (Gbl.CurrentCrs.Info.Type == Inf_LECTURES ? ActDwnIteSylLec : Lay_PutContextualLinkOnlyIcon (Gbl.CurrentCrs.Info.Type == Inf_LECTURES ? ActDwnIteSylLec :
ActDwnIteSylPra, ActDwnIteSylPra,
NULL,Syl_PutParamNumItem, NULL,Syl_PutParamNumItem,
"arrow-down.svg", "arrow-down.svg",
Gbl.Title,NULL, Gbl.Title);
NULL);
} }
else else
Ico_PutIconOff ("arrow-down.svg",Txt_Movement_not_allowed); Ico_PutIconOff ("arrow-down.svg",Txt_Movement_not_allowed);
@ -666,12 +664,11 @@ static void Syl_ShowRowSyllabus (unsigned NumItem,
snprintf (Gbl.Title,sizeof (Gbl.Title), snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Increase_level_of_X, Txt_Increase_level_of_X,
StrItemCod); StrItemCod);
Lay_PutContextualLink (Gbl.CurrentCrs.Info.Type == Inf_LECTURES ? ActRgtIteSylLec : Lay_PutContextualLinkOnlyIcon (Gbl.CurrentCrs.Info.Type == Inf_LECTURES ? ActRgtIteSylLec :
ActRgtIteSylPra, ActRgtIteSylPra,
NULL,Syl_PutParamNumItem, NULL,Syl_PutParamNumItem,
"arrow-left.svg", "arrow-left.svg",
Gbl.Title,NULL, Gbl.Title);
NULL);
} }
else else
Ico_PutIconOff ("arrow-left.svg",Txt_Movement_not_allowed); Ico_PutIconOff ("arrow-left.svg",Txt_Movement_not_allowed);
@ -685,12 +682,11 @@ static void Syl_ShowRowSyllabus (unsigned NumItem,
snprintf (Gbl.Title,sizeof (Gbl.Title), snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Decrease_level_of_X, Txt_Decrease_level_of_X,
StrItemCod); StrItemCod);
Lay_PutContextualLink (Gbl.CurrentCrs.Info.Type == Inf_LECTURES ? ActLftIteSylLec : Lay_PutContextualLinkOnlyIcon (Gbl.CurrentCrs.Info.Type == Inf_LECTURES ? ActLftIteSylLec :
ActLftIteSylPra, ActLftIteSylPra,
NULL,Syl_PutParamNumItem, NULL,Syl_PutParamNumItem,
"arrow-right.svg", "arrow-right.svg",
Gbl.Title,NULL, Gbl.Title);
NULL);
} }
else else
Ico_PutIconOff ("arrow-right.svg",Txt_Movement_not_allowed); Ico_PutIconOff ("arrow-right.svg",Txt_Movement_not_allowed);

View File

@ -412,10 +412,10 @@ static void Tst_PutFormToViewResultsOfUsersTests (Act_Action_t Action)
extern const char *Txt_Test_results; extern const char *Txt_Test_results;
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Lay_PutContextualLink (Action,NULL,NULL, Lay_PutContextualLinkIconText (Action,NULL,NULL,
"tasks.svg", "tasks.svg",
Txt_Test_results,Txt_Test_results, Txt_Test_results,
NULL); Txt_Test_results);
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
@ -1454,10 +1454,9 @@ static void Tst_PutIconsTests (void)
/***** Put form to go to test configuration *****/ /***** Put form to go to test configuration *****/
if (Gbl.Action.Act != ActCfgTst) if (Gbl.Action.Act != ActCfgTst)
Lay_PutContextualLink (ActCfgTst,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActCfgTst,NULL,NULL,
"cog.svg", "cog.svg",
Txt_Configure,NULL, Txt_Configure);
NULL);
} }
/***** Put icon to show a figure *****/ /***** Put icon to show a figure *****/
@ -1888,12 +1887,7 @@ static void Tst_PutIconEnable (long TagCod,const char *TagTxt)
snprintf (Gbl.Title,sizeof (Gbl.Title), snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Tag_X_not_allowed_Click_to_allow_it, Txt_Tag_X_not_allowed_Click_to_allow_it,
TagTxt); TagTxt);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/eye-slash.svg\"" Ico_PutIconLink ("eye-slash.svg",Gbl.Title);
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Gbl.Prefs.URLIcons,
Gbl.Title,
Gbl.Title);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -1912,12 +1906,7 @@ static void Tst_PutIconDisable (long TagCod,const char *TagTxt)
snprintf (Gbl.Title,sizeof (Gbl.Title), snprintf (Gbl.Title,sizeof (Gbl.Title),
Txt_Tag_X_allowed_Click_to_disable_it, Txt_Tag_X_allowed_Click_to_disable_it,
TagTxt); TagTxt);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/eye.svg\"" Ico_PutIconLink ("eye.svg",Gbl.Title);
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Gbl.Prefs.URLIcons,
Gbl.Title,
Gbl.Title);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
} }
@ -7966,12 +7955,7 @@ static void Tst_ShowTestResults (struct UsrData *UsrDat)
Frm_StartForm (Gbl.Action.Act == ActSeeMyTstRes ? ActSeeOneTstResMe : Frm_StartForm (Gbl.Action.Act == ActSeeMyTstRes ? ActSeeOneTstResMe :
ActSeeOneTstResOth); ActSeeOneTstResOth);
Tst_PutParamTstCod (TstCod); Tst_PutParamTstCod (TstCod);
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/tasks.svg\"" Ico_PutIconLink ("tasks.svg",Txt_View_test);
" alt=\"%s\" title=\"%s\""
" class=\"ICO16x16\" />",
Gbl.Prefs.URLIcons,
Txt_View_test,
Txt_View_test);
Frm_EndForm (); Frm_EndForm ();
} }
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"

View File

@ -91,10 +91,10 @@ void TsI_PutFormToExportQuestions (void)
extern const char *Txt_Export_questions; extern const char *Txt_Export_questions;
/***** Put a link to create a file with questions *****/ /***** Put a link to create a file with questions *****/
Lay_PutContextualLink (ActLstTstQst,NULL,TsI_PutParamsExportQsts, Lay_PutContextualLinkIconText (ActLstTstQst,NULL,TsI_PutParamsExportQsts,
"file-import.svg", "file-import.svg",
Txt_Export_questions_to_XML_file,Txt_Export_questions, Txt_Export_questions_to_XML_file,
NULL); Txt_Export_questions);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -120,11 +120,10 @@ void TsI_PutFormToImportQuestions (void)
extern const char *Txt_Import_questions; extern const char *Txt_Import_questions;
/***** Put a link to create a file with questions *****/ /***** Put a link to create a file with questions *****/
Lay_PutContextualLink (ActReqImpTstQst,NULL,NULL, Lay_PutContextualLinkIconText (ActReqImpTstQst,NULL,NULL,
"file-export.svg", "file-export.svg",
Txt_Import_questions_from_XML_file, Txt_Import_questions_from_XML_file,
Txt_Import_questions, Txt_Import_questions);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -2082,7 +2082,7 @@ const char *Txt_Assignment =
#elif L==9 // pt #elif L==9 // pt
"Atividade"; "Atividade";
#endif #endif
/*
const char *Txt_ASSIGNMENT_TYPES[Asg_NUM_TYPES_SEND_WORK] = const char *Txt_ASSIGNMENT_TYPES[Asg_NUM_TYPES_SEND_WORK] =
{ {
#if L==1 // ca #if L==1 // ca
@ -2125,7 +2125,7 @@ const char *Txt_ASSIGNMENT_TYPES[Asg_NUM_TYPES_SEND_WORK] =
"&Eacute; obrigat&oacute;ria a apresenta&ccedil;&atilde;o de trabalhos (arquivos)" "&Eacute; obrigat&oacute;ria a apresenta&ccedil;&atilde;o de trabalhos (arquivos)"
#endif #endif
}; };
*/
const char *Txt_Assignment_X_is_now_hidden = // Warning: it is very important to include %s in the following sentences const char *Txt_Assignment_X_is_now_hidden = // Warning: it is very important to include %s in the following sentences
#if L==1 // ca #if L==1 // ca
"La activitat <strong>%s</strong> ara est&agrave; oculta."; "La activitat <strong>%s</strong> ara est&agrave; oculta.";

View File

@ -233,6 +233,7 @@ void The_PutIconsToSelectTheme (void)
extern const char *Hlp_PROFILE_Preferences_theme; extern const char *Hlp_PROFILE_Preferences_theme;
extern const char *Txt_Theme_SKIN; extern const char *Txt_Theme_SKIN;
The_Theme_t Theme; The_Theme_t Theme;
char Icon[PATH_MAX + 1];
Box_StartBox (NULL,Txt_Theme_SKIN,The_PutIconsTheme, Box_StartBox (NULL,Txt_Theme_SKIN,The_PutIconsTheme,
Hlp_PROFILE_Preferences_theme,Box_NOT_CLOSABLE); Hlp_PROFILE_Preferences_theme,Box_NOT_CLOSABLE);
@ -246,14 +247,11 @@ void The_PutIconsToSelectTheme (void)
"PREF_OFF"); "PREF_OFF");
Frm_StartForm (ActChgThe); Frm_StartForm (ActChgThe);
Par_PutHiddenParamString ("Theme",The_ThemeId[Theme]); Par_PutHiddenParamString ("Theme",The_ThemeId[Theme]);
fprintf (Gbl.F.Out,"<input type=\"image\"" snprintf (Icon,sizeof (Icon),
" src=\"%s/%s/%s/theme_32x20.gif\" alt=\"%s\"" "%s/%s/theme_32x20.gif",
" title=\"%s\" class=\"ICO40x25\" />", Cfg_ICON_FOLDER_THEMES,
Gbl.Prefs.URLIcons, The_ThemeId[Theme]);
Cfg_ICON_FOLDER_THEMES, Ico_PutPrefIconLink (Icon,The_ThemeNames[Theme]);
The_ThemeId[Theme],
The_ThemeNames[Theme],
The_ThemeNames[Theme]);
Frm_EndForm (); Frm_EndForm ();
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }

View File

@ -378,8 +378,7 @@ void TT_ShowClassTimeTable (void)
/***** Show form to change first day of week *****/ /***** Show form to change first day of week *****/
Cal_ShowFormToSelFirstDayOfWeek (ActChgTT1stDay[Gbl.TimeTable.Type], Cal_ShowFormToSelFirstDayOfWeek (ActChgTT1stDay[Gbl.TimeTable.Type],
Grp_PutParamWhichGrps, Grp_PutParamWhichGrps);
"ICOx25");
} }
/***** Show the time table *****/ /***** Show the time table *****/

View File

@ -2419,10 +2419,10 @@ void Usr_PutLinkToLogin (void)
{ {
extern const char *Txt_Log_in; extern const char *Txt_Log_in;
Lay_PutContextualLink (ActFrmLogIn,NULL,NULL, Lay_PutContextualLinkIconText (ActFrmLogIn,NULL,NULL,
"sign-in-alt-green.svg", "sign-in-alt-green.svg",
Txt_Log_in,Txt_Log_in, Txt_Log_in,
NULL); Txt_Log_in);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -2462,7 +2462,7 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) ())
fprintf (Gbl.F.Out,"<div class=\"LEFT_MIDDLE\">" fprintf (Gbl.F.Out,"<div class=\"LEFT_MIDDLE\">"
"<label for=\"UsrId\">" "<label for=\"UsrId\">"
"<img src=\"%s/user.svg\" alt=\"%s\" title=\"%s\"" "<img src=\"%s/user.svg\" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />" " class=\"CONTEXT_ICO_16x16\" />"
"</label>" "</label>"
"<input type=\"text\" id=\"UsrId\" name=\"UsrId\"" "<input type=\"text\" id=\"UsrId\" name=\"UsrId\""
" size=\"18\" maxlength=\"%u\" placeholder=\"%s\"" " size=\"18\" maxlength=\"%u\" placeholder=\"%s\""
@ -2480,7 +2480,7 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) ())
fprintf (Gbl.F.Out,"<div class=\"LEFT_MIDDLE\">" fprintf (Gbl.F.Out,"<div class=\"LEFT_MIDDLE\">"
"<label for=\"UsrPwd\">" "<label for=\"UsrPwd\">"
"<img src=\"%s/key.svg\" alt=\"%s\" title=\"%s\"" "<img src=\"%s/key.svg\" alt=\"%s\" title=\"%s\""
" class=\"CONTEXT_ICO\" />" " class=\"CONTEXT_ICO_16x16\" />"
"</label>" "</label>"
"<input type=\"password\" id=\"UsrPwd\" name=\"UsrPwd\"" "<input type=\"password\" id=\"UsrPwd\" name=\"UsrPwd\""
" size=\"18\" maxlength=\"%u\" placeholder=\"%s\" />" " size=\"18\" maxlength=\"%u\" placeholder=\"%s\" />"
@ -3401,10 +3401,9 @@ static void Usr_PutLinkToLogOut (void)
extern const char *Txt_Log_out; extern const char *Txt_Log_out;
/***** Put form to log out *****/ /***** Put form to log out *****/
Lay_PutContextualLink (ActLogOut,NULL,NULL, Lay_PutContextualLinkOnlyIcon (ActLogOut,NULL,NULL,
"sign-out-alt-red.svg", "sign-out-alt-red.svg",
Txt_Log_out,NULL, Txt_Log_out);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -7530,11 +7529,10 @@ static void Usr_PutLinkToSeeAdmins (void)
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
/***** Put form to list admins *****/ /***** Put form to list admins *****/
Lay_PutContextualLink (ActLstOth,NULL,NULL, Lay_PutContextualLinkIconText (ActLstOth,NULL,NULL,
"user-tie.svg", "user-tie.svg",
Txt_ROLES_PLURAL_Abc[Rol_DEG_ADM][Usr_SEX_UNKNOWN], Txt_ROLES_PLURAL_Abc[Rol_DEG_ADM][Usr_SEX_UNKNOWN],
Txt_ROLES_PLURAL_Abc[Rol_DEG_ADM][Usr_SEX_UNKNOWN], Txt_ROLES_PLURAL_Abc[Rol_DEG_ADM][Usr_SEX_UNKNOWN]);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -7546,11 +7544,10 @@ static void Usr_PutLinkToSeeGuests (void)
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS]; extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
/***** Put form to list guests *****/ /***** Put form to list guests *****/
Lay_PutContextualLink (ActLstGst,NULL,NULL, Lay_PutContextualLinkIconText (ActLstGst,NULL,NULL,
"users.svg", "users.svg",
Txt_ROLES_PLURAL_Abc[Rol_GST][Usr_SEX_UNKNOWN], Txt_ROLES_PLURAL_Abc[Rol_GST][Usr_SEX_UNKNOWN],
Txt_ROLES_PLURAL_Abc[Rol_GST][Usr_SEX_UNKNOWN], Txt_ROLES_PLURAL_Abc[Rol_GST][Usr_SEX_UNKNOWN]);
NULL);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -8133,30 +8130,27 @@ static void Usr_PutIconToShowGstsAllData (void)
{ {
extern const char *Txt_Show_all_data_in_a_table; extern const char *Txt_Show_all_data_in_a_table;
Lay_PutContextualLink (ActLstGstAll,NULL,Usr_ShowGstsAllDataParams, Lay_PutContextualLinkOnlyIcon (ActLstGstAll,NULL,Usr_ShowGstsAllDataParams,
"table.svg", "table.svg",
Txt_Show_all_data_in_a_table,NULL, Txt_Show_all_data_in_a_table);
NULL);
} }
static void Usr_PutIconToShowStdsAllData (void) static void Usr_PutIconToShowStdsAllData (void)
{ {
extern const char *Txt_Show_all_data_in_a_table; extern const char *Txt_Show_all_data_in_a_table;
Lay_PutContextualLink (ActLstStdAll,NULL,Usr_ShowStdsAllDataParams, Lay_PutContextualLinkOnlyIcon (ActLstStdAll,NULL,Usr_ShowStdsAllDataParams,
"table.svg", "table.svg",
Txt_Show_all_data_in_a_table,NULL, Txt_Show_all_data_in_a_table);
NULL);
} }
static void Usr_PutIconToShowTchsAllData (void) static void Usr_PutIconToShowTchsAllData (void)
{ {
extern const char *Txt_Show_all_data_in_a_table; extern const char *Txt_Show_all_data_in_a_table;
Lay_PutContextualLink (ActLstTchAll,NULL,Usr_ShowTchsAllDataParams, Lay_PutContextualLinkOnlyIcon (ActLstTchAll,NULL,Usr_ShowTchsAllDataParams,
"table.svg", "table.svg",
Txt_Show_all_data_in_a_table,NULL, Txt_Show_all_data_in_a_table);
NULL);
} }
static void Usr_ShowGstsAllDataParams (void) static void Usr_ShowGstsAllDataParams (void)

View File

@ -124,11 +124,11 @@ void ZIP_PutLinkToCreateZIPAsgWrk (void)
{ {
extern const char *Txt_Create_ZIP_file; extern const char *Txt_Create_ZIP_file;
Lay_PutContextualLink (ActAdmAsgWrkCrs,NULL, Lay_PutContextualLinkIconText (ActAdmAsgWrkCrs,NULL,
ZIP_PutLinkToCreateZIPAsgWrkParams, ZIP_PutLinkToCreateZIPAsgWrkParams,
"download.svg", "download.svg",
Txt_Create_ZIP_file,Txt_Create_ZIP_file, Txt_Create_ZIP_file,
NULL); Txt_Create_ZIP_file);
} }
static void ZIP_PutLinkToCreateZIPAsgWrkParams (void) static void ZIP_PutLinkToCreateZIPAsgWrkParams (void)