Skip to content

Commit

Permalink
Merge pull request #1159 from UniversityRadioYork/rens-updates
Browse files Browse the repository at this point in the history
Readding nicknames in members and news list. After fixing search being deleted
  • Loading branch information
hitime1234 authored Aug 26, 2024
2 parents c1eb331 + 4bae430 commit d4a2ee8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Classes/MyRadio/MyRadioNews.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static function getNewsItem($newsentryid, MyRadio_User $user = null)
$db = Database::getInstance();

$news = $db->fetchOne(
'SELECT newsentryid, fname || \' \' || sname AS author, timestamp AS posted, content
'SELECT newsentryid, fname || \' \' || sname AS author, fname || \' "\' || nname || \'" \' || sname AS nickname, timestamp AS posted, content
FROM public.news_feed, public.member
WHERE newsentryid=$1
AND news_feed.memberid = member.memberid',
Expand Down
2 changes: 1 addition & 1 deletion src/Classes/ServiceAPI/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static function getMembersForYear($year)
*/

$result = self::$db->fetchAll(
'SELECT member.memberid, CONCAT(fname, \', \' ,sname) AS name, l_college.descr AS college, paid, email, eduroam
'SELECT member.memberid, CONCAT(fname, \', \' ,sname) AS name, fname || \' "\' || nname || \'" \' || sname as nickname, l_college.descr AS college, paid, email, eduroam
FROM member INNER JOIN (SELECT * FROM member_year WHERE year = $1) AS member_year
ON ( member.memberid = member_year.memberid ), l_college
WHERE member.college = l_college.collegeid
Expand Down
5 changes: 5 additions & 0 deletions src/Public/js/myradio.newslist.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ $(".twig-datatable").dataTable({
{
"sTitle": "Author"
},
//nickname
{
"sTitle": "nickname",
"sClass": "left",
},
//posted
{
"sTitle": "Time"
Expand Down
5 changes: 5 additions & 0 deletions src/Public/js/myradio.profile.list.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ $(".twig-datatable").dataTable({
"sClass": "left",
"aDataSort": [ 1, 2 ]
},
//nickname
{
"sTitle": "Nickname",
"sClass": "left",
},
//college
{
"sTitle": "College"
Expand Down
2 changes: 1 addition & 1 deletion src/Templates/MyRadio/getOnAir.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<!--Pay Membership-->
<li>
<a href="{{ config.payment_url }}" target="_blank" title="Before we can let you use our shiny and expensive studio, you'll need to pay membership. Click here to do so on the YUSU website now.">Become a Paid Member
<a href="{{ config.payment_url }}" target="_blank" title="Before we can let you use our shiny and expensive studio, you'll need to pay membership. Click here to do so on the YORKSU website now.">Become a Paid Member
{% if config.base_url not in config.payment_url %}
&nbsp;<span class="glyphicon glyphicon-new-window" aria-hidden="true"></span>
{% endif %}</a>
Expand Down

0 comments on commit d4a2ee8

Please sign in to comment.