Version 14.79.3

This commit is contained in:
Antonio Cañas Vargas 2015-03-07 18:09:42 +01:00
parent b4a0867448
commit c2e8ff6567
13 changed files with 127 additions and 218 deletions

View File

@ -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,"<img src=\"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s/?CtyCod=%ld\""
fprintf (Gbl.F.Out,"<img src=\"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s/%s?%s=%ld\""
" alt=\"%s\" style=\"width:%upx; height:%upx;\" />",
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,"<img src=\"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s/?InsCod=%ld\""
" alt=\"%s\" style=\"width:%upx; height:%upx;\" />",
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,"<img src=\"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s/?CtrCod=%ld\""
" alt=\"%s\" style=\"width:%upx; height:%upx;\" />",
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,"<img src=\"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s/?DegCod=%ld\""
" alt=\"%s\" style=\"width:%upx; height:%upx;\" />",
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,"<img src=\"https://chart.googleapis.com/chart?cht=qr&amp;chs=%ux%u&amp;chl=%s/?CrsCod=%ld\""
" alt=\"%s\" style=\"width:%upx; height:%upx;\" />",
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);
}

View File

@ -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

View File

@ -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)
"</td>"
"<td class=\"DAT\""
" style=\"text-align:left; vertical-align:middle;\">"
"<a href=\"%s/?CtrCod=%ld\" class=\"DAT\" target=\"_blank\">"
"%s/?CtrCod=%ld"
"<a href=\"%s/%s?CtrCod=%ld\" class=\"DAT\" target=\"_blank\">"
"%s/%s?CtrCod=%ld"
"</a>"
"</td>"
"</tr>",
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,"</td>"
"</tr>");
}

View File

@ -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:

View File

@ -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)
"</td>"
"<td class=\"DAT\""
" style=\"text-align:left; vertical-align:middle;\">"
"<a href=\"%s/?CtyCod=%ld\" class=\"DAT\" target=\"_blank\">%s/?CtyCod=%ld</a>"
"<a href=\"%s/%s?CtyCod=%ld\" class=\"DAT\" target=\"_blank\">"
"%s/%s?CtyCod=%ld</a>"
"</td>"
"</tr>",
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,"</td>"
"</tr>");
}

View File

@ -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)
"</td>"
"<td class=\"DAT\""
" style=\"text-align:left; vertical-align:middle;\">"
"<a href=\"%s/?CrsCod=%ld\" class=\"DAT\" target=\"_blank\">%s/?CrsCod=%ld</a>"
"<a href=\"%s/%s?CrsCod=%ld\" class=\"DAT\" target=\"_blank\">"
"%s/%s?CrsCod=%ld</a>"
"</td>"
"</tr>",
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,"</td>"
"</tr>");
}

View File

@ -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)
"</td>"
"<td class=\"DAT\" style=\"text-align:left;"
" vertical-align:middle;\">"
"<a href=\"%s/?DegCod=%ld\" class=\"DAT\" target=\"_blank\">"
"%s/?DegCod=%ld"
"<a href=\"%s/%s?DegCod=%ld\" class=\"DAT\" target=\"_blank\">"
"%s/%s?DegCod=%ld"
"</a>"
"</td>"
"</tr>",
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,"</td>"
"</tr>");
}

View File

@ -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)
"</td>"
"<td class=\"DAT\" style=\"text-align:left;"
" vertical-align:middle;\">"
"<a href=\"%s/?InsCod=%ld\" class=\"DAT\" target=\"_blank\">"
"%s/?InsCod=%ld"
"<a href=\"%s/%s?InsCod=%ld\" class=\"DAT\" target=\"_blank\">"
"%s/%s?InsCod=%ld"
"</a>"
"</td>"
"</tr>",
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,"</td>"
"</tr>");
}

View File

@ -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

View File

@ -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,"</td>"
"</tr>");
/***** Shortcut to the user's profile *****/
if (TypeOfView == Rec_RECORD_PUBLIC)
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s\""
" style=\"width:%upx; text-align:left;\">"
"%s:"
"</td>"
"<td colspan=\"2\" class=\"%s\""
" style=\"width:%upx; text-align:left;\">"
"<a href=\"%s/%s?Usr=@%s\" class=\"DAT\" target=\"_blank\">"
"%s/%s?Usr=@%s"
"</a>"
"</td>"
"</tr>",
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 */

View File

@ -34049,109 +34049,25 @@ const char *Txt_Short_BR_Name =
"Nome<br />abreviado";
#endif
const char *Txt_Shortcut_to_this_course =
const char *Txt_Shortcut =
#if L==0
"Acceso directo a la asignatura"; // Necessita traduccio
"Acc&eacute;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&egrave;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&sacute;redni dost&eogon;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&oacute;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&oacute;n";
#elif L==4
"Shortcut to this degree"; // Besoin de traduction
#elif L==5
"Acceso directo a la titulaci&oacute;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&iacute;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&iacute;s";
#elif L==4
"Shortcut to this country"; // Besoin de traduction
#elif L==5
"Acceso directo al pa&iacute;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&oacute;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&oacute;n";
#elif L==4
"Shortcut to this institution"; // Besoin de traduction
#elif L==5
"Acceso directo a la instituci&oacute;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 =

View File

@ -7362,7 +7362,7 @@ void Usr_RequestUserProfile (void)
Act_FormStart (ActSeePubPrf);
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"text-align:center;\">"
"%s: "
"<input type=\"text\" name=\"UsrNick\""
"<input type=\"text\" name=\"Usr\""
" size=\"20\" maxlength=\"%u\" />"
"</div>",
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,"</div>");
}
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,"<tr>"
"<td class=\"%s\""
" style=\"text-align:right; vertical-align:middle;\">"
"%s:"
"</td>"
"<td class=\"DAT\""
" style=\"text-align:left; vertical-align:middle;\">"
"<a href=\"%s/%s?Usr=@%s\" class=\"DAT\" target=\"_blank\">"
"%s/%s?Usr=@%s"
"</a>"
"</td>"
"</tr>",
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 ();
}

View File

@ -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