Version 16.240.1

This commit is contained in:
Antonio Cañas Vargas 2017-06-11 19:13:28 +02:00
parent 0c15b1a5ae
commit 805f111ce9
43 changed files with 335 additions and 330 deletions

View File

@ -489,7 +489,7 @@ static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID,
UsrDat->IDs.List[NumID].ID);
/***** Put link *****/
Lay_PutIconLink ("ok_on16x16.gif",Txt_Confirm_ID,Txt_Confirm_ID,
Ico_PutIconLink ("ok_on16x16.gif",Txt_Confirm_ID,Txt_Confirm_ID,
The_ClassFormBold[Gbl.Prefs.Theme],NULL);
/***** End form *****/
@ -609,7 +609,7 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe)
{
if (ItsMe && UsrDat->IDs.List[NumID].Confirmed) // I can not remove my confirmed IDs
/* Put disabled icon to remove user's ID */
Lay_PutIconRemovalNotAllowed ();
Ico_PutIconRemovalNotAllowed ();
else // I can remove
{
/* Form to remove user's ID */
@ -635,7 +635,7 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe)
}
fprintf (Gbl.F.Out,"<input type=\"hidden\" name=\"UsrID\" value=\"%s\" />",
UsrDat->IDs.List[NumID].ID);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
}
}

View File

