Version 22.86: Mar 29, 2023 New actions to see and remove the resource clipboard in rubrics.

This commit is contained in:
acanas 2023-03-29 15:26:49 +02:00
parent 82897e88bd
commit 3b33d6b45c
13 changed files with 248 additions and 96 deletions

View File

@ -1850,8 +1850,8 @@ a:hover img.CENTER_PHOTO_SHOW
.PRG_LNK_PINK {color:#4d88a1; font-size:13pt;}
.PRG_LNK_DARK {color:#afc4cc; font-size:13pt;}
/************************* Program resource clipboard ************************/
.PRG_CLIPBOARD
/***************************** Resource clipboard ****************************/
.SRC_CLIPBOARD
{
box-sizing:border-box;
list-style-type:none;

View File

@ -840,24 +840,26 @@ const struct Act_Actions ActLst_Actions[ActLst_NUM_ACTIONS] =
[ActReqLnkGam ] = {1935,-1,TabUnk,ActSeeAllGam ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,GamRsc_GetLinkToGame ,NULL},
[ActSeeRub ] = {1952,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rub_SeeOneRubric ,NULL},
[ActFrmNewRub ] = {1953,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rub_ReqCreatOrEditRubric ,NULL},
[ActEdiOneRub ] = {1954,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rub_ReqCreatOrEditRubric ,NULL},
[ActNewRub ] = {1955,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rub_ReceiveFormRubric ,NULL},
[ActChgRub ] = {1956,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rub_ReceiveFormRubric ,NULL},
[ActReqRemRub ] = {1957,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rub_AskRemRubric ,NULL},
[ActRemRub ] = {1958,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rub_RemoveRubric ,NULL},
[ActReqLnkRub ] = {1969,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubRsc_GetLinkToRubric ,NULL},
[ActFrmNewRub ] = {1953,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rub_ReqCreatOrEditRubric ,NULL},
[ActEdiOneRub ] = {1954,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rub_ReqCreatOrEditRubric ,NULL},
[ActNewRub ] = {1955,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rub_ReceiveFormRubric ,NULL},
[ActChgRub ] = {1956,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rub_ReceiveFormRubric ,NULL},
[ActReqRemRub ] = {1957,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rub_AskRemRubric ,NULL},
[ActRemRub ] = {1958,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rub_RemoveRubric ,NULL},
[ActReqLnkRub ] = {1969,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubRsc_GetLinkToRubric ,NULL},
[ActSeeRscCli_InRub ] = {1972,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubRsc_ViewResourceClipboard ,NULL},
[ActRemRscCli_InRub ] = {1973,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubRsc_RemoveResourceClipboard ,NULL},
[ActNewRubCri ] = {1959,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_ReceiveFormCriterion ,NULL},
[ActReqRemRubCri ] = {1960,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_ReqRemCriterion ,NULL},
[ActRemRubCri ] = {1961,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_RemoveCriterion ,NULL},
[ActUp_RubCri ] = {1962,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_MoveUpCriterion ,NULL},
[ActDwnRubCri ] = {1963,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_MoveDownCriterion ,NULL},
[ActChgTitRubCri ] = {1964,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_ChangeTitle ,NULL},
[ActChgLnkRubCri ] = {1968,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_ChangeLink ,NULL},
[ActChgMinRubCri ] = {1965,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_ChangeMinValue ,NULL},
[ActChgMaxRubCri ] = {1966,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_ChangeMaxValue ,NULL},
[ActChgWeiRubCri ] = {1967,-1,TabUnk,ActSeeAllRub ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_ChangeWeight ,NULL},
[ActNewRubCri ] = {1959,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_ReceiveFormCriterion ,NULL},
[ActReqRemRubCri ] = {1960,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_ReqRemCriterion ,NULL},
[ActRemRubCri ] = {1961,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_RemoveCriterion ,NULL},
[ActUp_RubCri ] = {1962,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_MoveUpCriterion ,NULL},
[ActDwnRubCri ] = {1963,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_MoveDownCriterion ,NULL},
[ActChgTitRubCri ] = {1964,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_ChangeTitle ,NULL},
[ActChgLnkRubCri ] = {1968,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_ChangeLink ,NULL},
[ActChgMinRubCri ] = {1965,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_ChangeMinValue ,NULL},
[ActChgMaxRubCri ] = {1966,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_ChangeMaxValue ,NULL},
[ActChgWeiRubCri ] = {1967,-1,TabUnk,ActSeeAllRub ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,RubCri_ChangeWeight ,NULL},
// TabFil ******************************************************************
// Actions in menu:
@ -3861,4 +3863,6 @@ Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD] = // Do not re
ActReqLnkRub, // #1969
ActSeeRscCli_InPrg, // #1970
ActRemRscCli_InPrg, // #1971
ActSeeRscCli_InRub, // #1972
ActRemRscCli_InRub, // #1973
};

View File

@ -771,16 +771,18 @@
#define ActRemRub (ActChgCrsTT1stDay + 226)
#define ActReqLnkRub (ActChgCrsTT1stDay + 227)
#define ActNewRubCri (ActChgCrsTT1stDay + 228)
#define ActReqRemRubCri (ActChgCrsTT1stDay + 229)
#define ActRemRubCri (ActChgCrsTT1stDay + 230)
#define ActUp_RubCri (ActChgCrsTT1stDay + 231)
#define ActDwnRubCri (ActChgCrsTT1stDay + 232)
#define ActChgTitRubCri (ActChgCrsTT1stDay + 233)
#define ActChgLnkRubCri (ActChgCrsTT1stDay + 234)
#define ActChgMinRubCri (ActChgCrsTT1stDay + 235)
#define ActChgMaxRubCri (ActChgCrsTT1stDay + 236)
#define ActChgWeiRubCri (ActChgCrsTT1stDay + 237)
#define ActSeeRscCli_InRub (ActChgCrsTT1stDay + 228)
#define ActRemRscCli_InRub (ActChgCrsTT1stDay + 229)
#define ActNewRubCri (ActChgCrsTT1stDay + 230)
#define ActReqRemRubCri (ActChgCrsTT1stDay + 231)
#define ActRemRubCri (ActChgCrsTT1stDay + 232)
#define ActUp_RubCri (ActChgCrsTT1stDay + 233)
#define ActDwnRubCri (ActChgCrsTT1stDay + 234)
#define ActChgTitRubCri (ActChgCrsTT1stDay + 235)
#define ActChgLnkRubCri (ActChgCrsTT1stDay + 236)
#define ActChgMinRubCri (ActChgCrsTT1stDay + 237)
#define ActChgMaxRubCri (ActChgCrsTT1stDay + 238)
#define ActChgWeiRubCri (ActChgCrsTT1stDay + 239)
/*****************************************************************************/
/******************************** Files tab **********************************/
@ -1773,7 +1775,7 @@
#define ActLst_NUM_ACTIONS (ActChgMyTT1stDay + 1)
#define ActLst_MAX_ACTION_COD 1971
#define ActLst_MAX_ACTION_COD 1973
#define ActLst_DEFAULT_ACTION_AFTER_LOGIN ActSeeGblTL

View File

@ -629,10 +629,11 @@ TODO: Emilce Barrera Mesa: Podr
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
*/
#define Log_PLATFORM_VERSION "SWAD 22.85.1 (2023-03-29)"
#define CSS_FILE "swad22.78.15.css"
#define Log_PLATFORM_VERSION "SWAD 22.86 (2023-03-29)"
#define CSS_FILE "swad22.86.css"
#define JS_FILE "swad22.49.js"
/*
Version 22.86: Mar 29, 2023 New actions to see and remove the resource clipboard in rubrics. (338578 lines)
Version 22.85.1: Mar 29, 2023 Code refactoring in links to update sections. (338447 lines)
Version 22.85: Mar 29, 2023 New action to remove the resource clipboard in program. (338449 lines)
Version 22.84: Mar 29, 2023 New action to see the resource clipboard in program. (338356 lines)

View File

@ -416,7 +416,7 @@ static void Prg_PutIconsEditItems (__attribute__((unused)) void *Args)
/***** Put icon to create a new program item *****/
Prg_PutIconToCreateNewItem ();
/***** Put icon to vew resource clipboard *****/
/***** Put icon to view resource clipboard *****/
Prg_PutIconToViewResourceClipboard ();
}
@ -457,7 +457,7 @@ static void Prg_PutIconToCreateNewItem (void)
}
/*****************************************************************************/
/****************** Put icon to create a new program item ********************/
/******************* Put icon to view resource clipboard *********************/
/*****************************************************************************/
static void Prg_PutIconToViewResourceClipboard (void)

