Skip to content

Commit

Permalink
changed: group edit now has tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Oct 17, 2011
1 parent 1cf8e20 commit ab28e23
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
4 changes: 4 additions & 0 deletions languages/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@
To visit the group please click on the following link:
%s",

// group edit tabbed
'group_tools:group:edit:profile' => "Group profile / tools",
'group_tools:group:edit:other' => "Other options",

// admin transfer - form
'group_tools:admin_transfer:transfer' => "Transfer group ownership to",
'group_tools:admin_transfer:myself' => "Myself",
Expand Down
2 changes: 2 additions & 0 deletions languages/nl.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php
$language = array (
'group_tools:group:edit:profile' => 'Groep profiel / tools',
'group_tools:group:edit:other' => 'Andere opties',
'widgets:group_river_widget:edit:no_groups' => 'Je moet van minstens ��n groep lid zijn om gebruik te kunnen maken van deze widget',
'group_tools:auto_join:fix' => 'Om alle leden van de site lid te maken van deze groep, %sklik hier%s.',
'group_tools:mail:form:js:members' => 'Selecteer minstens ��n lid om het bericht aan te versturen',
Expand Down
1 change: 1 addition & 0 deletions manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ x.x:
- added: option to make all site users a member of an auto join group
- changed: moved some functions
- changed: transfer group ownership now show members alphabeticly
- changed: group edit now has tabs
1.6 (2011-10-05):
- added: option to resend invites to already invited users
Expand Down
3 changes: 3 additions & 0 deletions start.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ function group_tools_init(){
// manage auto join for groups
elgg_extend_view("forms/groups/edit", "group_tools/forms/auto_join", 400);
register_elgg_event_handler("create", "member_of_site", "group_tools_join_site_handler");

// show group edit as tabbed
elgg_extend_view("forms/groups/edit", "group_tools/group_edit_tabbed", 1);
}

if(isadminloggedin()){
Expand Down
35 changes: 35 additions & 0 deletions views/default/group_tools/group_edit_tabbed.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

if(!empty($vars["entity"])){
?>
<div class="contentWrapper" id="group_tools_group_edit_tab">
<div id="elgg_horizontal_tabbed_nav">
<ul>
<li class="selected"><a href="#" onclick="group_tools_edit_group('profile', this);"><?php echo elgg_echo("group_tools:group:edit:profile"); ?></a></li>
<li><a href="#" onclick="group_tools_edit_group('other', this);"><?php echo elgg_echo("group_tools:group:edit:other"); ?></a></li>
</ul>
</div>
</div>

<script type="text/javascript">
$(document).ready(function(){
group_tools_edit_group('profile', $('#group_tools_group_edit_tab li.selected a'));
});

function group_tools_edit_group(section, elem){

$('#group_tools_group_edit_tab li').removeClass("selected");
$(elem).parent("li").addClass("selected");

$('#two_column_left_sidebar_maincontent div.contentWrapper').hide();
$('#group_tools_group_edit_tab').show();

if(section == "other"){
$('#two_column_left_sidebar_maincontent div.contentWrapper').show();
$('#two_column_left_sidebar_maincontent form[action="<?php echo $vars["url"]; ?>action/groups/edit"]').parent('div.contentWrapper').hide();
} else {
$('#two_column_left_sidebar_maincontent form[action="<?php echo $vars["url"]; ?>action/groups/edit"]').parent('div.contentWrapper').show();
}
}
</script>
<?php } ?>

0 comments on commit ab28e23

Please sign in to comment.