@ -657,7 +657,7 @@ static void Agd_PutIconToCreateNewEvent (void)
static void Agd_PutIconToViewEditMyFullAgenda (void)
{
Lay_PutContextualIconToEdit (ActSeeMyAgd,NULL);
Ico_PutContextualIconToEdit (ActSeeMyAgd,NULL);
}
static void Agd_PutIconToShowQR (void)
@ -848,16 +848,16 @@ static void Agd_PutFormsToRemEditOneEvent (struct AgendaEvent *AgdEvent)
Gbl.Agenda.AgdCodToEdit = AgdEvent->AgdCod; // Used as parameter in contextual links
/***** Put form to remove event *****/
Lay_PutContextualIconToRemove (ActReqRemEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
Ico_PutContextualIconToRemove (ActReqRemEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
/***** Put form to hide/show event *****/
if (AgdEvent->Hidden)
Lay_PutContextualIconToUnhide (ActShoEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
Ico_PutContextualIconToUnhide (ActShoEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
else
Lay_PutContextualIconToHide (ActHidEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
Ico_PutContextualIconToHide (ActHidEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
/***** Put form to edit event *****/
Lay_PutContextualIconToEdit (ActEdiOneEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
Ico_PutContextualIconToEdit (ActEdiOneEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
/***** Put form to make event public/private *****/
if (AgdEvent->Public)

View File

@ -309,7 +309,7 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status,
if (ICanEdit)
{
/***** Put form to remove announcement *****/
Lay_PutContextualIconToRemove (ActRemAnn,Ann_PutParams);
Ico_PutContextualIconToRemove (ActRemAnn,Ann_PutParams);
/***** Put form to change the status of the announcement *****/
switch (Status)

View File

@ -582,21 +582,21 @@ static void Asg_PutFormsToRemEditOneAsg (long AsgCod,bool Hidden)
case Rol_TCH:
case Rol_SYS_ADM:
/***** Put form to remove assignment *****/
Lay_PutContextualIconToRemove (ActReqRemAsg,Asg_PutParams);
Ico_PutContextualIconToRemove (ActReqRemAsg,Asg_PutParams);
/***** Put form to hide/show assignment *****/
if (Hidden)
Lay_PutContextualIconToUnhide (ActShoAsg,Asg_PutParams);
Ico_PutContextualIconToUnhide (ActShoAsg,Asg_PutParams);
else
Lay_PutContextualIconToHide (ActHidAsg,Asg_PutParams);
Ico_PutContextualIconToHide (ActHidAsg,Asg_PutParams);
/***** Put form to edit assignment *****/
Lay_PutContextualIconToEdit (ActEdiOneAsg,Asg_PutParams);
Ico_PutContextualIconToEdit (ActEdiOneAsg,Asg_PutParams);
// no break
case Rol_STD:
case Rol_NET:
/***** Put form to print assignment *****/
Lay_PutContextualIconToPrint (ActPrnOneAsg,Asg_PutParams);
Ico_PutContextualIconToPrint (ActPrnOneAsg,Asg_PutParams);
break;
default:
break;

View File

@ -564,16 +564,16 @@ static void Att_PutFormsToRemEditOneAttEvent (long AttCod,bool Hidden)
Gbl.AttEvents.AttCodToEdit = AttCod; // Used as parameters in contextual links
/***** Put form to remove attendance event *****/
Lay_PutContextualIconToRemove (ActReqRemAtt,Att_PutParams);
Ico_PutContextualIconToRemove (ActReqRemAtt,Att_PutParams);
/***** Put form to hide/show attendance event *****/
if (Hidden)
Lay_PutContextualIconToUnhide (ActShoAtt,Att_PutParams);
Ico_PutContextualIconToUnhide (ActShoAtt,Att_PutParams);
else
Lay_PutContextualIconToHide (ActHidAtt,Att_PutParams);
Ico_PutContextualIconToHide (ActHidAtt,Att_PutParams);
/***** Put form to edit attendance event *****/
Lay_PutContextualIconToEdit (ActEdiOneAtt,Att_PutParams);
Ico_PutContextualIconToEdit (ActEdiOneAtt,Att_PutParams);
}
/*****************************************************************************/
@ -3030,7 +3030,7 @@ static void Att_GetListSelectedAttCods (char **StrAttCodsSelected)
static void Att_PutIconToPrintMyList (void)
{
Lay_PutContextualIconToPrint (ActPrnLstMyAtt,Att_PutFormToPrintMyListParams);
Ico_PutContextualIconToPrint (ActPrnLstMyAtt,Att_PutFormToPrintMyListParams);
}
static void Att_PutFormToPrintMyListParams (void)
@ -3047,7 +3047,7 @@ static void Att_PutFormToPrintMyListParams (void)
static void Att_PutIconToPrintStdsList (void)
{
Lay_PutContextualIconToPrint (ActPrnLstStdAtt,Att_PutParamsToPrintStdsList);
Ico_PutContextualIconToPrint (ActPrnLstStdAtt,Att_PutParamsToPrintStdsList);
}
static void Att_PutParamsToPrintStdsList (void)
@ -3181,7 +3181,7 @@ static void Att_ListEventsToSelect (Att_TypeOfView_t TypeOfView)
Act_LinkFormSubmitAnimated (Txt_Update_attendance_according_to_selected_events,
The_ClassFormBold[Gbl.Prefs.Theme],
NULL);
Lay_PutCalculateIconWithText (Txt_Update_attendance_according_to_selected_events,
Ico_PutCalculateIconWithText (Txt_Update_attendance_according_to_selected_events,
Txt_Update_attendance);
fprintf (Gbl.F.Out,"</td>"
"</tr>");

View File

@ -182,7 +182,7 @@ static void Ban_WriteListOfBanners (void)
static void Ban_PutFormToEditBanners (void)
{
if (Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
Lay_PutContextualIconToEdit (ActEdiBan,NULL);
Ico_PutContextualIconToEdit (ActEdiBan,NULL);
}
/*****************************************************************************/
@ -367,7 +367,7 @@ void Ban_FreeListBanners (void)
static void Ban_PutIconToViewBanners (void)
{
Lay_PutContextualIconToView (ActSeeBan,NULL);
Ico_PutContextualIconToView (ActSeeBan,NULL);
}
/*****************************************************************************/
@ -399,7 +399,7 @@ static void Ban_ListBannersForEdition (void)
"<td class=\"BM\">");
Act_FormStart (ActRemBan);
Ban_PutParamBanCod (Ban->BanCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>");

View File

@ -362,12 +362,12 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
static void Cal_PutIconToPrintCalendarSys (void)
{
Lay_PutContextualIconToPrint (ActPrnCalSys,NULL);
Ico_PutContextualIconToPrint (ActPrnCalSys,NULL);
}
static void Cal_PutIconToPrintCalendarCty (void)
{
Lay_PutContextualIconToPrint (ActPrnCalCty,NULL);
Ico_PutContextualIconToPrint (ActPrnCalCty,NULL);
}
static void Cal_PutIconToPrintCalendarIns (void)
@ -375,7 +375,7 @@ static void Cal_PutIconToPrintCalendarIns (void)
extern const char *Txt_Holidays;
/***** Print calendar *****/
Lay_PutContextualIconToPrint (ActPrnCalIns,NULL);
Ico_PutContextualIconToPrint (ActPrnCalIns,NULL);
/***** View holidays *****/
if (Gbl.Hlds.Num || // There are holidays
@ -388,15 +388,15 @@ static void Cal_PutIconToPrintCalendarIns (void)
static void Cal_PutIconToPrintCalendarCtr (void)
{
Lay_PutContextualIconToPrint (ActPrnCalCtr,NULL);
Ico_PutContextualIconToPrint (ActPrnCalCtr,NULL);
}
static void Cal_PutIconToPrintCalendarDeg (void)
{
Lay_PutContextualIconToPrint (ActPrnCalDeg,NULL);
Ico_PutContextualIconToPrint (ActPrnCalDeg,NULL);
}
static void Cal_PutIconToPrintCalendarCrs (void)
{
Lay_PutContextualIconToPrint (ActPrnCalCrs,NULL);
Ico_PutContextualIconToPrint (ActPrnCalCrs,NULL);
}

View File

@ -644,7 +644,7 @@ static void Ctr_Configuration (bool PrintView)
static void Ctr_PutIconsToPrintAndUpload (void)
{
/***** Link to print info about centre *****/
Lay_PutContextualIconToPrint (ActPrnCtrInf,NULL);
Ico_PutContextualIconToPrint (ActPrnCtrInf,NULL);
if (Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM)
// Only centre admins, institution admins and system admins
@ -815,7 +815,7 @@ static void Ctr_PutIconsListCentres (void)
static void Ctr_PutIconToEditCentres (void)
{
Lay_PutContextualIconToEdit (ActEdiCtr,NULL);
Ico_PutContextualIconToEdit (ActEdiCtr,NULL);
}
/*****************************************************************************/
@ -976,7 +976,7 @@ static void Ctr_PutIconsEditingCentres (void)
static void Ctr_PutIconToViewCentres (void)
{
Lay_PutContextualIconToView (ActSeeCtr,NULL);
Ico_PutContextualIconToView (ActSeeCtr,NULL);
}
/*****************************************************************************/
@ -1429,12 +1429,12 @@ static void Ctr_ListCentresForEdition (void)
Ctr->NumUsrsWhoClaimToBelongToCtr ||
Ctr->NumUsrs || // Centre has degrees or users ==> deletion forbidden
!ICanEdit)
Lay_PutIconRemovalNotAllowed ();
Ico_PutIconRemovalNotAllowed ();
else
{
Act_FormStart (ActRemCtr);
Ctr_PutParamOtherCtrCod (Ctr->CtrCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>");

View File

@ -243,13 +243,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.240 (2017-06-11)"
#define Log_PLATFORM_VERSION "SWAD 16.240.1 (2017-06-11)"
#define CSS_FILE "swad16.235.1.css"
#define JS_FILE "swad16.206.3.js"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/*
Version 16.240.1: Jun 11, 2017 Some functions moved from swad_layout to swad_icon. (222024 lines)
Version 16.240: Jun 11, 2017 New module swad_button to draw buttons. (222023 lines)
Version 16.239: Jun 10, 2017 New module swad_box to draw boxes. (221970 lines)
Version 16.238: Jun 10, 2017 Icon to close frames. (221803 lines)

View File

@ -133,7 +133,7 @@ static void Con_PutIconToUpdateConnected (void)
Sco_PutParamScope ("ScopeCon",Gbl.Scope.Current);
Act_LinkFormSubmitAnimated (Txt_Update,The_ClassFormBold[Gbl.Prefs.Theme],
NULL);
Lay_PutCalculateIcon (Txt_Update);
Ico_PutCalculateIcon (Txt_Update);
Act_FormEnd ();
}

View File

@ -453,7 +453,7 @@ static void Cty_Configuration (bool PrintView)
static void Cty_PutIconToPrint (void)
{
Lay_PutContextualIconToPrint (ActPrnCtyInf,NULL);
Ico_PutContextualIconToPrint (ActPrnCtyInf,NULL);
}
/*****************************************************************************/
@ -766,7 +766,7 @@ static void Cty_PutIconsListCountries (void)
static void Cty_PutIconToEditCountries (void)
{
Lay_PutContextualIconToEdit (ActEdiCty,NULL);
Ico_PutContextualIconToEdit (ActEdiCty,NULL);
}
/*****************************************************************************/
@ -971,7 +971,7 @@ void Cty_EditCountries (void)
static void Cty_PutIconToViewCountries (void)
{
Lay_PutContextualIconToView (ActSeeCty,NULL);
Ico_PutContextualIconToView (ActSeeCty,NULL);
}
/*****************************************************************************/
@ -1547,12 +1547,12 @@ static void Cty_ListCountriesForEdition (void)
if (Cty->NumInss ||
Cty->NumUsrsWhoClaimToBelongToCty ||
Cty->NumUsrs) // Country has institutions or users ==> deletion forbidden
Lay_PutIconRemovalNotAllowed ();
Ico_PutIconRemovalNotAllowed ();
else
{
Act_FormStart (ActRemCty);
Cty_PutParamOtherCtyCod (Cty->CtyCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>");

View File

@ -476,7 +476,7 @@ static void Crs_Configuration (bool PrintView)
static void Crs_PutIconToPrint (void)
{
Lay_PutContextualIconToPrint (ActPrnCrsInf,NULL);
Ico_PutContextualIconToPrint (ActPrnCrsInf,NULL);
}
/*****************************************************************************/
@ -1204,7 +1204,7 @@ static void Crs_PutIconsListCourses (void)
static void Crs_PutIconToEditCourses (void)
{
Lay_PutContextualIconToEdit (ActEdiCrs,NULL);
Ico_PutContextualIconToEdit (ActEdiCrs,NULL);
}
/*****************************************************************************/
@ -1364,7 +1364,7 @@ void Crs_EditCourses (void)
static void Crs_PutIconToViewCourses (void)
{
Lay_PutContextualIconToView (ActSeeCrs,NULL);
Ico_PutContextualIconToView (ActSeeCrs,NULL);
}
/*****************************************************************************/
@ -1423,12 +1423,12 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
"<td class=\"BM\">");
if (Crs->NumUsrs[Rol_UNK] || // Course has users ==> deletion forbidden
!ICanEdit)
Lay_PutIconRemovalNotAllowed ();
Ico_PutIconRemovalNotAllowed ();
else // Crs->NumUsrs == 0 && ICanEdit
{
Act_FormStart (ActRemCrs);
Crs_PutParamOtherCrsCod (Crs->CrsCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>");

View File

@ -540,7 +540,7 @@ static void Deg_Configuration (bool PrintView)
static void Deg_PutIconsToPrintAndUpload (void)
{
/***** Link to print info about degree *****/
Lay_PutContextualIconToPrint (ActPrnDegInf,NULL);
Ico_PutContextualIconToPrint (ActPrnDegInf,NULL);
if (Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM)
// Only degree admins, centre admins, institution admins and system admins
@ -703,12 +703,12 @@ static void Deg_ListDegreesForEdition (void)
"<td class=\"BM\">");
if (NumCrss || // Degree has courses ==> deletion forbidden
!ICanEdit)
Lay_PutIconRemovalNotAllowed ();
Ico_PutIconRemovalNotAllowed ();
else
{
Act_FormStart (ActRemDeg);
Deg_PutParamOtherDegCod (Deg->DegCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>");
@ -1244,7 +1244,7 @@ static void Deg_PutIconsListDegrees (void)
static void Deg_PutIconToEditDegrees (void)
{
Lay_PutContextualIconToEdit (ActEdiDeg,NULL);
Ico_PutContextualIconToEdit (ActEdiDeg,NULL);
}
/*****************************************************************************/
@ -1404,7 +1404,7 @@ static void Deg_PutIconsEditingDegrees (void)
static void Deg_PutIconToViewDegrees (void)
{
Lay_PutContextualIconToView (ActSeeDeg,NULL);
Ico_PutContextualIconToView (ActSeeDeg,NULL);
}
/*****************************************************************************/

View File

@ -140,7 +140,7 @@ void DT_PutIconToViewDegreeTypes (void)
static void DT_PutIconToViewDegreeTypesWhenEditing (void)
{
Lay_PutContextualIconToView (ActSeeDegTyp,NULL);
Ico_PutContextualIconToView (ActSeeDegTyp,NULL);
}
/*****************************************************************************/
@ -349,7 +349,7 @@ static void DT_PutIconToEditDegTypes (void)
if (CentreTabVisible && // Only editable if centre tab is visible
DT_CheckIfICanCreateDegreeTypes ())
Lay_PutContextualIconToEdit (ActEdiDegTyp,NULL);
Ico_PutContextualIconToEdit (ActEdiDegTyp,NULL);
}
/*****************************************************************************/
@ -373,12 +373,12 @@ static void DT_ListDegreeTypesForEdition (void)
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BM\">");
if (Gbl.Degs.DegTypes.Lst[NumDegTyp].NumDegs) // Degree type has degrees => deletion forbidden
Lay_PutIconRemovalNotAllowed ();
Ico_PutIconRemovalNotAllowed ();
else
{
Act_FormStart (ActRemDegTyp);
DT_PutParamOtherDegTypCod (Gbl.Degs.DegTypes.Lst[NumDegTyp].DegTypCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
}

View File

@ -214,7 +214,7 @@ static void Dpt_GetParamDptOrder (void)
static void Dpt_PutIconToEditDpts (void)
{
Lay_PutContextualIconToEdit (ActEdiDpt,NULL);
Ico_PutContextualIconToEdit (ActEdiDpt,NULL);
}
/*****************************************************************************/
@ -510,12 +510,12 @@ static void Dpt_ListDepartmentsForEdition (void)
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BM\">");
if (Dpt->NumTchs) // Department has teachers ==> deletion forbidden
Lay_PutIconRemovalNotAllowed ();
Ico_PutIconRemovalNotAllowed ();
else
{
Act_FormStart (ActRemDpt);
Dpt_PutParamDptCod (Dpt->DptCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>");

View File

@ -1546,27 +1546,27 @@ static void Exa_PutIconsExamAnnouncement (void)
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)
{
/***** Link to remove this exam announcement *****/
Lay_PutContextualIconToRemove (ActReqRemExaAnn,Exa_PutParamExaCodToEdit);
Ico_PutContextualIconToRemove (ActReqRemExaAnn,Exa_PutParamExaCodToEdit);
/***** Put form to hide/show exam announement *****/
switch (Gbl.ExamAnns.ExaDat.Status)
{
case Exa_VISIBLE_EXAM_ANNOUNCEMENT:
Lay_PutContextualIconToHide (ActHidExaAnn,Exa_PutParamExaCodToEdit);
Ico_PutContextualIconToHide (ActHidExaAnn,Exa_PutParamExaCodToEdit);
break;
case Exa_HIDDEN_EXAM_ANNOUNCEMENT:
Lay_PutContextualIconToUnhide (ActShoExaAnn,Exa_PutParamExaCodToEdit);
Ico_PutContextualIconToUnhide (ActShoExaAnn,Exa_PutParamExaCodToEdit);
break;
case Exa_DELETED_EXAM_ANNOUNCEMENT: // Not applicable here
break;
}
/***** Link to edit this exam announcement *****/
Lay_PutContextualIconToEdit (ActEdiExaAnn,Exa_PutParamExaCodToEdit);
Ico_PutContextualIconToEdit (ActEdiExaAnn,Exa_PutParamExaCodToEdit);
}
/***** Link to print view *****/
Lay_PutContextualIconToPrint (ActPrnExaAnn,Exa_PutParamExaCodToEdit);
Ico_PutContextualIconToPrint (ActPrnExaAnn,Exa_PutParamExaCodToEdit);
}
/*****************************************************************************/

View File

@ -3727,11 +3727,11 @@ static void Brw_PutIconsFileBrowser (void)
case Brw_ICON_NONE:
break;
case Brw_ICON_VIEW:
Lay_PutContextualIconToView (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type],
Ico_PutContextualIconToView (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type],
Brw_PutHiddenParamFullTreeIfSelected);
break;
case Brw_ICON_EDIT:
Lay_PutContextualIconToEdit (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type],
Ico_PutContextualIconToEdit (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type],
Brw_PutHiddenParamFullTreeIfSelected);
break;
}
@ -5521,7 +5521,7 @@ static void Brw_PutIconRemoveFile (const char PathInTree[PATH_MAX + 1],
Act_FormEnd ();
}
else
Lay_PutIconBRemovalNotAllowed ();
Ico_PutIconBRemovalNotAllowed ();
fprintf (Gbl.F.Out,"</td>");
}
@ -5553,7 +5553,7 @@ static void Brw_PutIconRemoveDir (const char PathInTree[PATH_MAX + 1],
Act_FormEnd ();
}
else
Lay_PutIconBRemovalNotAllowed ();
Ico_PutIconBRemovalNotAllowed ();
fprintf (Gbl.F.Out,"</td>");
}

View File

@ -434,7 +434,7 @@ static void Fol_PutIconToUpdateWhoToFollow (void)
Act_FormStart (ActSeeSocPrf);
Act_LinkFormSubmitAnimated (Txt_Update,The_ClassFormBold[Gbl.Prefs.Theme],
NULL);
Lay_PutCalculateIcon (Txt_Update);
Ico_PutCalculateIcon (Txt_Update);
Act_FormEnd ();
}

View File

@ -1314,7 +1314,7 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod,
Gbl.Forum.ForumSelected.Location,
Gbl.Forum.ForumSelected.ThrCod,
PstCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>");
@ -3372,7 +3372,7 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],
Gbl.Forum.ForumSelected.Location,
Thr.ThrCod,
-1L);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
}

View File

@ -403,7 +403,7 @@ void Grp_ShowFormToSelectSeveralGroups (Act_Action_t NextAction)
Act_LinkFormSubmitAnimated (Txt_Update_users_according_to_selected_groups,
The_ClassFormBold[Gbl.Prefs.Theme],
"CopyMessageToHiddenFields()");
Lay_PutCalculateIconWithText (Txt_Update_users_according_to_selected_groups,
Ico_PutCalculateIconWithText (Txt_Update_users_according_to_selected_groups,
Txt_Update_users);
fprintf (Gbl.F.Out,"</div>");
@ -1256,7 +1256,7 @@ static void Grp_ListGroupTypesForEdition (void)
"<td class=\"BM\">");
Act_FormStartAnchor (ActReqRemGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
Grp_PutParamGrpTypCod (Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>");
@ -1378,7 +1378,7 @@ static void Grp_PutIconsEditingGroupTypes (void)
static void Grp_PutIconToViewGroups (void)
{
Lay_PutContextualIconToView (ActReqSelGrp,NULL);
Ico_PutContextualIconToView (ActReqSelGrp,NULL);
}
static void Grp_PutIconToCreateNewGroupType (void)
@ -1469,7 +1469,7 @@ static void Grp_ListGroupsForEdition (void)
"<td class=\"BM\">");
Act_FormStartAnchor (ActReqRemGrp,Grp_GROUPS_SECTION_ID);
Grp_PutParamGrpCod (Grp->GrpCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>");
@ -1789,7 +1789,7 @@ void Grp_ShowLstGrpsToChgMyGrps (void)
static void Grp_PutIconToEditGroups (void)
{
Lay_PutContextualIconToEdit (ActReqEdiGrp,NULL);
Ico_PutContextualIconToEdit (ActReqEdiGrp,NULL);
}
/*****************************************************************************/

View File

@ -211,7 +211,7 @@ static void Hld_GetParamHldOrder (void)
static void Hld_PutIconToEditHlds (void)
{
Lay_PutContextualIconToEdit (ActEdiHld,NULL);
Ico_PutContextualIconToEdit (ActEdiHld,NULL);
}
/*****************************************************************************/
@ -521,7 +521,7 @@ static void Hld_ListHolidaysForEdition (void)
"<td class=\"BM\">");
Act_FormStart (ActRemHld);
Hld_PutParamHldCod (Hld->HldCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>");

View File

@ -1,4 +1,4 @@
// swad_icon.c: icon selection
// swad_icon.c: icons
/*
SWAD (Shared Workspace At a Distance),
@ -178,3 +178,185 @@ Ico_IconSet_t Ico_GetIconSetFromStr (const char *Str)
return Ico_ICON_SET_DEFAULT;
}
/*****************************************************************************/
/***** Show contextual icons to remove, edit, view, hide, unhide, print ******/
/*****************************************************************************/
void Ico_PutContextualIconToRemove (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Remove;
Lay_PutContextualLink (NextAction,NULL,FuncParams,
"remove-on64x64.png",
Txt_Remove,NULL,
NULL);
}
void Ico_PutContextualIconToEdit (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Edit;
Lay_PutContextualLink (NextAction,NULL,FuncParams,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
void Ico_PutContextualIconToView (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_View;
Lay_PutContextualLink (NextAction,NULL,FuncParams,
"eye-on64x64.png",
Txt_View,NULL,
NULL);
}
void Ico_PutContextualIconToHide (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Hide;
Lay_PutContextualLink (NextAction,NULL,FuncParams,
"eye-on64x64.png",
Txt_Hide,NULL,
NULL);
}
void Ico_PutContextualIconToUnhide (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Show;
Lay_PutContextualLink (NextAction,NULL,FuncParams,
"eye-slash-on64x64.png",
Txt_Show,NULL,
NULL);
}
void Ico_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Print;
Lay_PutContextualLink (NextAction,NULL,FuncParams,
"print64x64.png",
Txt_Print,NULL,
NULL);
}
/*****************************************************************************/
/****************** Show an icon with a link (without text) ******************/
/*****************************************************************************/
void Ico_PutIconLink (const char *Icon,const char *Title,const char *Text,
const char *LinkStyle,const char *OnSubmit)
{
Act_LinkFormSubmit (Title,LinkStyle,OnSubmit);
Ico_PutIconWithText (Icon,Title,Text);
fprintf (Gbl.F.Out,"</a>");
}
/*****************************************************************************/
/**************** Put a icon with a text to submit a form ********************/
/*****************************************************************************/
void Ico_PutIconWithText (const char *Icon,const char *Alt,const char *Text)
{
/***** Print icon and optional text *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">"
"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />",
Gbl.Prefs.IconsURL,Icon,
Alt,Text ? Text : Alt);
if (Text)
if (Text[0])
fprintf (Gbl.F.Out,"&nbsp;%s",Text);
fprintf (Gbl.F.Out,"</div>");
}
/*****************************************************************************/
/********** Put a icon to submit a form. **********/
/********** When clicked, the icon will be replaced by an animation **********/
/*****************************************************************************/
void Ico_PutCalculateIcon (const char *Alt)
{
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
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />"
"<img id=\"updating_%d\" src=\"%s/working16x16.gif\"" // TODO: change name and resolution to refreshing64x64.gif
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" style=\"display:none;\" />" // Animated icon hidden
"</div>"
"</a>",
Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Alt,
Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Alt);
}
/*****************************************************************************/
/********** Put a icon with a text to submit a form. **********/
/********** When clicked, the icon will be replaced by an animation **********/
/*****************************************************************************/
void Ico_PutCalculateIconWithText (const char *Alt,const char *Text)
{
fprintf (Gbl.F.Out,"<div class=\"ICO_HIGHLIGHT\""
" style=\"margin:0 6px 0 0; display:inline;\">"
"<img id=\"update_%d\" src=\"%s/recycle16x16.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />"
"<img id=\"updating_%d\" src=\"%s/working16x16.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" style=\"display:none;\" />" // Animated icon hidden
"&nbsp;%s"
"</div>"
"</a>",
Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Text,
Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Text,
Text);
}
/*****************************************************************************/
/******** Put a disabled icon indicating that removal is not allowed *********/
/*****************************************************************************/
void Ico_PutIconRemovalNotAllowed (void)
{
extern const char *Txt_Removal_not_allowed;
fprintf (Gbl.F.Out,"<img src=\"%s/remove-off64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />",
Gbl.Prefs.IconsURL,
Txt_Removal_not_allowed,
Txt_Removal_not_allowed);
}
void Ico_PutIconBRemovalNotAllowed (void)
{
extern const char *Txt_Removal_not_allowed;
fprintf (Gbl.F.Out,"<img src=\"%s/remove-off64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20B\" />",
Gbl.Prefs.IconsURL,
Txt_Removal_not_allowed,
Txt_Removal_not_allowed);
}
/*****************************************************************************/
/******** Put an icon indicating that removal is not allowed *********/
/*****************************************************************************/
void Ico_PutIconRemove (void)
{
extern const char *Txt_Remove;
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/remove-on64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />",
Gbl.Prefs.IconsURL,
Txt_Remove,
Txt_Remove);
}

View File

@ -1,4 +1,4 @@
// swad_icon.h: icon selection
// swad_icon.h: icons
#ifndef _SWAD_ICO
#define _SWAD_ICO
@ -53,4 +53,22 @@ void Ico_ChangeIconSet (void);
Ico_IconSet_t Ico_GetParamIconSet (void);
Ico_IconSet_t Ico_GetIconSetFromStr (const char *Str);
void Ico_PutContextualIconToRemove (Act_Action_t NextAction,void (*FuncParams) ());
void Ico_PutContextualIconToEdit (Act_Action_t NextAction,void (*FuncParams) ());
void Ico_PutContextualIconToView (Act_Action_t NextAction,void (*FuncParams) ());
void Ico_PutContextualIconToUnhide (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_PutIconLink (const char *Icon,const char *Title,const char *Text,
const char *LinkStyle,const char *OnSubmit);
void Ico_PutIconWithText (const char *Icon,const char *Alt,const char *Text);
void Ico_PutCalculateIcon (const char *Alt);
void Ico_PutCalculateIconWithText (const char *Alt,const char *Text);
void Ico_PutIconRemovalNotAllowed (void);
void Ico_PutIconBRemovalNotAllowed (void);
void Ico_PutIconRemove (void);
#endif

View File

@ -473,12 +473,12 @@ static void Inf_PutButtonToEditInfo (void)
static void Inf_PutIconToViewInfo (void)
{
Lay_PutContextualIconToView (Inf_ActionsSeeInfo[Gbl.CurrentCrs.Info.Type],NULL);
Ico_PutContextualIconToView (Inf_ActionsSeeInfo[Gbl.CurrentCrs.Info.Type],NULL);
}
void Inf_PutIconToEditInfo (void)
{
Lay_PutContextualIconToEdit (Inf_ActionsEditInfo[Gbl.CurrentCrs.Info.Type],NULL);
Ico_PutContextualIconToEdit (Inf_ActionsEditInfo[Gbl.CurrentCrs.Info.Type],NULL);
}
/*****************************************************************************/
@ -1041,7 +1041,7 @@ static void Inf_ShowPage (const char *URL)
/***** Link to view in a new window *****/
fprintf (Gbl.F.Out,"<a href=\"%s\" target=\"_blank\" class=\"%s\">",
URL,The_ClassFormBold[Gbl.Prefs.Theme]);
Lay_PutIconWithText ("fullscreen16x16.gif",
Ico_PutIconWithText ("fullscreen16x16.gif",
Txt_View_in_a_new_window,
Txt_View_in_a_new_window);
fprintf (Gbl.F.Out,"</a>");

View File

@ -599,7 +599,7 @@ static void Ins_Configuration (bool PrintView)
static void Ins_PutIconsToPrintAndUpload (void)
{
/***** Link to print info about institution *****/
Lay_PutContextualIconToPrint (ActPrnInsInf,NULL);
Ico_PutContextualIconToPrint (ActPrnInsInf,NULL);
if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM)
/***** Link to upload logo of institution *****/
@ -734,7 +734,7 @@ static void Ins_PutIconsListInstitutions (void)
static void Ins_PutIconToEditInstitutions (void)
{
Lay_PutContextualIconToEdit (ActEdiIns,NULL);
Ico_PutContextualIconToEdit (ActEdiIns,NULL);
}
/*****************************************************************************/
@ -945,7 +945,7 @@ void Ins_EditInstitutions (void)
static void Ins_PutIconToViewInstitutions (void)
{
Lay_PutContextualIconToView (ActSeeIns,NULL);
Ico_PutContextualIconToView (ActSeeIns,NULL);
}
/*****************************************************************************/
@ -1424,12 +1424,12 @@ static void Ins_ListInstitutionsForEdition (void)
Ins->NumUsrsWhoClaimToBelongToIns ||
Ins->NumUsrs || // Institution has centres or users ==> deletion forbidden
!ICanEdit)
Lay_PutIconRemovalNotAllowed ();
Ico_PutIconRemovalNotAllowed ();
else
{
Act_FormStart (ActRemIns);
Ins_PutParamOtherInsCod (Ins->InsCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>");

View File

@ -1058,70 +1058,6 @@ static void Lay_ShowRightColumn (void)
Gbl.Prefs.IconsURL);
}
/*****************************************************************************/
/***** Show contextual icons to remove, edit, view, hide, unhide, print ******/
/*****************************************************************************/
void Lay_PutContextualIconToRemove (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Remove;
Lay_PutContextualLink (NextAction,NULL,FuncParams,
"remove-on64x64.png",
Txt_Remove,NULL,
NULL);
}
void Lay_PutContextualIconToEdit (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Edit;
Lay_PutContextualLink (NextAction,NULL,FuncParams,
"edit64x64.png",
Txt_Edit,NULL,
NULL);
}
void Lay_PutContextualIconToView (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_View;
Lay_PutContextualLink (NextAction,NULL,FuncParams,
"eye-on64x64.png",
Txt_View,NULL,
NULL);
}
void Lay_PutContextualIconToHide (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Hide;
Lay_PutContextualLink (NextAction,NULL,FuncParams,
"eye-on64x64.png",
Txt_Hide,NULL,
NULL);
}
void Lay_PutContextualIconToUnhide (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Show;
Lay_PutContextualLink (NextAction,NULL,FuncParams,
"eye-slash-on64x64.png",
Txt_Show,NULL,
NULL);
}
void Lay_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Print;
Lay_PutContextualLink (NextAction,NULL,FuncParams,
"print64x64.png",
Txt_Print,NULL,
NULL);
}
/*****************************************************************************/
/**************** Show an icon with a link in contextual menu ****************/
/*****************************************************************************/
@ -1145,7 +1081,7 @@ void Lay_PutContextualLink (Act_Action_t NextAction,const char *Anchor,
FuncParams ();
/***** Put icon with link *****/
Lay_PutIconLink (Icon,Title,Text,
Ico_PutIconLink (Icon,Title,Text,
Text ? The_ClassFormBold[Gbl.Prefs.Theme] :
NULL,
OnSubmit);
@ -1218,123 +1154,6 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
// jumping to the next line on narrow screens
}
/*****************************************************************************/
/****************** Show an icon with a link (without text) ******************/
/*****************************************************************************/
void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text,
const char *LinkStyle,const char *OnSubmit)
{
Act_LinkFormSubmit (Title,LinkStyle,OnSubmit);
Lay_PutIconWithText (Icon,Title,Text);
fprintf (Gbl.F.Out,"</a>");
}
/*****************************************************************************/
/**************** Put a icon with a text to submit a form ********************/
/*****************************************************************************/
void Lay_PutIconWithText (const char *Icon,const char *Alt,const char *Text)
{
/***** Print icon and optional text *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_OPT ICO_HIGHLIGHT\">"
"<img src=\"%s/%s\" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />",
Gbl.Prefs.IconsURL,Icon,
Alt,Text ? Text : Alt);
if (Text)
if (Text[0])
fprintf (Gbl.F.Out,"&nbsp;%s",Text);
fprintf (Gbl.F.Out,"</div>");
}
/*****************************************************************************/
/********** Put a icon to submit a form. **********/
/********** When clicked, the icon will be replaced by an animation **********/
/*****************************************************************************/
void Lay_PutCalculateIcon (const char *Alt)
{
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
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />"
"<img id=\"updating_%d\" src=\"%s/working16x16.gif\"" // TODO: change name and resolution to refreshing64x64.gif
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" style=\"display:none;\" />" // Animated icon hidden
"</div>"
"</a>",
Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Alt,
Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Alt);
}
/*****************************************************************************/
/********** Put a icon with a text to submit a form. **********/
/********** When clicked, the icon will be replaced by an animation **********/
/*****************************************************************************/
void Lay_PutCalculateIconWithText (const char *Alt,const char *Text)
{
fprintf (Gbl.F.Out,"<div class=\"ICO_HIGHLIGHT\""
" style=\"margin:0 6px 0 0; display:inline;\">"
"<img id=\"update_%d\" src=\"%s/recycle16x16.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />"
"<img id=\"updating_%d\" src=\"%s/working16x16.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" style=\"display:none;\" />" // Animated icon hidden
"&nbsp;%s"
"</div>"
"</a>",
Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Text,
Gbl.Form.Num,Gbl.Prefs.IconsURL,Alt,Text,
Text);
}
/*****************************************************************************/
/******** Put a disabled icon indicating that removal is not allowed *********/
/*****************************************************************************/
void Lay_PutIconRemovalNotAllowed (void)
{
extern const char *Txt_Removal_not_allowed;
fprintf (Gbl.F.Out,"<img src=\"%s/remove-off64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />",
Gbl.Prefs.IconsURL,
Txt_Removal_not_allowed,
Txt_Removal_not_allowed);
}
void Lay_PutIconBRemovalNotAllowed (void)
{
extern const char *Txt_Removal_not_allowed;
fprintf (Gbl.F.Out,"<img src=\"%s/remove-off64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20B\" />",
Gbl.Prefs.IconsURL,
Txt_Removal_not_allowed,
Txt_Removal_not_allowed);
}
/*****************************************************************************/
/******** Put an icon indicating that removal is not allowed *********/
/*****************************************************************************/
void Lay_PutIconRemove (void)
{
extern const char *Txt_Remove;
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/remove-on64x64.png\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />",
Gbl.Prefs.IconsURL,
Txt_Remove,
Txt_Remove);
}
/*****************************************************************************/
/******************************* Start/end table *****************************/
/*****************************************************************************/

View File

@ -50,12 +50,6 @@
void Lay_WriteStartOfPage (void);
void Lay_PutContextualIconToRemove (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutContextualIconToEdit (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutContextualIconToView (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutContextualIconToUnhide (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutContextualIconToHide (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) ());
void Lay_PutContextualLink (Act_Action_t NextAction,const char *Anchor,
void (*FuncParams) (),
const char *Icon,
@ -66,15 +60,6 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
const char *CheckboxName,
bool Checked,bool Disabled,
const char *Title,const char *Text);
void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text,
const char *LinkStyle,const char *OnSubmit);
void Lay_PutIconWithText (const char *Icon,const char *Alt,const char *Text);
void Lay_PutCalculateIcon (const char *Alt);
void Lay_PutCalculateIconWithText (const char *Alt,const char *Text);
void Lay_PutIconRemovalNotAllowed (void);
void Lay_PutIconBRemovalNotAllowed (void);
void Lay_PutIconRemove (void);
void Lay_StartTable (unsigned CellPadding);
void Lay_StartTableCenter (unsigned CellPadding);

View File

@ -144,7 +144,7 @@ void Lnk_SeeLinks (void)
static void Lnk_PutIconToEditLinks (void)
{
Lay_PutContextualIconToEdit (ActEdiLnk,NULL);
Ico_PutContextualIconToEdit (ActEdiLnk,NULL);
}
/*****************************************************************************/
@ -377,7 +377,7 @@ void Lnk_FreeListLinks (void)
static void Lnk_PutIconToViewLinks (void)
{
Lay_PutContextualIconToView (ActSeeLnk,NULL);
Ico_PutContextualIconToView (ActSeeLnk,NULL);
}
/*****************************************************************************/
@ -407,7 +407,7 @@ static void Lnk_ListLinksForEdition (void)
"<td class=\"BM\">");
Act_FormStart (ActRemLnk);
Lnk_PutParamLnkCod (Lnk->LnkCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>");

View File

@ -180,7 +180,7 @@ static void Mai_GetParamMaiOrder (void)
static void Mai_PutIconToEditMailDomains (void)
{
Lay_PutContextualIconToEdit (ActEdiMai,NULL);
Ico_PutContextualIconToEdit (ActEdiMai,NULL);
}
/*****************************************************************************/
@ -469,7 +469,7 @@ static void Mai_ListMailDomainsForEdition (void)
"<td class=\"BM\">");
Act_FormStart (ActRemMai);
Mai_PutParamMaiCod (Mai->MaiCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>");
@ -979,7 +979,7 @@ void Mai_ListEmails (void)
StrAddresses,
Txt_Create_email_message,
The_ClassFormBold[Gbl.Prefs.Theme]);
Lay_PutIconWithText ("editnewmsg16x16.gif",
Ico_PutIconWithText ("editnewmsg16x16.gif",
Txt_Create_email_message,
Txt_Create_email_message);
fprintf (Gbl.F.Out,"</a>"
@ -1298,7 +1298,7 @@ void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe)
}
fprintf (Gbl.F.Out,"<input type=\"hidden\" name=\"Email\" value=\"%s\" />",
row[0]);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
/* Email */

View File

@ -1779,7 +1779,7 @@ static void Msg_ShowSentOrReceivedMessages (void)
Act_LinkFormSubmitAnimated (Txt_Update_messages,
The_ClassFormBold[Gbl.Prefs.Theme],
NULL);
Lay_PutCalculateIconWithText (Txt_Update_messages,Txt_Update_messages);
Ico_PutCalculateIconWithText (Txt_Update_messages,Txt_Update_messages);
fprintf (Gbl.F.Out,"</div>");
Act_FormEnd ();
@ -2425,7 +2425,7 @@ static void Msg_PutIconsListMsgs (void)
};
/***** Put icon to remove messages *****/
Lay_PutContextualIconToRemove (ActionReqDelAllMsg[Gbl.Msg.TypeOfMessages],
Ico_PutContextualIconToRemove (ActionReqDelAllMsg[Gbl.Msg.TypeOfMessages],
Msg_PutHiddenParamsMsgsFilters);
/***** Put icon to show a figure *****/
@ -2908,7 +2908,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
/***** Form to delete message *****/
fprintf (Gbl.F.Out,"<br />");
Gbl.Msg.MsgCod = MsgCod; // Message to be deleted
Lay_PutContextualIconToRemove (ActionDelMsg[Gbl.Msg.TypeOfMessages],
Ico_PutContextualIconToRemove (ActionDelMsg[Gbl.Msg.TypeOfMessages],
Msg_PutHiddenParamsOneMsg);
fprintf (Gbl.F.Out,"</td>");
@ -3272,7 +3272,7 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod,
(Replied ? Txt_Go_to_course_and_reply_again :
Txt_Go_to_course_and_reply),
The_ClassFormBold[Gbl.Prefs.Theme],NULL);
Lay_PutIconWithText ("reply16x16.gif",
Ico_PutIconWithText ("reply16x16.gif",
Replied ? Txt_Reply_again :
Txt_Reply,
NULL);

View File

@ -241,7 +241,7 @@ void Nck_ShowFormChangeUsrNickname (void)
fprintf (Gbl.F.Out,"<input type=\"hidden\" name=\"Nick\""
" value=\"%s\" />",
row[0]);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
}

View File

@ -642,7 +642,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
if (Not_CheckIfICanEditNotices ())
{
/***** Put form to remove announcement *****/
Lay_PutContextualIconToRemove (ActReqRemNot,Not_PutParams);
Ico_PutContextualIconToRemove (ActReqRemNot,Not_PutParams);
/***** Put form to change the status of the notice *****/
switch (Status)

View File

@ -1928,7 +1928,7 @@ static Pho_HowOrderDegrees_t Pho_GetHowOrderDegreesFromForm (void)
static void Pho_PutIconToPrintDegreeStats (void)
{
Lay_PutContextualIconToPrint (ActPrnPhoDeg,Pho_PutLinkToPrintViewOfDegreeStatsParams);
Ico_PutContextualIconToPrint (ActPrnPhoDeg,Pho_PutLinkToPrintViewOfDegreeStatsParams);
}
static void Pho_PutLinkToPrintViewOfDegreeStatsParams (void)
@ -1978,7 +1978,7 @@ static void Pho_PutLinkToCalculateDegreeStats (void)
Act_LinkFormSubmitAnimated (Txt_Calculate_average_photo_of_a_degree,
The_ClassFormBold[Gbl.Prefs.Theme],
NULL);
Lay_PutCalculateIconWithText (Txt_Calculate_average_photo_of_a_degree,
Ico_PutCalculateIconWithText (Txt_Calculate_average_photo_of_a_degree,
Txt_Calculate_average_photo_of_THE_DEGREE_X);
/***** Put selector with all the degrees with students *****/

View File

@ -233,7 +233,7 @@ static void Plc_GetParamPlcOrder (void)
static void Plc_PutIconToEditPlaces (void)
{
Lay_PutContextualIconToEdit (ActEdiPlc,NULL);
Ico_PutContextualIconToEdit (ActEdiPlc,NULL);
}
/*****************************************************************************/
@ -273,7 +273,7 @@ void Plc_EditPlaces (void)
static void Plc_PutIconToViewPlacesWhenEditing (void)
{
Lay_PutContextualIconToView (ActSeePlc,NULL);
Ico_PutContextualIconToView (ActSeePlc,NULL);
}
/*****************************************************************************/
@ -479,12 +479,12 @@ static void Plc_ListPlacesForEdition (void)
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BM\">");
if (Plc->NumCtrs) // Place has centres ==> deletion forbidden
Lay_PutIconRemovalNotAllowed ();
Ico_PutIconRemovalNotAllowed ();
else
{
Act_FormStart (ActRemPlc);
Plc_PutParamPlcCod (Plc->PlcCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>");

View File

@ -154,7 +154,7 @@ void Plg_ListPlugins (void)
static void Plg_PutIconToEditPlugins (void)
{
Lay_PutContextualIconToEdit (ActEdiPlg,NULL);
Ico_PutContextualIconToEdit (ActEdiPlg,NULL);
}
/*****************************************************************************/
@ -367,7 +367,7 @@ static void Plg_ListPluginsForEdition (void)
"<td class=\"BM\">");
Act_FormStart (ActRemPlg);
Plg_PutParamPlgCod (Plg->PlgCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>");

View File

@ -609,7 +609,7 @@ static void Prf_PutLinkToUpdateAction (Act_Action_t Action,const char *Encrypted
Usr_PutParamUsrCodEncrypted (EncryptedUsrCod);
Act_LinkFormSubmitAnimated (Txt_Calculate,The_ClassForm[Gbl.Prefs.Theme],
NULL);
Lay_PutCalculateIconWithText (Txt_Calculate,Txt_Calculate);
Ico_PutCalculateIconWithText (Txt_Calculate,Txt_Calculate);
Act_FormEnd ();
}

View File

@ -290,7 +290,7 @@ void Rec_ListFieldsRecordsForEdition (void)
fprintf (Gbl.F.Out,"<td class=\"BM\">");
Act_FormStart (ActReqRemFie);
Par_PutHiddenParamLong ("FieldCod",Gbl.CurrentCrs.Records.LstFields.Lst[NumField].FieldCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>");
@ -370,7 +370,7 @@ void Rec_ShowFormCreateRecordField (void)
/***** Write disabled icon to remove the field *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BM\">");
Lay_PutIconRemovalNotAllowed ();
Ico_PutIconRemovalNotAllowed ();
fprintf (Gbl.F.Out,"</td>");
/***** Field name *****/
@ -1523,7 +1523,7 @@ static void Rec_ShowLinkToPrintPreviewOfRecords (void)
unsigned i;
Act_LinkFormSubmit (Txt_Print,The_ClassFormBold[Gbl.Prefs.Theme],NULL);
Lay_PutIconWithText ("print64x64.png",Txt_Print,Txt_Print);
Ico_PutIconWithText ("print64x64.png",Txt_Print,Txt_Print);
fprintf (Gbl.F.Out,"</a>"
"<label class=\"%s\">"
"(<select name=\"RecsPerPag\">",

View File

@ -800,7 +800,7 @@ static void Svy_PutFormsToRemEditOneSvy (long SvyCod,bool Visible)
Gbl.Svys.SvyCodToEdit = SvyCod; // Used as parameters in contextual links
/***** Put form to remove survey *****/
Lay_PutContextualIconToRemove (ActReqRemSvy,Svy_PutParams);
Ico_PutContextualIconToRemove (ActReqRemSvy,Svy_PutParams);
/***** Put form to reset survey *****/
Lay_PutContextualLink (ActReqRstSvy,NULL,Svy_PutParams,
@ -810,12 +810,12 @@ static void Svy_PutFormsToRemEditOneSvy (long SvyCod,bool Visible)
/***** Put form to hide/show survey *****/
if (Visible)
Lay_PutContextualIconToHide (ActHidSvy,Svy_PutParams);
Ico_PutContextualIconToHide (ActHidSvy,Svy_PutParams);
else
Lay_PutContextualIconToUnhide (ActShoSvy,Svy_PutParams);
Ico_PutContextualIconToUnhide (ActShoSvy,Svy_PutParams);
/***** Put form to edit survey *****/
Lay_PutContextualIconToEdit (ActEdiOneSvy,Svy_PutParams);
Ico_PutContextualIconToEdit (ActEdiOneSvy,Svy_PutParams);
}
/*****************************************************************************/
@ -3235,7 +3235,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
Act_FormStart (ActReqRemSvyQst);
Svy_PutParamSvyCod (Svy->SvyCod);
Svy_PutParamQstCod (SvyQst->QstCod);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>");
@ -3501,7 +3501,7 @@ static void Svy_DrawBarNumUsrs (unsigned NumUsrs,unsigned MaxUsrs)
static void Svy_PutIconToRemoveOneQst (void)
{
Lay_PutContextualIconToRemove (ActReqRemSvyQst,Svy_PutParamsRemoveOneQst);
Ico_PutContextualIconToRemove (ActReqRemSvyQst,Svy_PutParamsRemoveOneQst);
}
/*****************************************************************************/

View File

@ -601,13 +601,13 @@ static void Syl_ShowRowSyllabus (unsigned NumItem,
/***** Icon to remove the row *****/
fprintf (Gbl.F.Out,"<td class=\"BM%u\">",Gbl.RowEvenOdd);
if (LstItemsSyllabus.Lst[NumItem].HasChildren)
Lay_PutIconRemovalNotAllowed ();
Ico_PutIconRemovalNotAllowed ();
else
{
Act_FormStart (Gbl.CurrentCrs.Info.Type == Inf_LECTURES ? ActDelItmSylLec :
ActDelItmSylPra);
Syl_PutParamNumItem (NumItem);
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
}
fprintf (Gbl.F.Out,"</td>");

View File

@ -1346,7 +1346,7 @@ static void Tst_PutIconsTests (void)
{
/***** Put form to edit existing test questions *****/
if (Gbl.Action.Act != ActEdiTstQst)
Lay_PutContextualIconToEdit (ActEdiTstQst,NULL);
Ico_PutContextualIconToEdit (ActEdiTstQst,NULL);
/***** Put form to create a new test question *****/
if (Gbl.Action.Act != ActEdiOneTstQst)
@ -2835,7 +2835,7 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m
Par_PutHiddenParamChar ("OnlyThisQst",'Y'); // If there are only one row, don't list again after removing
Sta_WriteParamsDatesSeeAccesses ();
Tst_WriteParamEditQst ();
Lay_PutIconRemove ();
Ico_PutIconRemove ();
Act_FormEnd ();
fprintf (Gbl.F.Out,"</td>");
@ -5860,7 +5860,7 @@ static void Tst_EnableOrDisableTag (long TagCod,bool TagHidden)
static void Tst_PutIconToRemoveOneQst (void)
{
Lay_PutContextualIconToRemove (ActReqRemTstQst,Tst_PutParamsRemoveOneQst);
Ico_PutContextualIconToRemove (ActReqRemTstQst,Tst_PutParamsRemoveOneQst);
}
/*****************************************************************************/

View File

@ -265,7 +265,7 @@ void TsI_CreateXML (unsigned long NumRows,MYSQL_RES *mysql_res)
Cfg_URL_SWAD_PUBLIC,Cfg_FOLDER_FILE_BROWSER_TMP,
Gbl.FileBrowser.TmpPubDir,
The_ClassFormBold[Gbl.Prefs.Theme]);
Lay_PutIconWithText ("file64x64.gif",
Ico_PutIconWithText ("file64x64.gif",
Txt_XML_file,
Txt_XML_file);
fprintf (Gbl.F.Out,"</a>");

View File

@ -395,13 +395,13 @@ void TT_ShowClassTimeTable (void)
static void TT_PutContextualIcons (void)
{
if (Gbl.TimeTable.ContextualIcons.PutIconEditCrsTT)
Lay_PutContextualIconToEdit (ActEdiCrsTT,Grp_PutParamWhichGrps);
Ico_PutContextualIconToEdit (ActEdiCrsTT,Grp_PutParamWhichGrps);
if (Gbl.TimeTable.ContextualIcons.PutIconEditOfficeHours)
Lay_PutContextualIconToEdit (ActEdiTut,NULL);
Ico_PutContextualIconToEdit (ActEdiTut,NULL);
if (Gbl.TimeTable.ContextualIcons.PutIconPrint)
Lay_PutContextualIconToPrint (Gbl.TimeTable.Type == TT_COURSE_TIMETABLE ? ActPrnCrsTT :
Ico_PutContextualIconToPrint (Gbl.TimeTable.Type == TT_COURSE_TIMETABLE ? ActPrnCrsTT :
ActPrnMyTT,
Grp_PutParamWhichGrps);
}
@ -466,7 +466,7 @@ void TT_EditMyTutTimeTable (void)
static void TT_PutIconToViewCrsTT (void)
{
Lay_PutContextualIconToView (ActSeeCrsTT,NULL);
Ico_PutContextualIconToView (ActSeeCrsTT,NULL);
}
/*****************************************************************************/
@ -475,7 +475,7 @@ static void TT_PutIconToViewCrsTT (void)
static void TT_PutIconToViewMyTT (void)
{
Lay_PutContextualIconToView (ActSeeMyTT,NULL);
Ico_PutContextualIconToView (ActSeeMyTT,NULL);
}
/*****************************************************************************/

View File

@ -7826,17 +7826,17 @@ static void Usr_PutIconsListTchs (void)
static void Usr_PutIconToPrintGsts (void)
{
Lay_PutContextualIconToPrint (ActPrnGstPho,Usr_ShowGstsAllDataParams);
Ico_PutContextualIconToPrint (ActPrnGstPho,Usr_ShowGstsAllDataParams);
}
static void Usr_PutIconToPrintStds (void)
{
Lay_PutContextualIconToPrint (ActPrnStdPho,Usr_ShowStdsAllDataParams);
Ico_PutContextualIconToPrint (ActPrnStdPho,Usr_ShowStdsAllDataParams);
}
static void Usr_PutIconToPrintTchs (void)
{
Lay_PutContextualIconToPrint (ActPrnTchPho,Usr_ShowTchsAllDataParams);
Ico_PutContextualIconToPrint (ActPrnTchPho,Usr_ShowTchsAllDataParams);
}
/*****************************************************************************/