diff --git a/swad_agenda.c b/swad_agenda.c
index 097ee2835..939ae6a97 100644
--- a/swad_agenda.c
+++ b/swad_agenda.c
@@ -652,7 +652,7 @@ static void Agd_PutIconToCreateNewEvent (void)
static void Agd_PutIconToViewEditMyFullAgenda (void)
{
- Lay_PutIconToEdit (ActSeeMyAgd,NULL);
+ Lay_PutContextualIconToEdit (ActSeeMyAgd,NULL);
}
static void Agd_PutIconToShowQR (void)
@@ -837,26 +837,22 @@ static void Agd_ShowOneEvent (Agd_AgendaType_t AgendaType,long AgdCod)
static void Agd_PutFormsToRemEditOneEvent (struct AgendaEvent *AgdEvent)
{
- extern const char *Txt_Remove;
extern const char *Txt_Event_private_click_to_make_it_visible_to_the_users_of_your_courses;
extern const char *Txt_Event_visible_to_the_users_of_your_courses_click_to_make_it_private;
Gbl.Agenda.AgdCodToEdit = AgdEvent->AgdCod; // Used as parameter in contextual links
/***** Put form to remove event *****/
- Lay_PutContextualLink (ActReqRemEvtMyAgd,NULL,Agd_PutCurrentParamsMyAgenda,
- "remove-on64x64.png",
- Txt_Remove,NULL,
- NULL);
+ Lay_PutContextualIconToRemove (ActReqRemEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
/***** Put form to hide/show event *****/
if (AgdEvent->Hidden)
- Lay_PutIconToUnhide (ActShoEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
+ Lay_PutContextualIconToUnhide (ActShoEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
else
- Lay_PutIconToHide (ActHidEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
+ Lay_PutContextualIconToHide (ActHidEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
/***** Put form to edit event *****/
- Lay_PutIconToEdit (ActEdiOneEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
+ Lay_PutContextualIconToEdit (ActEdiOneEvtMyAgd,Agd_PutCurrentParamsMyAgenda);
/***** Put form to make event public/private *****/
if (AgdEvent->Public)
diff --git a/swad_announcement.c b/swad_announcement.c
index 5bad175e7..2070768c1 100644
--- a/swad_announcement.c
+++ b/swad_announcement.c
@@ -272,7 +272,6 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status,
{
extern const char *Txt_Users;
extern const char *Txt_ROLES_PLURAL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
- extern const char *Txt_Remove;
extern const char *Txt_NOTICE_Active_Mark_as_obsolete;
extern const char *Txt_NOTICE_Obsolete_Mark_as_active;
extern const char *Txt_Do_not_show_again;
@@ -308,10 +307,7 @@ static void Ann_DrawAnAnnouncement (long AnnCod,Ann_Status_t Status,
if (ICanEdit)
{
/***** Put form to remove announcement *****/
- Lay_PutContextualLink (ActRemAnn,NULL,Ann_PutParams,
- "remove-on64x64.png",
- Txt_Remove,NULL,
- NULL);
+ Lay_PutContextualIconToRemove (ActRemAnn,Ann_PutParams);
/***** Put form to change the status of the announcement *****/
switch (Status)
diff --git a/swad_assignment.c b/swad_assignment.c
index 4d9a2d8be..e1bf350c7 100644
--- a/swad_assignment.c
+++ b/swad_assignment.c
@@ -502,26 +502,21 @@ void Asg_PutHiddenParamAsgOrder (void)
static void Asg_PutFormsToRemEditOneAsg (long AsgCod,bool Hidden)
{
- extern const char *Txt_Remove;
-
fprintf (Gbl.F.Out,"
");
Gbl.Asgs.AsgCodToEdit = AsgCod; // Used as parameter in contextual links
/***** Put form to remove assignment *****/
- Lay_PutContextualLink (ActReqRemAsg,NULL,Asg_PutParams,
- "remove-on64x64.png",
- Txt_Remove,NULL,
- NULL);
+ Lay_PutContextualIconToRemove (ActReqRemAsg,Asg_PutParams);
/***** Put form to hide/show assignment *****/
if (Hidden)
- Lay_PutIconToUnhide (ActShoAsg,Asg_PutParams);
+ Lay_PutContextualIconToUnhide (ActShoAsg,Asg_PutParams);
else
- Lay_PutIconToHide (ActHidAsg,Asg_PutParams);
+ Lay_PutContextualIconToHide (ActHidAsg,Asg_PutParams);
/***** Put form to edit assignment *****/
- Lay_PutIconToEdit (ActEdiOneAsg,Asg_PutParams);
+ Lay_PutContextualIconToEdit (ActEdiOneAsg,Asg_PutParams);
fprintf (Gbl.F.Out,"
");
}
diff --git a/swad_attendance.c b/swad_attendance.c
index c98ce0121..4a2bb6779 100644
--- a/swad_attendance.c
+++ b/swad_attendance.c
@@ -542,26 +542,21 @@ static void Att_PutFormToListStdsParams (void)
static void Att_PutFormsToRemEditOneAttEvent (long AttCod,bool Hidden)
{
- extern const char *Txt_Remove;
-
fprintf (Gbl.F.Out,"");
Gbl.AttEvents.AttCodToEdit = AttCod; // Used as parameters in contextual links
/***** Put form to remove attendance event *****/
- Lay_PutContextualLink (ActReqRemAtt,NULL,Att_PutParams,
- "remove-on64x64.png",
- Txt_Remove,NULL,
- NULL);
+ Lay_PutContextualIconToRemove (ActReqRemAtt,Att_PutParams);
/***** Put form to hide/show attendance event *****/
if (Hidden)
- Lay_PutIconToUnhide (ActShoAtt,Att_PutParams);
+ Lay_PutContextualIconToUnhide (ActShoAtt,Att_PutParams);
else
- Lay_PutIconToHide (ActHidAtt,Att_PutParams);
+ Lay_PutContextualIconToHide (ActHidAtt,Att_PutParams);
/***** Put form to edit attendance event *****/
- Lay_PutIconToEdit (ActEdiOneAtt,Att_PutParams);
+ Lay_PutContextualIconToEdit (ActEdiOneAtt,Att_PutParams);
fprintf (Gbl.F.Out,"
");
}
@@ -2956,7 +2951,7 @@ static void Att_GetListSelectedAttCods (char **StrAttCodsSelected)
static void Att_PutIconToPrintMyList (void)
{
- Lay_PutIconToPrint (ActPrnLstMyAtt,Att_PutFormToPrintMyListParams);
+ Lay_PutContextualIconToPrint (ActPrnLstMyAtt,Att_PutFormToPrintMyListParams);
}
static void Att_PutFormToPrintMyListParams (void)
@@ -2973,7 +2968,7 @@ static void Att_PutFormToPrintMyListParams (void)
static void Att_PutIconToPrintStdsList (void)
{
- Lay_PutIconToPrint (ActPrnLstStdAtt,Att_PutParamsToPrintStdsList);
+ Lay_PutContextualIconToPrint (ActPrnLstStdAtt,Att_PutParamsToPrintStdsList);
}
static void Att_PutParamsToPrintStdsList (void)
diff --git a/swad_banner.c b/swad_banner.c
index f48ad3429..3154d578c 100644
--- a/swad_banner.c
+++ b/swad_banner.c
@@ -171,7 +171,7 @@ static void Ban_WriteListOfBanners (void)
static void Ban_PutFormToEditBanners (void)
{
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
- Lay_PutIconToEdit (ActEdiBan,NULL);
+ Lay_PutContextualIconToEdit (ActEdiBan,NULL);
}
/*****************************************************************************/
diff --git a/swad_calendar.c b/swad_calendar.c
index 8ca48b116..077d21b7a 100644
--- a/swad_calendar.c
+++ b/swad_calendar.c
@@ -346,12 +346,12 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
static void Cal_PutIconToPrintCalendarSys (void)
{
- Lay_PutIconToPrint (ActPrnCalSys,NULL);
+ Lay_PutContextualIconToPrint (ActPrnCalSys,NULL);
}
static void Cal_PutIconToPrintCalendarCty (void)
{
- Lay_PutIconToPrint (ActPrnCalCty,NULL);
+ Lay_PutContextualIconToPrint (ActPrnCalCty,NULL);
}
static void Cal_PutIconToPrintCalendarIns (void)
@@ -359,7 +359,7 @@ static void Cal_PutIconToPrintCalendarIns (void)
extern const char *Txt_Holidays;
/***** Print calendar *****/
- Lay_PutIconToPrint (ActPrnCalIns,NULL);
+ Lay_PutContextualIconToPrint (ActPrnCalIns,NULL);
/***** View holidays *****/
if (Gbl.Hlds.Num || // There are holidays
@@ -372,15 +372,15 @@ static void Cal_PutIconToPrintCalendarIns (void)
static void Cal_PutIconToPrintCalendarCtr (void)
{
- Lay_PutIconToPrint (ActPrnCalCtr,NULL);
+ Lay_PutContextualIconToPrint (ActPrnCalCtr,NULL);
}
static void Cal_PutIconToPrintCalendarDeg (void)
{
- Lay_PutIconToPrint (ActPrnCalDeg,NULL);
+ Lay_PutContextualIconToPrint (ActPrnCalDeg,NULL);
}
static void Cal_PutIconToPrintCalendarCrs (void)
{
- Lay_PutIconToPrint (ActPrnCalCrs,NULL);
+ Lay_PutContextualIconToPrint (ActPrnCalCrs,NULL);
}
diff --git a/swad_centre.c b/swad_centre.c
index 6f02605fa..d8612506c 100644
--- a/swad_centre.c
+++ b/swad_centre.c
@@ -673,7 +673,7 @@ static void Ctr_Configuration (bool PrintView)
static void Ctr_PutIconsToPrintAndUpload (void)
{
/***** Link to print info about centre *****/
- Lay_PutIconToPrint (ActPrnCtrInf,NULL);
+ Lay_PutContextualIconToPrint (ActPrnCtrInf,NULL);
if (Gbl.Usrs.Me.LoggedRole >= Rol_CTR_ADM)
// Only centre admins, institution admins and system admins
@@ -819,7 +819,7 @@ static void Ctr_PutIconsListCentres (void)
static void Ctr_PutIconToEditCentres (void)
{
- Lay_PutIconToEdit (ActEdiCtr,NULL);
+ Lay_PutContextualIconToEdit (ActEdiCtr,NULL);
}
/*****************************************************************************/
@@ -979,7 +979,7 @@ static void Ctr_PutIconsEditingCentres (void)
static void Ctr_PutIconToViewCentres (void)
{
- Lay_PutIconToView (ActSeeCtr,NULL);
+ Lay_PutContextualIconToView (ActSeeCtr,NULL);
}
/*****************************************************************************/
diff --git a/swad_changelog.h b/swad_changelog.h
index e809bfe51..805ee5e4b 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -223,13 +223,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 16.198.3 (2017-04-30)"
+#define Log_PLATFORM_VERSION "SWAD 16.198.4 (2017-04-30)"
#define CSS_FILE "swad16.195.8.css"
#define JS_FILE "swad16.181.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.198.4: Apr 30, 2017 Code refactoring related to contextual icons to remove. (218294 lines)
Version 16.198.3: Apr 30, 2017 Code refactoring related to contextual icons to hide and unhide. (218320 lines)
Version 16.198.2: Apr 30, 2017 Changes in layout of edition of places. (218341 lines)
Version 16.198.1: Apr 30, 2017 Changes in layout of edition of countries. (218332 lines)
diff --git a/swad_country.c b/swad_country.c
index 757b0b3a8..ff68f01ea 100644
--- a/swad_country.c
+++ b/swad_country.c
@@ -483,7 +483,7 @@ static void Cty_Configuration (bool PrintView)
static void Cty_PutIconToPrint (void)
{
- Lay_PutIconToPrint (ActPrnCtyInf,NULL);
+ Lay_PutContextualIconToPrint (ActPrnCtyInf,NULL);
}
/*****************************************************************************/
@@ -770,7 +770,7 @@ static void Cty_PutIconsListCountries (void)
static void Cty_PutIconToEditCountries (void)
{
- Lay_PutIconToEdit (ActEdiCty,NULL);
+ Lay_PutContextualIconToEdit (ActEdiCty,NULL);
}
/*****************************************************************************/
@@ -974,7 +974,7 @@ void Cty_EditCountries (void)
static void Cty_PutIconToViewCountries (void)
{
- Lay_PutIconToView (ActSeeCty,NULL);
+ Lay_PutContextualIconToView (ActSeeCty,NULL);
}
/*****************************************************************************/
diff --git a/swad_course.c b/swad_course.c
index a4f634267..aa640a5fe 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -492,7 +492,7 @@ static void Crs_Configuration (bool PrintView)
static void Crs_PutIconToPrint (void)
{
- Lay_PutIconToPrint (ActPrnCrsInf,NULL);
+ Lay_PutContextualIconToPrint (ActPrnCrsInf,NULL);
}
/*****************************************************************************/
@@ -1191,7 +1191,7 @@ static void Crs_PutIconsListCourses (void)
static void Crs_PutIconToEditCourses (void)
{
- Lay_PutIconToEdit (ActEdiCrs,NULL);
+ Lay_PutContextualIconToEdit (ActEdiCrs,NULL);
}
/*****************************************************************************/
@@ -1347,7 +1347,7 @@ void Crs_EditCourses (void)
static void Crs_PutIconToViewCourses (void)
{
- Lay_PutIconToView (ActSeeCrs,NULL);
+ Lay_PutContextualIconToView (ActSeeCrs,NULL);
}
/*****************************************************************************/
diff --git a/swad_degree.c b/swad_degree.c
index 4b80193e4..bd6f3a32f 100644
--- a/swad_degree.c
+++ b/swad_degree.c
@@ -554,7 +554,7 @@ static void Deg_Configuration (bool PrintView)
static void Deg_PutIconsToPrintAndUpload (void)
{
/***** Link to print info about degree *****/
- Lay_PutIconToPrint (ActPrnDegInf,NULL);
+ Lay_PutContextualIconToPrint (ActPrnDegInf,NULL);
if (Gbl.Usrs.Me.LoggedRole >= Rol_DEG_ADM)
// Only degree admins, centre admins, institution admins and system admins
@@ -1234,7 +1234,7 @@ static void Deg_PutIconsListDegrees (void)
static void Deg_PutIconToEditDegrees (void)
{
- Lay_PutIconToEdit (ActEdiDeg,NULL);
+ Lay_PutContextualIconToEdit (ActEdiDeg,NULL);
}
/*****************************************************************************/
@@ -1393,7 +1393,7 @@ static void Deg_PutIconsEditingDegrees (void)
static void Deg_PutIconToViewDegrees (void)
{
- Lay_PutIconToView (ActSeeDeg,NULL);
+ Lay_PutContextualIconToView (ActSeeDeg,NULL);
}
/*****************************************************************************/
diff --git a/swad_degree_type.c b/swad_degree_type.c
index d914ea011..ab2315b5b 100644
--- a/swad_degree_type.c
+++ b/swad_degree_type.c
@@ -139,7 +139,7 @@ void DT_PutIconToViewDegreeTypes (void)
static void DT_PutIconToViewDegreeTypesWhenEditing (void)
{
- Lay_PutIconToView (ActSeeDegTyp,NULL);
+ Lay_PutContextualIconToView (ActSeeDegTyp,NULL);
}
/*****************************************************************************/
@@ -345,7 +345,7 @@ static void DT_PutIconToEditDegTypes (void)
if (CentreTabVisible && // Only editable if centre tab is visible
DT_CheckIfICanCreateDegreeTypes ())
- Lay_PutIconToEdit (ActEdiDegTyp,NULL);
+ Lay_PutContextualIconToEdit (ActEdiDegTyp,NULL);
}
/*****************************************************************************/
diff --git a/swad_department.c b/swad_department.c
index 0a26e50e6..9446c099c 100644
--- a/swad_department.c
+++ b/swad_department.c
@@ -209,7 +209,7 @@ static void Dpt_GetParamDptOrder (void)
static void Dpt_PutIconToEditDpts (void)
{
- Lay_PutIconToEdit (ActEdiDpt,NULL);
+ Lay_PutContextualIconToEdit (ActEdiDpt,NULL);
}
/*****************************************************************************/
diff --git a/swad_exam.c b/swad_exam.c
index 241f2b22d..30709e1ce 100644
--- a/swad_exam.c
+++ b/swad_exam.c
@@ -1535,36 +1535,31 @@ static void Exa_ShowExamAnnouncement (Exa_TypeViewExamAnnouncement_t TypeViewExa
static void Exa_PutIconsExamAnnouncement (void)
{
- extern const char *Txt_Remove;
-
if (Gbl.Usrs.Me.LoggedRole == Rol_TEACHER ||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
{
/***** Link to remove this exam announcement *****/
- Lay_PutContextualLink (ActReqRemExaAnn,NULL,Exa_PutParamExaCodToEdit,
- "remove-on64x64.png",
- Txt_Remove,NULL,
- NULL);
+ Lay_PutContextualIconToRemove (ActReqRemExaAnn,Exa_PutParamExaCodToEdit);
/***** Put form to hide/show exam announement *****/
switch (Gbl.ExamAnns.ExaDat.Status)
{
case Exa_VISIBLE_EXAM_ANNOUNCEMENT:
- Lay_PutIconToHide (ActHidExaAnn,Exa_PutParamExaCodToEdit);
+ Lay_PutContextualIconToHide (ActHidExaAnn,Exa_PutParamExaCodToEdit);
break;
case Exa_HIDDEN_EXAM_ANNOUNCEMENT:
- Lay_PutIconToUnhide (ActShoExaAnn,Exa_PutParamExaCodToEdit);
+ Lay_PutContextualIconToUnhide (ActShoExaAnn,Exa_PutParamExaCodToEdit);
break;
case Exa_DELETED_EXAM_ANNOUNCEMENT: // Not applicable here
break;
}
/***** Link to edit this exam announcement *****/
- Lay_PutIconToEdit (ActEdiExaAnn,Exa_PutParamExaCodToEdit);
+ Lay_PutContextualIconToEdit (ActEdiExaAnn,Exa_PutParamExaCodToEdit);
}
/***** Link to print view *****/
- Lay_PutIconToPrint (ActPrnExaAnn,Exa_PutParamExaCodToEdit);
+ Lay_PutContextualIconToPrint (ActPrnExaAnn,Exa_PutParamExaCodToEdit);
}
/*****************************************************************************/
diff --git a/swad_file_browser.c b/swad_file_browser.c
index f3a28ea06..dcf7e64c4 100644
--- a/swad_file_browser.c
+++ b/swad_file_browser.c
@@ -3679,11 +3679,11 @@ static void Brw_PutIconsFileBrowser (void)
case Brw_ICON_NONE:
break;
case Brw_ICON_VIEW:
- Lay_PutIconToView (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type],
+ Lay_PutContextualIconToView (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type],
Brw_PutHiddenParamFullTreeIfSelected);
break;
case Brw_ICON_EDIT:
- Lay_PutIconToEdit (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type],
+ Lay_PutContextualIconToEdit (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type],
Brw_PutHiddenParamFullTreeIfSelected);
break;
}
diff --git a/swad_group.c b/swad_group.c
index b7d8a14b5..5ff192de0 100644
--- a/swad_group.c
+++ b/swad_group.c
@@ -1331,7 +1331,7 @@ static void Grp_PutIconsEditingGroupTypes (void)
static void Grp_PutIconToViewGroups (void)
{
- Lay_PutIconToView (ActReqSelGrp,NULL);
+ Lay_PutContextualIconToView (ActReqSelGrp,NULL);
}
static void Grp_PutIconToCreateNewGroupType (void)
@@ -1726,7 +1726,7 @@ void Grp_ShowLstGrpsToChgMyGrps (bool ShowWarningsToStudents)
static void Grp_PutIconToEditGroups (void)
{
- Lay_PutIconToEdit (ActReqEdiGrp,NULL);
+ Lay_PutContextualIconToEdit (ActReqEdiGrp,NULL);
}
/*****************************************************************************/
diff --git a/swad_holiday.c b/swad_holiday.c
index 9379ce20d..8bff78347 100644
--- a/swad_holiday.c
+++ b/swad_holiday.c
@@ -211,7 +211,7 @@ static void Hld_GetParamHldOrder (void)
static void Hld_PutIconToEditHlds (void)
{
- Lay_PutIconToEdit (ActEdiHld,NULL);
+ Lay_PutContextualIconToEdit (ActEdiHld,NULL);
}
/*****************************************************************************/
diff --git a/swad_info.c b/swad_info.c
index 8c452e238..6e8ae5bfd 100644
--- a/swad_info.c
+++ b/swad_info.c
@@ -467,7 +467,7 @@ static void Inf_PutButtonToEditInfo (void)
void Inf_PutIconToEditInfo (void)
{
- Lay_PutIconToEdit (Inf_ActionsEditInfo[Gbl.CurrentCrs.Info.Type],NULL);
+ Lay_PutContextualIconToEdit (Inf_ActionsEditInfo[Gbl.CurrentCrs.Info.Type],NULL);
}
/*****************************************************************************/
diff --git a/swad_institution.c b/swad_institution.c
index 4f858fbc6..63aa276a1 100644
--- a/swad_institution.c
+++ b/swad_institution.c
@@ -628,7 +628,7 @@ static void Ins_Configuration (bool PrintView)
static void Ins_PutIconsToPrintAndUpload (void)
{
/***** Link to print info about institution *****/
- Lay_PutIconToPrint (ActPrnInsInf,NULL);
+ Lay_PutContextualIconToPrint (ActPrnInsInf,NULL);
if (Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM)
/***** Link to upload logo of institution *****/
@@ -738,7 +738,7 @@ static void Ins_PutIconsListInstitutions (void)
static void Ins_PutIconToEditInstitutions (void)
{
- Lay_PutIconToEdit (ActEdiIns,NULL);
+ Lay_PutContextualIconToEdit (ActEdiIns,NULL);
}
/*****************************************************************************/
@@ -948,7 +948,7 @@ void Ins_EditInstitutions (void)
static void Ins_PutIconToViewInstitutions (void)
{
- Lay_PutIconToView (ActSeeIns,NULL);
+ Lay_PutContextualIconToView (ActSeeIns,NULL);
}
/*****************************************************************************/
diff --git a/swad_layout.c b/swad_layout.c
index 126150f70..998516a4c 100644
--- a/swad_layout.c
+++ b/swad_layout.c
@@ -1087,10 +1087,20 @@ static void Lay_ShowRightColumn (void)
}
/*****************************************************************************/
-/******** Show contextual icons to edit, view, hide, unhide, print ***********/
+/***** Show contextual icons to remove, edit, view, hide, unhide, print ******/
/*****************************************************************************/
-void Lay_PutIconToEdit (Act_Action_t NextAction,void (*FuncParams) ())
+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;
@@ -1100,7 +1110,7 @@ void Lay_PutIconToEdit (Act_Action_t NextAction,void (*FuncParams) ())
NULL);
}
-void Lay_PutIconToView (Act_Action_t NextAction,void (*FuncParams) ())
+void Lay_PutContextualIconToView (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_View;
@@ -1110,7 +1120,7 @@ void Lay_PutIconToView (Act_Action_t NextAction,void (*FuncParams) ())
NULL);
}
-void Lay_PutIconToHide (Act_Action_t NextAction,void (*FuncParams) ())
+void Lay_PutContextualIconToHide (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Hide;
@@ -1120,7 +1130,7 @@ void Lay_PutIconToHide (Act_Action_t NextAction,void (*FuncParams) ())
NULL);
}
-void Lay_PutIconToUnhide (Act_Action_t NextAction,void (*FuncParams) ())
+void Lay_PutContextualIconToUnhide (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Show;
@@ -1130,7 +1140,7 @@ void Lay_PutIconToUnhide (Act_Action_t NextAction,void (*FuncParams) ())
NULL);
}
-void Lay_PutIconToPrint (Act_Action_t NextAction,void (*FuncParams) ())
+void Lay_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) ())
{
extern const char *Txt_Print;
@@ -1334,7 +1344,7 @@ void Lay_PutIconBRemovalNotAllowed (void)
}
/*****************************************************************************/
-/******** Put a disabled icon indicating that removal is not allowed *********/
+/******** Put an icon indicating that removal is not allowed *********/
/*****************************************************************************/
void Lay_PutIconRemove (void)
diff --git a/swad_layout.h b/swad_layout.h
index 372790eeb..d433cb8bc 100644
--- a/swad_layout.h
+++ b/swad_layout.h
@@ -72,11 +72,12 @@ typedef enum
void Lay_WriteStartOfPage (void);
-void Lay_PutIconToEdit (Act_Action_t NextAction,void (*FuncParams) ());
-void Lay_PutIconToView (Act_Action_t NextAction,void (*FuncParams) ());
-void Lay_PutIconToUnhide (Act_Action_t NextAction,void (*FuncParams) ());
-void Lay_PutIconToHide (Act_Action_t NextAction,void (*FuncParams) ());
-void Lay_PutIconToPrint (Act_Action_t NextAction,void (*FuncParams) ());
+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,
diff --git a/swad_link.c b/swad_link.c
index 32b95a815..b697703b7 100644
--- a/swad_link.c
+++ b/swad_link.c
@@ -130,7 +130,7 @@ void Lnk_SeeLinks (void)
static void Lnk_PutIconToEditLinks (void)
{
- Lay_PutIconToEdit (ActEdiLnk,NULL);
+ Lay_PutContextualIconToEdit (ActEdiLnk,NULL);
}
/*****************************************************************************/
diff --git a/swad_mail.c b/swad_mail.c
index 50e952f34..25ce369e0 100644
--- a/swad_mail.c
+++ b/swad_mail.c
@@ -177,7 +177,7 @@ static void Mai_GetParamMaiOrder (void)
static void Mai_PutIconToEditMailDomains (void)
{
- Lay_PutIconToEdit (ActEdiMai,NULL);
+ Lay_PutContextualIconToEdit (ActEdiMai,NULL);
}
/*****************************************************************************/
diff --git a/swad_notice.c b/swad_notice.c
index 5467e2dc8..86ed29c5f 100644
--- a/swad_notice.c
+++ b/swad_notice.c
@@ -598,7 +598,6 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
extern const char *Txt_NOTICE_Obsolete_Mark_as_active;
extern const char *Txt_See_full_notice;
extern const char *Txt_Today;
- extern const char *Txt_Remove;
static const char *ContainerClass[Not_NUM_STATUS] =
{
"NOTICE_CONTAINER_ACTIVE", // Not_ACTIVE_NOTICE
@@ -636,10 +635,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
if (Not_CheckIfICanEditNotices ())
{
/***** Put form to remove announcement *****/
- Lay_PutContextualLink (ActReqRemNot,NULL,Not_PutParams,
- "remove-on64x64.png",
- Txt_Remove,NULL,
- NULL);
+ Lay_PutContextualIconToRemove (ActReqRemNot,Not_PutParams);
/***** Put form to change the status of the notice *****/
switch (Status)
diff --git a/swad_photo.c b/swad_photo.c
index 7a005b8fb..b95e3df42 100644
--- a/swad_photo.c
+++ b/swad_photo.c
@@ -1862,7 +1862,7 @@ static Pho_HowOrderDegrees_t Pho_GetHowOrderDegreesFromForm (void)
static void Pho_PutIconToPrintDegreeStats (void)
{
- Lay_PutIconToPrint (ActPrnPhoDeg,Pho_PutLinkToPrintViewOfDegreeStatsParams);
+ Lay_PutContextualIconToPrint (ActPrnPhoDeg,Pho_PutLinkToPrintViewOfDegreeStatsParams);
}
static void Pho_PutLinkToPrintViewOfDegreeStatsParams (void)
diff --git a/swad_place.c b/swad_place.c
index bf0a92127..3809dc63b 100644
--- a/swad_place.c
+++ b/swad_place.c
@@ -230,7 +230,7 @@ static void Plc_GetParamPlcOrder (void)
static void Plc_PutIconToEditPlaces (void)
{
- Lay_PutIconToEdit (ActEdiPlc,NULL);
+ Lay_PutContextualIconToEdit (ActEdiPlc,NULL);
}
/*****************************************************************************/
@@ -269,7 +269,7 @@ void Plc_EditPlaces (void)
static void Plc_PutIconToViewPlacesWhenEditing (void)
{
- Lay_PutIconToView (ActSeePlc,NULL);
+ Lay_PutContextualIconToView (ActSeePlc,NULL);
}
/*****************************************************************************/
diff --git a/swad_plugin.c b/swad_plugin.c
index 9b2a7bcb1..8e3fcf621 100644
--- a/swad_plugin.c
+++ b/swad_plugin.c
@@ -151,7 +151,7 @@ void Plg_ListPlugins (void)
static void Plg_PutIconToEditPlugins (void)
{
- Lay_PutIconToEdit (ActEdiPlg,NULL);
+ Lay_PutContextualIconToEdit (ActEdiPlg,NULL);
}
/*****************************************************************************/
diff --git a/swad_survey.c b/swad_survey.c
index b78b1b74c..452c59e38 100644
--- a/swad_survey.c
+++ b/swad_survey.c
@@ -781,7 +781,6 @@ void Svy_PutHiddenParamSvyOrder (void)
static void Svy_PutFormsToRemEditOneSvy (long SvyCod,bool Visible)
{
- extern const char *Txt_Remove;
extern const char *Txt_Reset;
fprintf (Gbl.F.Out,"");
@@ -789,10 +788,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_PutContextualLink (ActReqRemSvy,NULL,Svy_PutParams,
- "remove-on64x64.png",
- Txt_Remove,NULL,
- NULL);
+ Lay_PutContextualIconToRemove (ActReqRemSvy,Svy_PutParams);
/***** Put form to reset survey *****/
Lay_PutContextualLink (ActReqRstSvy,NULL,Svy_PutParams,
@@ -802,12 +798,12 @@ static void Svy_PutFormsToRemEditOneSvy (long SvyCod,bool Visible)
/***** Put form to hide/show survey *****/
if (Visible)
- Lay_PutIconToHide (ActHidSvy,Svy_PutParams);
+ Lay_PutContextualIconToHide (ActHidSvy,Svy_PutParams);
else
- Lay_PutIconToUnhide (ActShoSvy,Svy_PutParams);
+ Lay_PutContextualIconToUnhide (ActShoSvy,Svy_PutParams);
/***** Put form to edit survey *****/
- Lay_PutIconToEdit (ActEdiOneSvy,Svy_PutParams);
+ Lay_PutContextualIconToEdit (ActEdiOneSvy,Svy_PutParams);
fprintf (Gbl.F.Out,"
");
}
@@ -3481,12 +3477,7 @@ static void Svy_DrawBarNumUsrs (unsigned NumUsrs,unsigned MaxUsrs)
static void Svy_PutIconToRemoveOneQst (void)
{
- extern const char *Txt_Remove;
-
- Lay_PutContextualLink (ActReqRemSvyQst,NULL,Svy_PutParamsRemoveOneQst,
- "remove-on64x64.png",
- Txt_Remove,NULL,
- NULL);
+ Lay_PutContextualIconToRemove (ActReqRemSvyQst,Svy_PutParamsRemoveOneQst);
}
/*****************************************************************************/
diff --git a/swad_test.c b/swad_test.c
index e6255c7eb..9db6473c3 100644
--- a/swad_test.c
+++ b/swad_test.c
@@ -1334,7 +1334,7 @@ static void Tst_PutIconsTests (void)
{
/***** Put form to edit existing test questions *****/
if (Gbl.Action.Act != ActEdiTstQst)
- Lay_PutIconToEdit (ActEdiTstQst,NULL);
+ Lay_PutContextualIconToEdit (ActEdiTstQst,NULL);
/***** Put form to create a new test question *****/
if (Gbl.Action.Act != ActEdiOneTstQst)
@@ -5832,12 +5832,7 @@ static void Tst_EnableOrDisableTag (long TagCod,bool TagHidden)
static void Tst_PutIconToRemoveOneQst (void)
{
- extern const char *Txt_Remove;
-
- Lay_PutContextualLink (ActReqRemTstQst,NULL,Tst_PutParamsRemoveOneQst,
- "remove-on64x64.png",
- Txt_Remove,NULL,
- NULL);
+ Lay_PutContextualIconToRemove (ActReqRemTstQst,Tst_PutParamsRemoveOneQst);
}
/*****************************************************************************/
diff --git a/swad_timetable.c b/swad_timetable.c
index c676c9baa..2840136f4 100644
--- a/swad_timetable.c
+++ b/swad_timetable.c
@@ -393,13 +393,13 @@ void TT_ShowClassTimeTable (void)
static void TT_PutContextualIcons (void)
{
if (Gbl.TimeTable.ContextualIcons.PutIconEditCrsTT)
- Lay_PutIconToEdit (ActEdiCrsTT,Grp_PutParamWhichGrps);
+ Lay_PutContextualIconToEdit (ActEdiCrsTT,Grp_PutParamWhichGrps);
if (Gbl.TimeTable.ContextualIcons.PutIconEditOfficeHours)
- Lay_PutIconToEdit (ActEdiTut,NULL);
+ Lay_PutContextualIconToEdit (ActEdiTut,NULL);
if (Gbl.TimeTable.ContextualIcons.PutIconPrint)
- Lay_PutIconToPrint (Gbl.TimeTable.Type == TT_COURSE_TIMETABLE ? ActPrnCrsTT :
+ Lay_PutContextualIconToPrint (Gbl.TimeTable.Type == TT_COURSE_TIMETABLE ? ActPrnCrsTT :
ActPrnMyTT,
Grp_PutParamWhichGrps);
}
@@ -460,7 +460,7 @@ void TT_EditMyTutTimeTable (void)
static void TT_PutIconToViewCrsTT (void)
{
- Lay_PutIconToView (ActSeeCrsTT,NULL);
+ Lay_PutContextualIconToView (ActSeeCrsTT,NULL);
}
/*****************************************************************************/
@@ -469,7 +469,7 @@ static void TT_PutIconToViewCrsTT (void)
static void TT_PutIconToViewMyTT (void)
{
- Lay_PutIconToView (ActSeeMyTT,NULL);
+ Lay_PutContextualIconToView (ActSeeMyTT,NULL);
}
/*****************************************************************************/
diff --git a/swad_user.c b/swad_user.c
index 7cc701129..e0dbb554d 100644
--- a/swad_user.c
+++ b/swad_user.c
@@ -7657,17 +7657,17 @@ static void Usr_PutIconsListTchs (void)
static void Usr_PutIconToPrintGsts (void)
{
- Lay_PutIconToPrint (ActPrnGstPho,Usr_ShowGstsAllDataParams);
+ Lay_PutContextualIconToPrint (ActPrnGstPho,Usr_ShowGstsAllDataParams);
}
static void Usr_PutIconToPrintStds (void)
{
- Lay_PutIconToPrint (ActPrnStdPho,Usr_ShowStdsAllDataParams);
+ Lay_PutContextualIconToPrint (ActPrnStdPho,Usr_ShowStdsAllDataParams);
}
static void Usr_PutIconToPrintTchs (void)
{
- Lay_PutIconToPrint (ActPrnTchPho,Usr_ShowTchsAllDataParams);
+ Lay_PutContextualIconToPrint (ActPrnTchPho,Usr_ShowTchsAllDataParams);
}
/*****************************************************************************/