diff --git a/icon/link.svg b/icon/link.svg
index 586901d4..0646548a 100644
--- a/icon/link.svg
+++ b/icon/link.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/swad_changelog.h b/swad_changelog.h
index 70005b82..08dc0725 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -606,10 +606,14 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
TODO: Attach pdf files in multimedia.
*/
-#define Log_PLATFORM_VERSION "SWAD 22.4 (2022-09-15)"
+#define Log_PLATFORM_VERSION "SWAD 22.4.1 (2022-09-15)"
#define CSS_FILE "swad22.3.css"
#define JS_FILE "swad21.100.js"
/*
+ Version 22.4.1: Sep 15, 2022 Changes in edition of program items. (329955 lines)
+Copy the following icon to icon public directory:
+sudo cp icon/link.svg /var/www/html/swad/icon/
+
Version 22.4: Sep 15, 2022 Changes in edition of program items. (329940 lines)
Version 22.3: Sep 14, 2022 Listing program resource clipboard. (329918 lines)
4 changes necessary in database:
@@ -618,7 +622,7 @@ ALTER TABLE prg_resources DROP COLUMN Type;
ALTER TABLE prg_resources ADD COLUMN Type ENUM('non','asg','cfe','exa','gam','svy','doc','mrk','att','for') NOT NULL DEFAULT 'non' AFTER Hidden;
ALTER TABLE prg_resources ADD COLUMN Cod INT NOT NULL DEFAULT -1 AFTER Type;
-Copy the following icons to icon public directory:
+Copy the following icon to icon public directory:
sudo cp icon/link-slash.svg /var/www/html/swad/icon/
Version 22.2: Sep 13, 2022 Code refactoring in program resources. (329795 lines)
diff --git a/swad_program_resource.c b/swad_program_resource.c
index e5639b15..1eb0f314 100644
--- a/swad_program_resource.c
+++ b/swad_program_resource.c
@@ -450,6 +450,12 @@ static void PrgRsc_WriteRowEditResource (Prg_ListingType_t ListingType,
struct Prg_Item *Item,
long SelectedRscCod)
{
+ extern const char *Prg_ResourceTypesDB[PrgRsc_NUM_TYPES];
+ struct PrgRsc_Link Link;
+
+ Link.Type = Item->Resource.Type;
+ Link.Cod = Item->Resource.Cod;
+
/***** Begin row *****/
HTM_TR_Begin (NULL);
@@ -477,20 +483,24 @@ static void PrgRsc_WriteRowEditResource (Prg_ListingType_t ListingType,
/***** Icon to edit link *****/
HTM_TD_Begin ("class=\"PRG_MAIN RT %s\"",The_GetColorRows1 (1));
- Ico_PutContextualIconToGetLink (ActSeeCliPrgRsc,PrgRsc_RESOURCE_SECTION_ID,
- Prg_PutParamRscCod,&Item->Resource.Hierarchy.RscCod);
+ Ico_PutContextualIconToEdit (ActSeeCliPrgRsc,PrgRsc_RESOURCE_SECTION_ID,
+ Prg_PutParamRscCod,&Item->Resource.Hierarchy.RscCod);
HTM_TD_End ();
/***** Link *****/
HTM_TD_Begin ("class=\"PRG_MAIN LT %s\"",The_GetColorRows1 (1));
- /* Current link */
- // Ale_ShowAlert (Ale_INFO,"Current link.");
-
/* Show clipboard to change resource link */
if (ListingType == Prg_SHOW_CLIPBOARD &&
Item->Resource.Hierarchy.RscCod == SelectedRscCod)
PrgRsc_ShowClipboard (Item);
+ else
+ {
+ /***** Link *****/
+ Ico_PutIconOn (Prg_ResourceTypesLogos[Link.Type],Ico_BLACK,
+ Prg_ResourceTypesDB[Link.Type]);
+ PrgRsc_WriteLinkName (&Link);
+ }
HTM_TD_End ();
@@ -507,6 +517,8 @@ static void PrgRsc_WriteRowNewResource (Prg_ListingType_t ListingType,
struct Prg_Item *Item,
long SelectedRscCod)
{
+ extern const char *Prg_ResourceTypesDB[PrgRsc_NUM_TYPES];
+
/***** Begin row *****/
HTM_TR_Begin (NULL);
@@ -535,8 +547,8 @@ static void PrgRsc_WriteRowNewResource (Prg_ListingType_t ListingType,
/***** Icon to edit link *****/
HTM_TD_Begin ("class=\"PRG_MAIN RT %s\"",The_GetColorRows1 (1));
- Ico_PutContextualIconToGetLink (ActSeeCliPrgRsc,PrgRsc_RESOURCE_SECTION_ID,
- Prg_PutParamItmCod,&Item->Hierarchy.ItmCod);
+ Ico_PutContextualIconToEdit (ActSeeCliPrgRsc,PrgRsc_RESOURCE_SECTION_ID,
+ Prg_PutParamItmCod,&Item->Hierarchy.ItmCod);
HTM_TD_End ();
/***** Link *****/
@@ -546,6 +558,10 @@ static void PrgRsc_WriteRowNewResource (Prg_ListingType_t ListingType,
if (ListingType == Prg_SHOW_CLIPBOARD &&
SelectedRscCod <= 0) // No resource selected
PrgRsc_ShowClipboard (Item);
+ else
+ /***** Link *****/
+ Ico_PutIconOn (Prg_ResourceTypesLogos[PrgRsc_NONE],Ico_BLACK,
+ Prg_ResourceTypesDB[PrgRsc_NONE]);
HTM_TD_End ();
@@ -961,7 +977,8 @@ static void PrgRsc_WriteRowClipboard (unsigned NumLink,
Prg_ResourceTypesDB[Link->Type],Link->Cod);
/***** Type *****/
- Ico_PutIconOn (Prg_ResourceTypesLogos[Link->Type],Ico_BLACK,Prg_ResourceTypesDB[Link->Type]);
+ Ico_PutIconOn (Prg_ResourceTypesLogos[Link->Type],Ico_BLACK,
+ Prg_ResourceTypesDB[Link->Type]);
/***** Name *****/
PrgRsc_WriteLinkName (Link);
@@ -980,10 +997,7 @@ static void PrgRsc_WriteLinkName (const struct PrgRsc_Link *Link)
/***** Trivial check: code should be > 0 *****/
if (Link->Cod <= 0)
- {
- HTM_Txt ("sin enlace"); // TODO: Need translation!!!!!
return;
- }
switch (Link->Type)
{