Version 16.174.1

This commit is contained in:
Antonio Cañas Vargas 2017-04-10 12:41:26 +02:00
parent 51660f18a2
commit f54bbbac2d
2 changed files with 23 additions and 4 deletions

View File

@ -192,8 +192,6 @@
// TODO: System admin should view link "Visits to course"
// TODO: Un administrador de institución, ¿debería poder cambiar la contraseña de un usuario de esa institución? No lo tengo claro.
// TODO: Add a '+' icon in list of forum thread to add a new thread.
// TODO: Subject in forum_post should be VARCHAR(255) in order to be copied directly to SummaryStr
// TODO: Add a Subject (VARCHAR(255)) to notices to be used as SummaryStr
// TODO: Subject in msg_content and msg_content_deleted should be VARCHAR(255) in order to be copied directly to SummaryStr
@ -221,7 +219,8 @@
// 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.174.1: Apr 10, 2017 Change in layout of frames (white boxes). (? lines)
Version 16.174.1: Apr 10, 2017 Change in layout of frames (white boxes).
New '+' icon in list of forum threads to add a new thread. (217591 lines)
Version 16.174: Apr 07, 2017 Suffix .en added to help URLs in English. (217568 lines)
Version 16.173.5: Apr 07, 2017 Help URLs in Spanish for users with languages ca and gn. (217567 lines)
Version 16.173.4: Apr 07, 2017 Some help URLs translated to spanish. (217566 lines)

View File

@ -238,6 +238,8 @@ const Act_Action_t For_ActionsDisPstFor[For_NUM_TYPES_FORUM] =
ActDisPstForSWATch,
};
#define For_ID_NEW_THREAD_SECTION "new_thread" // Link to go to <section>
// Forum images will be saved with:
// - maximum width of For_IMAGE_SAVED_MAX_HEIGHT
// - maximum height of For_IMAGE_SAVED_MAX_HEIGHT
@ -279,6 +281,7 @@ static time_t For_GetThrReadTime (long ThrCod);
static void For_ShowThreadPosts (long ThrCod,char LastSubject[Cns_MAX_BYTES_SUBJECT + 1]);
static void For_PutIconsForums (void);
static void For_PutIconNewThread (void);
static void For_WriteNumPsts (unsigned NumPsts);
static void For_ShowAForumPost (struct ForumThread *Thr,unsigned PstNum,long PstCod,
@ -1146,6 +1149,20 @@ static void For_PutIconsForums (void)
Sta_PutIconToShowFigure ();
}
/*****************************************************************************/
/********************** Put icon to write a new thread ***********************/
/*****************************************************************************/
static void For_PutIconNewThread (void)
{
extern const char *Txt_New_thread;
fprintf (Gbl.F.Out,"<a href=\"#%s\" title=\"%s\">",
For_ID_NEW_THREAD_SECTION,Txt_New_thread);
Lay_PutIconWithText ("plus64x64.png",Txt_New_thread,NULL);
fprintf (Gbl.F.Out,"</a>");
}
/*****************************************************************************/
/*************************** Write number of posts ***************************/
/*****************************************************************************/
@ -2671,7 +2688,8 @@ void For_ShowForumThrs (void)
Pag_WriteLinksToPagesCentered (Pag_THREADS_FORUM,0,&PaginationThrs);
/***** Start table *****/
Lay_StartRoundFrameTable (NULL,Txt_Threads,NULL,Hlp_SOCIAL_Forums,2);
Lay_StartRoundFrameTable (NULL,Txt_Threads,For_PutIconNewThread,
Hlp_SOCIAL_Forums,2);
/***** Heading row *****/
fprintf (Gbl.F.Out,"<tr>"
@ -2735,7 +2753,9 @@ void For_ShowForumThrs (void)
}
/***** Put a form to write the first message of a new thread *****/
fprintf (Gbl.F.Out,"<section id=\"%s\">",For_ID_NEW_THREAD_SECTION);
For_WriteFormForumPst (false,-1,NULL);
fprintf (Gbl.F.Out,"</section>");
}
/*****************************************************************************/