View File

@ -848,6 +848,34 @@ void PrgRsc_ViewResourceClipboard (void)
Prg_EditCourseProgram ();
}
/*****************************************************************************/
/************************* Show resources clipboard **************************/
/*****************************************************************************/
static void PrgRsc_ShowClipboard (void)
{
extern const char *Hlp_COURSE_Program;
extern const char *Txt_Resource_clipboard;
Box_BoxBegin (NULL,Txt_Resource_clipboard,
PrgRsc_PutIconsClipboard,NULL,
Hlp_COURSE_Program,Box_CLOSABLE);
Rsc_ShowClipboard ();
Box_BoxEnd ();
}
/*****************************************************************************/
/****** Put contextual icons when showing resource clipboard in program ******/
/*****************************************************************************/
static void PrgRsc_PutIconsClipboard (__attribute__((unused)) void *Args)
{
/***** Put icon to remove resource clipboard in program *****/
if (Prg_CheckIfICanEditProgram ())
Ico_PutContextualIconToRemove (ActRemRscCli_InPrg,NULL,
NULL,NULL);
}
/*****************************************************************************/
/******************* Remove clipboard and show program ***********************/
/*****************************************************************************/
@ -860,8 +888,8 @@ void PrgRsc_RemoveResourceClipboard (void)
Rsc_DB_RemoveClipboard ();
Ale_ShowAlert (Ale_SUCCESS,Txt_Resource_clipboard_removed);
/***** Edit course program *****/
Prg_EditCourseProgram ();
/***** View resource clipboard again *****/
PrgRsc_ViewResourceClipboard ();
}
/*****************************************************************************/
@ -887,62 +915,6 @@ void PrgRsc_EditProgramWithClipboard (void)
Prg_FreeListItems ();
}
/*****************************************************************************/
/************************* Show resources clipboard **************************/
/*****************************************************************************/
static void PrgRsc_ShowClipboard (void)
{
extern const char *Hlp_COURSE_Program;
extern const char *Rsc_ResourceTypesIcons[Rsc_NUM_TYPES];
extern const char *Txt_Resource_clipboard;
extern const char *Txt_RESOURCE_TYPES[Rsc_NUM_TYPES];
MYSQL_RES *mysql_res;
unsigned NumLink;
unsigned NumLinks;
struct Rsc_Link Link;
Box_BoxBegin (NULL,Txt_Resource_clipboard,
PrgRsc_PutIconsClipboard,NULL,
Hlp_COURSE_Program,Box_CLOSABLE);
/***** Begin list *****/
HTM_UL_Begin ("class=\"PRG_CLIPBOARD\"");
/***** Get links in clipboard from database and write them *****/
NumLinks = Rsc_DB_GetClipboard (&mysql_res);
for (NumLink = 1;
NumLink <= NumLinks;
NumLink++)
{
Rsc_GetLinkDataFromRow (mysql_res,&Link);
HTM_LI_Begin ("class=\"PRG_RSC_%s\"",The_GetSuffix ());
Rsc_WriteLinkName (&Link,
true, // Put form to go
Rsc_ResourceTypesIcons[Link.Type],
Txt_RESOURCE_TYPES[Link.Type]);
HTM_LI_End ();
}
DB_FreeMySQLResult (&mysql_res);
/***** End list *****/
HTM_UL_End ();
Box_BoxEnd ();
}
/*****************************************************************************/
/****** Put contextual icons when showing resource clipboard in program ******/
/*****************************************************************************/
static void PrgRsc_PutIconsClipboard (__attribute__((unused)) void *Args)
{
/***** Put icon to remove resource clipboard in program *****/
if (Prg_CheckIfICanEditProgram ())
Ico_PutContextualIconToRemove (ActRemRscCli_InPrg,NULL,
NULL,NULL);
}
/*****************************************************************************/
/***************** Show clipboard to change resource link ********************/
/*****************************************************************************/
@ -968,7 +940,7 @@ static void PrgRsc_ShowClipboardToChangeLink (struct Prg_Item *Item)
ParCod_PutPar (ParCod_Itm,Item->Hierarchy.ItmCod);
/***** Begin list *****/
HTM_UL_Begin ("class=\"PRG_CLIPBOARD\"");
HTM_UL_Begin ("class=\"SRC_CLIPBOARD\"");
/***** Current link (empty or not) *****/
Rsc_WriteRowClipboard (&Item->Resource.Link,

View File

@ -33,6 +33,7 @@
#include "swad_attendance_resource.h"
#include "swad_browser_resource.h"
#include "swad_call_for_exam_resource.h"
#include "swad_database.h"
#include "swad_exam_resource.h"
#include "swad_forum_resource.h"
#include "swad_game_resource.h"
@ -41,6 +42,7 @@
#include "swad_parameter.h"
#include "swad_project_resource.h"
#include "swad_resource.h"
#include "swad_resource_database.h"
#include "swad_role.h"
#include "swad_rubric_resource.h"
#include "swad_survey_resource.h"
@ -102,6 +104,42 @@ const char *Rsc_ResourceTypesIcons[Rsc_NUM_TYPES] =
extern struct Globals Gbl;
/*****************************************************************************/
/************************* Show resources clipboard **************************/
/*****************************************************************************/
void Rsc_ShowClipboard (void)
{
extern const char *Rsc_ResourceTypesIcons[Rsc_NUM_TYPES];
extern const char *Txt_RESOURCE_TYPES[Rsc_NUM_TYPES];
MYSQL_RES *mysql_res;
unsigned NumLink;
unsigned NumLinks;
struct Rsc_Link Link;
/***** Begin list *****/
HTM_UL_Begin ("class=\"SRC_CLIPBOARD\"");
/***** Get links in clipboard from database and write them *****/
NumLinks = Rsc_DB_GetClipboard (&mysql_res);
for (NumLink = 1;
NumLink <= NumLinks;
NumLink++)
{
Rsc_GetLinkDataFromRow (mysql_res,&Link);
HTM_LI_Begin ("class=\"PRG_RSC_%s\"",The_GetSuffix ());
Rsc_WriteLinkName (&Link,
true, // Put form to go
Rsc_ResourceTypesIcons[Link.Type],
Txt_RESOURCE_TYPES[Link.Type]);
HTM_LI_End ();
}
DB_FreeMySQLResult (&mysql_res);
/***** End list *****/
HTM_UL_End ();
}
/*****************************************************************************/
/************************ Show one link from clipboard ***********************/
/*****************************************************************************/
@ -111,6 +149,7 @@ void Rsc_WriteRowClipboard (const struct Rsc_Link *Link,
{
extern const char *Txt_RESOURCE_TYPES[Rsc_NUM_TYPES];
/***** Begin list row *****/
HTM_LI_Begin ("class=\"PRG_RSC_%s\"",The_GetSuffix ());
HTM_LABEL_Begin (NULL);
@ -128,6 +167,8 @@ void Rsc_WriteRowClipboard (const struct Rsc_Link *Link,
Txt_RESOURCE_TYPES[Link->Type]);
HTM_LABEL_End ();
/***** End list row *****/
HTM_LI_End ();
}

View File

@ -72,6 +72,7 @@ struct Rsc_Link
/***************************** Public prototypes *****************************/
/*****************************************************************************/
void Rsc_ShowClipboard (void);
void Rsc_WriteRowClipboard (const struct Rsc_Link *Link,
bool SubmitOnClick,bool Checked);
void Rsc_WriteLinkName (const struct Rsc_Link *Link,bool PutFormToGo,

View File

@ -60,6 +60,7 @@ extern struct Globals Gbl;
static void Rub_PutIconsListRubrics (void *Rubrics);
static void Rub_PutIconToCreateNewRubric (struct Rub_Rubrics *Rubrics);
static void Prg_PutIconToViewResourceClipboard (void);
static void Rub_PutButtonToCreateNewRubric (struct Rub_Rubrics *Rubrics);
static void Rub_PutParsToCreateNewRubric (void *Rubrics);
@ -256,10 +257,15 @@ static void Rub_PutIconsListRubrics (void *Rubrics)
{
if (Rubrics)
{
/***** Put icon to create a new rubric *****/
if (Rub_CheckIfICanEditRubrics ())
{
/***** Put icon to create a new rubric *****/
Rub_PutIconToCreateNewRubric ((struct Rub_Rubrics *) Rubrics);
/***** Put icon to view resource clipboard *****/
Prg_PutIconToViewResourceClipboard ();
}
/***** Link to get resource link *****/
if (Rsc_CheckIfICanGetLink ())
Ico_PutContextualIconToGetLink (ActReqLnkRub,NULL,
@ -280,6 +286,16 @@ static void Rub_PutIconToCreateNewRubric (struct Rub_Rubrics *Rubrics)
Rub_PutParsToCreateNewRubric,Rubrics);
}
/*****************************************************************************/
/******************* Put icon to view resource clipboard *********************/
/*****************************************************************************/
static void Prg_PutIconToViewResourceClipboard (void)
{
Ico_PutContextualIconToViewClipboard (ActSeeRscCli_InRub,NULL,
NULL,NULL);
}
/*****************************************************************************/
/******************** Put button to create a new rubric **********************/
/*****************************************************************************/

View File

@ -206,7 +206,7 @@ static void RubCri_PutFormNewCriterion (struct Rub_Rubrics *Rubrics,
HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ());
/***** Begin list *****/
HTM_UL_Begin ("class=\"PRG_CLIPBOARD\"");
HTM_UL_Begin ("class=\"SRC_CLIPBOARD\"");
/***** Row with empty link *****/
Rsc_WriteRowClipboard (&EmptyLink,
@ -1149,7 +1149,7 @@ static void RubCri_ShowClipboard (struct Rub_Rubrics *Rubrics,
RubCri_PutParsOneCriterion (Rubrics);
/***** Begin list *****/
HTM_UL_Begin ("class=\"PRG_CLIPBOARD\"");
HTM_UL_Begin ("class=\"SRC_CLIPBOARD\"");
/***** Current link (empty or not) *****/
Rsc_WriteRowClipboard (&Criterion->Link,

View File

@ -27,6 +27,7 @@
#include "swad_action_list.h"
#include "swad_alert.h"
#include "swad_box.h"
#include "swad_error.h"
#include "swad_form.h"
#include "swad_parameter_code.h"
@ -35,6 +36,14 @@
#include "swad_rubric_database.h"
#include "swad_rubric_resource.h"
/*****************************************************************************/
/***************************** Private prototypes ****************************/
/*****************************************************************************/
static void RubRsc_ShowClipboard (void);
static void RubRsc_PutIconsClipboard (__attribute__((unused)) void *Args);
/*****************************************************************************/
/**************************** Get link to rubric *****************************/
/*****************************************************************************/
@ -128,3 +137,60 @@ void RubRsc_GetTitleFromRubCod (long RubCod,char *Title,size_t TitleSize)
/***** Generic title for all rubrics *****/
Str_Copy (Title,Txt_Rubrics,TitleSize);
}
/*****************************************************************************/
/******************** Show clipboard on top of rubrics ***********************/
/*****************************************************************************/
void RubRsc_ViewResourceClipboard (void)
{
/***** View resource clipboard *****/
RubRsc_ShowClipboard ();
/***** Show all rubrics *****/
Rub_SeeAllRubrics ();
}
/*****************************************************************************/
/************************* Show resources clipboard **************************/
/*****************************************************************************/
static void RubRsc_ShowClipboard (void)
{
extern const char *Hlp_ASSESSMENT_Rubrics;
extern const char *Txt_Resource_clipboard;
Box_BoxBegin (NULL,Txt_Resource_clipboard,
RubRsc_PutIconsClipboard,NULL,
Hlp_ASSESSMENT_Rubrics,Box_CLOSABLE);
Rsc_ShowClipboard ();
Box_BoxEnd ();
}
/*****************************************************************************/
/****** Put contextual icons when showing resource clipboard in rubrics ******/
/*****************************************************************************/
static void RubRsc_PutIconsClipboard (__attribute__((unused)) void *Args)
{
/***** Put icon to remove resource clipboard in rubrics *****/
if (Rub_CheckIfICanEditRubrics ())
Ico_PutContextualIconToRemove (ActRemRscCli_InRub,NULL,
NULL,NULL);
}
/*****************************************************************************/
/******************* Remove clipboard and show program ***********************/
/*****************************************************************************/
void RubRsc_RemoveResourceClipboard (void)
{
extern const char *Txt_Resource_clipboard_removed;
/***** Remove resource clipboard *****/
Rsc_DB_RemoveClipboard ();
Ale_ShowAlert (Ale_SUCCESS,Txt_Resource_clipboard_removed);
/***** View resource clipboard again *****/
RubRsc_ViewResourceClipboard ();
}

View File

@ -38,4 +38,7 @@ void RubRsc_WriteResourceRubric (long RubCod,bool PutFormToGo,
const char *Icon,const char *IconTitle);
void RubRsc_GetTitleFromRubCod (long RubCod,char *Title,size_t TitleSize);
void RubRsc_ViewResourceClipboard (void);
void RubRsc_RemoveResourceClipboard (void);
#endif

View File

@ -14113,6 +14113,52 @@ const char *Txt_Actions[ActLst_NUM_ACTIONS] =
"Copiar link para rubrica"
#elif L==10 // tr
"Ba&gbreve;lant&inodot;y&inodot; puan anahtar&inodot;na kopyala"
#endif
,
[ActSeeRscCli_InRub] =
#if L==1 // ca
"Veure portapapers de recursos en r&uacute;briques"
#elif L==2 // de
"Siehe Ressourcen-Zwischenablage im Rubriken"
#elif L==3 // en
"See resource clipboard in rubrics"
#elif L==4 // es
"Ver portapapeles de recursos en r&uacute;bricas"
#elif L==5 // fr
"Voir le presse-papiers des ressources dans les rubriques"
#elif L==6 // gn
"Ehecha recurso portapapeles umi rubrica-pe"
#elif L==7 // it
"Visualizza gli appunti delle risorse nelle rubriche"
#elif L==8 // pl
"Zobacz schowek zasob&oacute;w w rubrykach"
#elif L==9 // pt
"Ver &aacute;rea de transfer&ecirc;ncia de recursos nas rubricas"
#elif L==10 // tr
"De&gbreve;erlendirme listelerinde kaynak panosuna bak&inodot;n"
#endif
,
[ActRemRscCli_InRub] =
#if L==1 // ca
"Eliminar portapapers de recursos en r&uacute;briques"
#elif L==2 // de
"Entfernen Sie die Ressourcen-Zwischenablage im Rubriken"
#elif L==3 // en
"Remove resource clipboard in rubrics"
#elif L==4 // es
"Eliminar portapapeles de recursos en r&uacute;bricas"
#elif L==5 // fr
"Supprimer le presse-papiers des ressources dans les rubriques"
#elif L==6 // gn
"Embogue recurso portapapeles umi rubrica-pe"
#elif L==7 // it
"Elimina gli appunti delle risorse nelle rubriche"
#elif L==8 // pl
"Usu&nacute; schowek zasob&oacute;w w rubrykach"
#elif L==9 // pt
"Remover &aacute;rea de transfer&ecirc;ncia de recursos nas rubricas"
#elif L==10 // tr
"De&gbreve;erlendirme listelerinde kaynak panosunu kald&inodot;r"
#endif
,
[ActNewRubCri] =