Commits

Anonymous committed a44adf3

Bug fixed: now users that are in a group, not only the admins, can see the button create in the modules of the groups view.

  • Participants
  • Parent commits c52904a

Comments (0)

Files changed (6)

File elgg/mod/blog/views/default/blog/groupprofile_blog.php

 <div class="group_widget">
 <h2><a href="<?php echo $vars['url']; ?>pg/blog/group:<?php echo $vars['entity']->guid ?>"><?php echo elgg_echo("blog:group"); ?></a></h2>
 <?php 
-	if($vars['entity']->canEdit()){
+	if($vars['entity']->isMember()){
 		$add_link = $vars['url']."pg/blog/group:".$vars['entity']->guid."/new/";
 		$link_text = elgg_echo("blog:newpost");
 		echo "<a class=\"add_topic_button\" style=\"float:right;margin-top:-30px;margin-right:10px\" href=\"$add_link\">$link_text</a>";

File elgg/mod/bookmarks/views/default/bookmarks/groupprofile_bookmarks.php

 <h2><a href="<?php echo $vars['url']; ?>pg/bookmarks/group:<?php echo $vars['entity']->guid ?>/items"><?php echo elgg_echo("bookmarks:group"); ?></a></h2>
 
 <?php 
-	if($vars['entity']->canEdit()){
+	if($vars['entity']->isMember()){
 		$add_link = $vars['url']."pg/bookmarks/group:".$vars['entity']->guid."/add";
 		$link_text = elgg_echo("bookmarks:add");
 		echo "<a class=\"add_topic_button\" style=\"float:right;margin-top:-30px;margin-right:10px\" href=\"$add_link\">$link_text</a>";

File elgg/mod/file/views/default/file/groupprofile_files.php

 <div class="group_widget">
 <h2><a href="<?php echo $vars['url']; ?>pg/file/group:<?php echo $vars['entity']->guid ?>"><?php echo elgg_echo("file:group"); ?></a></h2>
 <?php 
-	if($vars['entity']->canEdit()){
+	if($vars['entity']->isMember()){
 		$add_link = $vars['url']."pg/file/group:".$vars['entity']->guid."/new/";
 		$link_text = elgg_echo("file:upload");
 		echo "<a class=\"add_topic_button\" style=\"float:right;margin-top:-30px;margin-right:10px\" href=\"$add_link\">$link_text</a>";

File elgg/mod/pages/views/default/pages/groupprofile_pages.php

 <div class="group_widget">
 <h2><a href="<?php echo $vars['url']; ?>pg/pages/owned/<?php echo page_owner_entity()->username; ?>"><?php echo elgg_echo("pages:group"); ?></a></h2>
 <?php 
-	if($vars['entity']->canEdit()){
+	if($vars['entity']->isMember()){
 		$add_link = $vars['url']."pg/pages/new/?container_guid=".$vars['entity']->guid;
 		$link_text = elgg_echo("pages:new");
 		echo "<a class=\"add_topic_button\" style=\"float:right;margin-top:-30px;margin-right:10px\" href=\"$add_link\">$link_text</a>";

File elgg/mod/tasks/views/default/tasks/groupprofile_tasks.php

 <div id="filerepo_widget_layout"> 
 <h2><a href="<?php echo $CONFIG->wwwroot."pg/tasks/".$username."/viewtasks/"?>"><?php echo elgg_echo("tasks:group:active") ?></a></h2>
 <?php 
-	if($vars['entity']->canEdit()){
+	if($vars['entity']->isMember()){
 		$add_link = $vars['url']."pg/tasks/group:".$vars['entity']->guid."/createtask/";
 		$link_text = elgg_echo("tasks:create");
 		echo "<a class=\"add_topic_button\" style=\"float:right;margin-top:-30px;margin-right:10px\" href=\"$add_link\">$link_text</a>";

File elgg/mod/threaded_forums/views/default/groups/forum_latest.php

 <h2><a href="<?php echo $vars['url']; ?>pg/threaded_forums/<?php echo $vars['entity']->guid ?>/"><?php echo elgg_echo('groups:latestdiscussion'); ?></a></h2>
 
 <?php 
-	if($vars['entity']->canEdit()){
+	if($vars['entity']->isMember()){
 		$add_link = $vars['url']."mod/threaded_forums/addtopic.php?group_guid=".$vars['entity']->guid;
 		$link_text = elgg_echo('groups:addtopic');
 		echo "<a class=\"add_topic_button\" style=\"float:right;margin-top:-30px;margin-right:10px\" href=\"$add_link\">$link_text</a>";