diff --git a/swad_QR.c b/swad_QR.c
index 4fe1aaa08..3cd5e93da 100644
--- a/swad_QR.c
+++ b/swad_QR.c
@@ -138,87 +138,20 @@ static void QR_ImageQRCode (const char *QRString)
}
/*****************************************************************************/
-/*********** Show QR code with direct link to the current country ************/
+/*************** Show QR code with direct link (shortcut URL) ****************/
/*****************************************************************************/
-void QR_LinkToCountry (unsigned Size)
+void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod)
{
- extern const char *Txt_Shortcut_to_this_country;
+ extern const char *Txt_Shortcut;
+ extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
/***** Show QR code with direct link to the current centre *****/
- fprintf (Gbl.F.Out," ",
Size,Size,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCty.Cty.CtyCod,
- Txt_Shortcut_to_this_country,
- Size,Size);
- }
-
-/*****************************************************************************/
-/********* Show QR code with direct link to the current institution **********/
-/*****************************************************************************/
-
-void QR_LinkToInstitution (unsigned Size)
- {
- extern const char *Txt_Shortcut_to_this_institution;
-
- /***** Show QR code with direct link to the current institution *****/
- fprintf (Gbl.F.Out," ",
- Size,Size,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentIns.Ins.InsCod,
- Txt_Shortcut_to_this_institution,
- Size,Size);
- }
-
-/*****************************************************************************/
-/************ Show QR code with direct link to the current centre ************/
-/*****************************************************************************/
-
-void QR_LinkToCentre (unsigned Size)
- {
- extern const char *Txt_Shortcut_to_this_centre;
-
- /***** Show QR code with direct link to the current centre *****/
- fprintf (Gbl.F.Out," ",
- Size,Size,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCtr.Ctr.CtrCod,
- Txt_Shortcut_to_this_centre,
- Size,Size);
- }
-
-/*****************************************************************************/
-/************ Show QR code with direct link to the current degree ************/
-/*****************************************************************************/
-
-void QR_LinkToDegree (unsigned Size)
- {
- extern const char *Txt_Shortcut_to_this_degree;
-
- /***** Show QR code with direct link to the current degree *****/
- fprintf (Gbl.F.Out," ",
- Size,Size,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentDeg.Deg.DegCod,
- Txt_Shortcut_to_this_degree,
- Size,Size);
- }
-
-/*****************************************************************************/
-/************ Show QR code with direct link to the current course ************/
-/*****************************************************************************/
-
-void QR_LinkToCourse (unsigned Size)
- {
- extern const char *Txt_Shortcut_to_this_course;
-
- /***** Show QR code with direct link to the current course *****/
- fprintf (Gbl.F.Out," ",
- Size,Size,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCrs.Crs.CrsCod,
- Txt_Shortcut_to_this_course,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],ParamStr,Cod,
+ Txt_Shortcut,
Size,Size);
}
diff --git a/swad_QR.h b/swad_QR.h
index 5eb81c11e..dc92e8d8a 100644
--- a/swad_QR.h
+++ b/swad_QR.h
@@ -51,11 +51,7 @@ typedef enum
void QR_PutLinkToPrintQRCode (QR_QRType_t QRType,struct UsrData *UsrDat,bool PrintText);
void QR_PrintQRCode (void);
-void QR_LinkToCountry (unsigned Size);
-void QR_LinkToInstitution (unsigned Size);
-void QR_LinkToCentre (unsigned Size);
-void QR_LinkToDegree (unsigned Size);
-void QR_LinkToCourse (unsigned Size);
+void QR_LinkTo (unsigned Size,const char *ParamStr,long Cod);
void QR_ExamAnnnouncement (void);
#endif
diff --git a/swad_centre.c b/swad_centre.c
index 086269ef1..eab0f6b9a 100644
--- a/swad_centre.c
+++ b/swad_centre.c
@@ -241,7 +241,8 @@ static void Ctr_Configuration (bool PrintView)
extern const char *Txt_Centre;
extern const char *Txt_Short_name;
extern const char *Txt_Web;
- extern const char *Txt_Shortcut_to_this_centre;
+ extern const char *Txt_Shortcut;
+ extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
extern const char *Txt_QR_code;
extern const char *Txt_Courses;
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
@@ -426,15 +427,15 @@ static void Ctr_Configuration (bool PrintView)
""
"
"
- ""
- "%s/?CtrCod=%ld"
+ " "
+ "%s/%s?CtrCod=%ld"
" "
" "
"",
The_ClassFormul[Gbl.Prefs.Theme],
- Txt_Shortcut_to_this_centre,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCtr.Ctr.CtrCod,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCtr.Ctr.CtrCod);
+ Txt_Shortcut,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentCtr.Ctr.CtrCod,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentCtr.Ctr.CtrCod);
if (PrintView)
{
@@ -448,7 +449,7 @@ static void Ctr_Configuration (bool PrintView)
" vertical-align:middle;\">",
The_ClassFormul[Gbl.Prefs.Theme],
Txt_QR_code);
- QR_LinkToCentre (200);
+ QR_LinkTo (200,"CtrCod",Gbl.CurrentCtr.Ctr.CtrCod);
fprintf (Gbl.F.Out,""
"");
}
diff --git a/swad_changelog.h b/swad_changelog.h
index 5c91a8d91..a6324ee4f 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -103,11 +103,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
-#define Log_PLATFORM_VERSION "SWAD 14.79.2 (2015/03/06)"
+#define Log_PLATFORM_VERSION "SWAD 14.79.3 (2015/03/07)"
// 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 | tail -1
/*
+ Version 14.79.3: Mar 07, 2015 Parameter "UsrNick" is renamed to "Usr".
+ URL is shown in public profile.
+ Language in direct URLs. (178677 lines)
Version 14.79.2: Mar 06, 2015 Public profile is shown depending on visibility. (178759 lines)
Version 14.79.1: Mar 06, 2015 Add options to change visibility of public profile. (178769 lines)
3 changes necessary in database:
diff --git a/swad_country.c b/swad_country.c
index 500a3c737..ecd77f847 100644
--- a/swad_country.c
+++ b/swad_country.c
@@ -219,7 +219,8 @@ static void Cty_Configuration (bool PrintView)
extern const char *The_ClassFormul[The_NUM_THEMES];
extern const char *Txt_Institutions;
extern const char *Txt_Country;
- extern const char *Txt_Shortcut_to_this_country;
+ extern const char *Txt_Shortcut;
+ extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
extern const char *Txt_QR_code;
extern const char *Txt_Centres;
extern const char *Txt_Degrees;
@@ -343,13 +344,14 @@ static void Cty_Configuration (bool PrintView)
""
""
- "%s/?CtyCod=%ld "
+ ""
+ "%s/%s?CtyCod=%ld "
" "
"",
The_ClassFormul[Gbl.Prefs.Theme],
- Txt_Shortcut_to_this_country,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCty.Cty.CtyCod,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCty.Cty.CtyCod);
+ Txt_Shortcut,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentCty.Cty.CtyCod,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentCty.Cty.CtyCod);
if (PrintView)
{
@@ -363,7 +365,7 @@ static void Cty_Configuration (bool PrintView)
" vertical-align:middle;\">",
The_ClassFormul[Gbl.Prefs.Theme],
Txt_QR_code);
- QR_LinkToCountry (200);
+ QR_LinkTo (200,"CtyCod",Gbl.CurrentCty.Cty.CtyCod);
fprintf (Gbl.F.Out,""
"");
}
diff --git a/swad_course.c b/swad_course.c
index bfb0726ad..05be39a99 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -147,7 +147,8 @@ static void Crs_Configuration (bool PrintView)
extern const char *Txt_SEMESTER_OF_YEAR[1+2];
extern const char *Txt_Institutional_code;
extern const char *Txt_Internal_code;
- extern const char *Txt_Shortcut_to_this_course;
+ extern const char *Txt_Shortcut;
+ extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
extern const char *Txt_QR_code;
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
extern const char *Txt_Indicators;
@@ -352,13 +353,14 @@ static void Crs_Configuration (bool PrintView)
""
""
- "%s/?CrsCod=%ld "
+ ""
+ "%s/%s?CrsCod=%ld "
" "
"",
The_ClassFormul[Gbl.Prefs.Theme],
- Txt_Shortcut_to_this_course,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCrs.Crs.CrsCod,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentCrs.Crs.CrsCod);
+ Txt_Shortcut,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentCrs.Crs.CrsCod,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentCrs.Crs.CrsCod);
if (PrintView)
{
@@ -372,7 +374,7 @@ static void Crs_Configuration (bool PrintView)
" style=\"text-align:left; vertical-align:middle;\">",
The_ClassFormul[Gbl.Prefs.Theme],
Txt_QR_code);
- QR_LinkToCourse (200);
+ QR_LinkTo (200,"CrsCod",Gbl.CurrentCrs.Crs.CrsCod);
fprintf (Gbl.F.Out,""
"");
}
diff --git a/swad_degree.c b/swad_degree.c
index 6e3eb2fea..bfb014f63 100644
--- a/swad_degree.c
+++ b/swad_degree.c
@@ -292,7 +292,8 @@ static void Deg_Configuration (bool PrintView)
extern const char *Txt_Degree;
extern const char *Txt_Short_name;
extern const char *Txt_Web;
- extern const char *Txt_Shortcut_to_this_degree;
+ extern const char *Txt_Shortcut;
+ extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
extern const char *Txt_QR_code;
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
bool PutLink = !PrintView && Gbl.CurrentDeg.Deg.WWW[0];
@@ -410,15 +411,15 @@ static void Deg_Configuration (bool PrintView)
""
""
- ""
- "%s/?DegCod=%ld"
+ " "
+ "%s/%s?DegCod=%ld"
" "
" "
"",
The_ClassFormul[Gbl.Prefs.Theme],
- Txt_Shortcut_to_this_degree,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentDeg.Deg.DegCod,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentDeg.Deg.DegCod);
+ Txt_Shortcut,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentDeg.Deg.DegCod,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentDeg.Deg.DegCod);
if (PrintView)
{
@@ -432,7 +433,7 @@ static void Deg_Configuration (bool PrintView)
" vertical-align:middle;\">",
The_ClassFormul[Gbl.Prefs.Theme],
Txt_QR_code);
- QR_LinkToDegree (200);
+ QR_LinkTo (200,"DegCod",Gbl.CurrentDeg.Deg.DegCod);
fprintf (Gbl.F.Out,""
"");
}
diff --git a/swad_institution.c b/swad_institution.c
index 2b5e5976c..d6b6b7775 100644
--- a/swad_institution.c
+++ b/swad_institution.c
@@ -230,7 +230,8 @@ static void Ins_Configuration (bool PrintView)
extern const char *Txt_Institution;
extern const char *Txt_Short_name;
extern const char *Txt_Web;
- extern const char *Txt_Shortcut_to_this_institution;
+ extern const char *Txt_Shortcut;
+ extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
extern const char *Txt_QR_code;
extern const char *Txt_Degrees;
extern const char *Txt_Courses;
@@ -349,15 +350,15 @@ static void Ins_Configuration (bool PrintView)
""
""
- ""
- "%s/?InsCod=%ld"
+ " "
+ "%s/%s?InsCod=%ld"
" "
" "
"",
The_ClassFormul[Gbl.Prefs.Theme],
- Txt_Shortcut_to_this_institution,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentIns.Ins.InsCod,
- Cfg_HTTPS_URL_SWAD_CGI,Gbl.CurrentIns.Ins.InsCod);
+ Txt_Shortcut,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentIns.Ins.InsCod,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],Gbl.CurrentIns.Ins.InsCod);
if (PrintView)
{
@@ -371,7 +372,7 @@ static void Ins_Configuration (bool PrintView)
" vertical-align:middle;\">",
The_ClassFormul[Gbl.Prefs.Theme],
Txt_QR_code);
- QR_LinkToInstitution (200);
+ QR_LinkTo (200,"InsCod",Gbl.CurrentIns.Ins.InsCod);
fprintf (Gbl.F.Out,""
"");
}
diff --git a/swad_parameter.c b/swad_parameter.c
index 8cc39693f..4dde2cc69 100644
--- a/swad_parameter.c
+++ b/swad_parameter.c
@@ -299,18 +299,11 @@ void Par_GetMainParameters (void)
/***** Get user's nickname, if exists
(this nickname is used to go to a user's profile, not to get the logged user) *****/
- Par_GetParToText ("UsrNick",Nickname,Nck_MAX_BYTES_NICKNAME_WITH_ARROBA);
+ Par_GetParToText ("Usr",Nickname,Nck_MAX_BYTES_NICKNAME_WITH_ARROBA);
if ((OtherUsrCod = Nck_GetUsrCodFromNickname (Nickname)) > 0)
{
Gbl.Usrs.Other.UsrDat.UsrCod = OtherUsrCod;
Gbl.CurrentAct = ActSeePubPrf;
- /*
- Gbl.CurrentCty.Cty.CtyCod =
- Gbl.CurrentIns.Ins.InsCod =
- Gbl.CurrentCtr.Ctr.CtrCod =
- Gbl.CurrentDeg.Deg.DegCod =
- Gbl.CurrentCrs.Crs.CrsCod = -1L;
- */
}
/***** Get tab to activate *****/
@@ -419,7 +412,7 @@ static unsigned Par_GetParameter (tParamType ParamType,const char *ParamName,
strcmp (ParamName,"CtrCod" ) && // To enter directly to a centre
strcmp (ParamName,"DegCod" ) && // To enter directly to a degree
strcmp (ParamName,"CrsCod" ) && // To enter directly to a course
- strcmp (ParamName,"UsrNick") && // To enter directly to a user
+ strcmp (ParamName,"Usr" ) && // To enter directly to a user
strcmp (ParamName,"ActCod" ) && // To execute directly an action (allowed only for fully public actions)
strcmp (ParamName,"Layout" ) && // To change the layout of the page (wide or narrow)
strcmp (ParamName,"IdSes" ) && // To use an open session when redirecting from one language to another
diff --git a/swad_record.c b/swad_record.c
index e527a6416..46b295d3d 100644
--- a/swad_record.c
+++ b/swad_record.c
@@ -2027,6 +2027,8 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
extern const char *Txt_First_name;
extern const char *Txt_Country;
extern const char *Txt_Another_country;
+ extern const char *Txt_Shortcut;
+ extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
extern const char *Txt_Place_of_origin;
extern const char *Txt_Date_of_birth;
extern const char *Txt_Institution;
@@ -2063,6 +2065,7 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
(TypeOfView == Rec_FORM_MODIFY_RECORD_OTHER_EXISTING_USR &&
!(IAmTeacher && HeIsTeacher))); // A teacher can not modify another teacher's data
bool GoToPublicProfileForm = (TypeOfView == Rec_RECORD_LIST ||
+ TypeOfView == Rec_RECORD_PUBLIC ||
TypeOfView == Rec_OTHER_USR_COMMON_RECORD_CHECK);
bool CommandForms = GoToPublicProfileForm && Gbl.Usrs.Me.Logged;
bool ShowEmail = (IAmDegAdmin || IAmSuperuser || DataForm ||
@@ -2681,6 +2684,25 @@ void Rec_ShowSharedUsrRecord (Rec_RecordViewType_t TypeOfView,
fprintf (Gbl.F.Out,""
"");
+ /***** Shortcut to the user's profile *****/
+ if (TypeOfView == Rec_RECORD_PUBLIC)
+ fprintf (Gbl.F.Out,""
+ ""
+ "%s:"
+ " "
+ ""
+ ""
+ "%s/%s?Usr=@%s"
+ " "
+ " "
+ " ",
+ ClassForm,Col1Width,Txt_Shortcut,
+ ClassData,Cols2and3Width,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],UsrDat->Nickname,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],UsrDat->Nickname);
+
if (ShowAddressRows)
{
/* Origin place */
diff --git a/swad_text.c b/swad_text.c
index 9884e025e..897f98c25 100644
--- a/swad_text.c
+++ b/swad_text.c
@@ -34049,109 +34049,25 @@ const char *Txt_Short_BR_Name =
"Nome abreviado";
#endif
-const char *Txt_Shortcut_to_this_course =
+const char *Txt_Shortcut =
#if L==0
- "Acceso directo a la asignatura"; // Necessita traduccio
+ "Accés directe";
#elif L==1
- "Shortcut to this course"; // Need Übersetzung
+ "Direktzugriff";
#elif L==2
- "Shortcut to this course";
+ "Shortcut";
#elif L==3
- "Acceso directo a la asignatura";
+ "Acceso directo";
#elif L==4
- "Shortcut to this course"; // Besoin de traduction
+ "Accès direct";
#elif L==5
- "Acceso directo a la asignatura"; // Okoteve traducción
+ "Acceso directo"; // Okoteve traducción
#elif L==6
- "Accesso diretto al corso";
+ "Accesso diretto";
#elif L==7
- "Shortcut to this course"; // Potrzebujesz tlumaczenie
+ "Bezpośredni dostęp";
#elif L==8
- "Shortcut to this course"; // Necessita de tradução
-#endif
-
-const char *Txt_Shortcut_to_this_degree =
-#if L==0
- "Acceso directo a la titulación"; // Necessita traduccio
-#elif L==1
- "Shortcut to this degree"; // Need Übersetzung
-#elif L==2
- "Shortcut to this degree";
-#elif L==3
- "Acceso directo a la titulación";
-#elif L==4
- "Shortcut to this degree"; // Besoin de traduction
-#elif L==5
- "Acceso directo a la titulación"; // Okoteve traducción
-#elif L==6
- "Accesso diretto alla laurea";
-#elif L==7
- "Shortcut to this degree"; // Potrzebujesz tlumaczenie
-#elif L==8
- "Shortcut to this degree"; // Necessita de tradução
-#endif
-
-const char *Txt_Shortcut_to_this_centre =
-#if L==0
- "Acceso directo al centro"; // Necessita traduccio
-#elif L==1
- "Shortcut to this centre"; // Need Übersetzung
-#elif L==2
- "Shortcut to this centre";
-#elif L==3
- "Acceso directo al centro";
-#elif L==4
- "Shortcut to this centre"; // Besoin de traduction
-#elif L==5
- "Acceso directo al centro"; // Okoteve traducción
-#elif L==6
- "Accesso diretto al centro";
-#elif L==7
- "Shortcut to this centre"; // Potrzebujesz tlumaczenie
-#elif L==8
- "Shortcut to this centre"; // Necessita de tradução
-#endif
-
-const char *Txt_Shortcut_to_this_country =
-#if L==0
- "Acceso directo al país"; // Necessita traduccio
-#elif L==1
- "Shortcut to this country"; // Need Übersetzung
-#elif L==2
- "Shortcut to this country";
-#elif L==3
- "Acceso directo al país";
-#elif L==4
- "Shortcut to this country"; // Besoin de traduction
-#elif L==5
- "Acceso directo al país"; // Okoteve traducción
-#elif L==6
- "Accesso diretto al paese";
-#elif L==7
- "Shortcut to this country"; // Potrzebujesz tlumaczenie
-#elif L==8
- "Shortcut to this country"; // Necessita de tradução
-#endif
-
-const char *Txt_Shortcut_to_this_institution =
-#if L==0
- "Acceso directo a la institución"; // Necessita traduccio
-#elif L==1
- "Shortcut to this institution"; // Need Übersetzung
-#elif L==2
- "Shortcut to this institution";
-#elif L==3
- "Acceso directo a la institución";
-#elif L==4
- "Shortcut to this institution"; // Besoin de traduction
-#elif L==5
- "Acceso directo a la institución"; // Okoteve traducción
-#elif L==6
- "Accesso diretto a l'istituzione";
-#elif L==7
- "Shortcut to this institution"; // Potrzebujesz tlumaczenie
-#elif L==8
- "Shortcut to this institution"; // Necessita de tradução
+ "Acesso directo";
#endif
const char *Txt_Show =
diff --git a/swad_user.c b/swad_user.c
index 9a7a3172f..f89088335 100644
--- a/swad_user.c
+++ b/swad_user.c
@@ -7362,7 +7362,7 @@ void Usr_RequestUserProfile (void)
Act_FormStart (ActSeePubPrf);
fprintf (Gbl.F.Out,""
"%s: "
- " "
"
",
The_ClassFormul[Gbl.Prefs.Theme],
@@ -7393,7 +7393,7 @@ void Usr_ShowUserProfile (void)
/***** Get user *****/
if (Gbl.Usrs.Other.UsrDat.UsrCod < 0)
{
- Par_GetParToText ("UsrNick",Nickname,Nck_MAX_BYTES_NICKNAME_WITH_ARROBA);
+ Par_GetParToText ("Usr",Nickname,Nck_MAX_BYTES_NICKNAME_WITH_ARROBA);
if ((OtherUsrCod = Nck_GetUsrCodFromNickname (Nickname)) > 0)
{
Gbl.Usrs.Other.UsrDat.UsrCod = OtherUsrCod;
@@ -7423,6 +7423,9 @@ void Usr_ShowUserProfile (void)
/***** Common record *****/
Rec_ShowSharedUsrRecord (Rec_RECORD_PUBLIC,&Gbl.Usrs.Other.UsrDat);
+ /***** Show details of user's profile *****/
+ // Usr_ShowDetailsUserProfile (&Gbl.Usrs.Other.UsrDat);
+
fprintf (Gbl.F.Out,"");
}
else
@@ -7467,3 +7470,38 @@ void Usr_ChangeProfileVisibility (void)
/***** Show form again *****/
Pri_EditMyPrivacy ();
}
+
+/*****************************************************************************/
+/********************** Show details of user's profile ***********************/
+/*****************************************************************************/
+
+void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat)
+ {
+ extern const char *The_ClassFormul[The_NUM_THEMES];
+ extern const char *Txt_Shortcut;
+ extern const char *Txt_STR_LANG_ID[Txt_NUM_LANGUAGES];
+
+ /***** Start table *****/
+ Lay_StartRoundFrameTable10 (NULL,2,NULL);
+
+ /***** Shortcut to the user's profile *****/
+ fprintf (Gbl.F.Out,""
+ ""
+ "%s:"
+ " "
+ ""
+ ""
+ "%s/%s?Usr=@%s"
+ " "
+ " "
+ " ",
+ The_ClassFormul[Gbl.Prefs.Theme],
+ Txt_Shortcut,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],UsrDat->Nickname,
+ Cfg_HTTPS_URL_SWAD_CGI,Txt_STR_LANG_ID[Gbl.Prefs.Language],UsrDat->Nickname);
+
+ /***** End of table *****/
+ Lay_EndRoundFrameTable10 ();
+ }
diff --git a/swad_user.h b/swad_user.h
index c1fc3668d..6e6bad74c 100644
--- a/swad_user.h
+++ b/swad_user.h
@@ -327,5 +327,6 @@ void Usr_GetAndShowNumUsrsInPlatform (Rol_Role_t Role);
void Usr_RequestUserProfile (void);
void Usr_ShowUserProfile (void);
void Usr_ChangeProfileVisibility (void);
+void Usr_ShowDetailsUserProfile (const struct UsrData *UsrDat);
#endif