Compare commits
	
		
			6 Commits
		
	
	
		
			11_0_0-22_
			...
			11_0_0-26_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 87d1d072c0 | |||
| d49db26f26 | |||
| c4f9d67abc | |||
| fe62bd3e39 | |||
| df6d21dbc9 | |||
| 9c9592f861 | 
| @@ -27,7 +27,14 @@ use SrvMngr::Model::Main; | ||||
|  | ||||
| use SrvMngr::Plugin::WithoutCache; | ||||
|  | ||||
| our $VERSION = '1.420'; | ||||
| #this is overwrittrn with the "release" by the spec file - release can be "99.el8.sme" | ||||
| our $VERSION = '';  | ||||
| #Extract the release value | ||||
| if ($VERSION =~ /^(\d+)/) { | ||||
|     $VERSION = $1;  # $1 contains the matched numeric digits | ||||
| } else { | ||||
|     $VERSION = '999' #No leading numeric digits found | ||||
| } | ||||
| $VERSION = eval $VERSION; | ||||
|  | ||||
| use Exporter 'import'; | ||||
|   | ||||
| @@ -0,0 +1,46 @@ | ||||
| package SrvMngr::Controller::Roundcubepanel; | ||||
|  | ||||
| #---------------------------------------------------------------------- | ||||
| # heading     : System | ||||
| # description : Roundcube webmail | ||||
| # navigation  : 99999 9999 | ||||
| #---------------------------------------------------------------------- | ||||
| #---------------------------------------------------------------------- | ||||
| # name   : roundcubepanel,    method : get,   url : /roundcubepanel,     ctlact : Roundcubepanel#main | ||||
| # | ||||
| # routes : end | ||||
| #---------------------------------------------------------------------- | ||||
|  | ||||
| use strict; | ||||
| use warnings; | ||||
|  | ||||
| use Mojo::Base 'Mojolicious::Controller'; | ||||
|  | ||||
| use Locale::gettext; | ||||
| use SrvMngr::I18N; | ||||
| use SrvMngr qw(theme_list init_session); | ||||
|  | ||||
| #use SrvMngr::Model::Main; | ||||
|  | ||||
|  | ||||
| sub main { | ||||
|  | ||||
|     my $c = shift; | ||||
|     $c->app->log->info($c->log_req); | ||||
|  | ||||
|     my $title = $c->l('Roundcube Webmail'); | ||||
|     my $roundcube_url = $c->param('url'); | ||||
|     my $roundcube_height = $c->param('height') | 600; | ||||
|     $c->stash( title => $title, modul => $roundcube_url, height => $roundcube_height ); | ||||
|     $c->render(template => 'roundcube'); | ||||
|  | ||||
| } | ||||
|  | ||||
| sub getroundcubeurl { | ||||
| 	my $c = shift; | ||||
| 	my $url = shift; | ||||
| 	return "/smanager/roundcube?url=$url"; | ||||
| } | ||||
|  | ||||
|  | ||||
| 1; | ||||
| @@ -35,6 +35,19 @@ | ||||
|  | ||||
| 	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.5.0/css/flag-icon.min.css"> | ||||
| 	%= stylesheet '/css/sme-jquery-overrides.css' | ||||
| 	 | ||||
| 	<style> | ||||
| 	#busy-indicator { | ||||
| 		display: none; | ||||
| 		margin-top: 10px; | ||||
| 		font-weight: bold; | ||||
| 		color: red; | ||||
| 	} | ||||
| 	.busy { | ||||
| 		cursor: wait; /* Change the cursor to a 'wait' cursor */ | ||||
| 	} | ||||
| 	</style> | ||||
|  | ||||
|  | ||||
| </head> | ||||
|  | ||||
| @@ -94,6 +107,22 @@ | ||||
|     % } | ||||
|  | ||||
| %= javascript '/js/sme-dataTable-setup.js' | ||||
|  | ||||
| 	<script> | ||||
| 		$(document).ready(function() { | ||||
| 			// Handle form submission for any form | ||||
| 			$('form').on('submit', function(event) { | ||||
| 				// Disable the submit button | ||||
| 				$(this).find('button[type="submit"], input[type="submit"]').prop('disabled', true); | ||||
| 				// Show the busy indicator | ||||
| //				$('#busy-indicator').show(); | ||||
| 				 | ||||
| 				// Change the cursor to "wait" | ||||
| 				$('body').addClass('busy'); | ||||
| 			}); | ||||
| 		}); | ||||
| 	</script> | ||||
|  | ||||
|    | ||||
| </body> | ||||
| </html> | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
| <a href="https://mojolicious.org" target="_blank"><img src="images/sme-mojo-logo-white.png" style="position:relative;"></a> | ||||
| <font class="sme-copyright"> | ||||
| %	if ( $c->is_logged_in ) { | ||||
| 	SME Server <%= session 'releaseVersion' %> - Manager <%= $c->app->VERSION %> | ||||
| 	SME Server <%= session 'releaseVersion' %>-<%= $c->app->VERSION %> Manager II | ||||
| % } | ||||
| <br>Copyright 1999-2006 Mitel Corporation<br> | ||||
| %= session 'copyRight' | ||||
|   | ||||
| @@ -76,11 +76,17 @@ | ||||
|     % 			$actionRemove = "<a href='useraccountsd?CsrfDef=TOKEN&trt=DEL&user=" . $username . "'>" . "<button class='sme-remove-button' title=".l("REMOVE").">".l("REMOVE")."</button></a>";  | ||||
|     %		} | ||||
|     %	    } | ||||
|     %		 | ||||
|     %		my $thisdomain = session 'SystemName'; | ||||
|     %		$thisdomain .= ".".session 'DomainName'; | ||||
|  | ||||
|     	    <td class='sme-border' style="min-width:35em"> | ||||
| 				<%= $c->render_to_string(inline => $actionModify) %> | ||||
| 				<%= $c->render_to_string(inline => $actionResetPw) %> | ||||
| 				<%= $c->render_to_string(inline => $actionLock) %> | ||||
| 				<%= $c->render_to_string(inline => $actionRemove) %> | ||||
| %#				<a href="<%= "https://sme11.thereadclan.me.uk/" %>roundcube?_user=<%= $username %>"><button class="sme-email-button" title="<%= l('EMAIL') %>"><%= l('EMAIL') %></button></a> | ||||
| 				<a href="<%= "legacypanel/?url=https://".$thisdomain."/" %>roundcube?_user=<%= $username %>"><button class="sme-email-button" title="<%= l('EMAIL') %>"><%= l('EMAIL') %></button></a> | ||||
|     	    </td> | ||||
|     	</tr> | ||||
|     %    } | ||||
|   | ||||
| @@ -0,0 +1,39 @@ | ||||
| % layout 'default', title => "Sme server 2 -  roundcube"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
|  | ||||
| <div id='roundcube' class='roundcube roundcube-panel'> | ||||
|     % if ($config->{debug} == 1) { | ||||
| 		<p> | ||||
| 			%= dumper $c->current_route | ||||
| 		</p> | ||||
|     % } | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
| 			%= $c->render_to_string(inline => stash 'error')  | ||||
| 		</div> | ||||
|     %} | ||||
|     <h1> roundcube - <%=$title %></h1><br> | ||||
|     <p>If the roundcube panel does not appear after logging in, then please check your password.</p><br /> | ||||
|  | ||||
|     % my $thisdomain = session 'SystemName'; | ||||
|     % $thisdomain .= ".".session 'DomainName'; | ||||
|     % my $url = $c->stash('modul'); | ||||
|     % my $username = 'admin'; | ||||
|     % if ($url =~ /[?&]_user=([^&]+)/) { | ||||
| 	%	$username = $1; | ||||
| 	%} | ||||
| 	 | ||||
| 	<a href="<%= "https://".$thisdomain."/" %>roundcube?_user=<%= $username %>"><button class="sme-fullwindow1-button" width=20em title="<%= l('Full Window') %>"><%= l('Full Window') %></button></a> | ||||
|  | ||||
|     % my $height = $c->stash('height') | '600px'; | ||||
|     % if ($height !~ /px$/) { $height = $height.'px';} | ||||
|     % if ($url eq "") { | ||||
| 	%	$url = "https://".$thisdomain."/roundcube"; | ||||
| 	%} | ||||
| 	<object id="roundcube" class="roundcube" data="<%=$url %>" style="width:99%;height:<%= $height %>;" title="<%= $c->stash('title') %>"  type="text/html" ><%= $c->stash('title') %> not found</object> | ||||
| </div> | ||||
|  | ||||
|  | ||||
| %end | ||||
| @@ -2,7 +2,7 @@ Summary: Sme server  navigation module : manager 2 | ||||
| %define name smeserver-manager | ||||
| Name: %{name} | ||||
| %define version 11.0.0 | ||||
| %define release 22 | ||||
| %define release 26 | ||||
| Version: %{version} | ||||
| Release: %{release}%{?dist} | ||||
| License: GPL | ||||
| @@ -49,6 +49,11 @@ This RPM contributes the navigation bars for the smeserver-manager. New Mojolici | ||||
| %setup | ||||
|  | ||||
| %build | ||||
|  | ||||
| #extract the release number and drop it in to the version for SM2 footer. | ||||
| sed -i "s/our \$VERSION = '[^']*'/our \$VERSION = '%{release}'/g" root/usr/share/smanager/lib/SrvMngr.pm | ||||
|  | ||||
|  | ||||
| perl createlinks | ||||
|  | ||||
| # Force creation of potentially empty directories | ||||
| @@ -108,6 +113,18 @@ true | ||||
| %defattr(-,root,root) | ||||
|  | ||||
| %changelog | ||||
| * Fri Oct 04 2024 Brian Read <brianr@koozali.org> 11.0.0-26.sme | ||||
| - Add in email link to roundcube from user accounts [SME: 12751] | ||||
|  | ||||
| * Wed Oct 02 2024 Brian Read <brianr@koozali.org> 11.0.0-25.sme | ||||
| - Add in cursor change when save/submit pressed to indicate processing [SME: 12748] | ||||
|  | ||||
| * Wed Oct 02 2024 Brian Read <brianr@koozali.org> 11.0.0-24.sme | ||||
| - Messed up build - finger trouble [SME: 12753] | ||||
|  | ||||
| * Wed Oct 02 2024 Brian Read <brianr@koozali.org> 11.0.0-23.sme | ||||
| - Add release number to footer  [SME: 12753] | ||||
|  | ||||
| * Tue Sep 24 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-22.sme | ||||
| - fix typos, and tidy tabs [SME: 12744] | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user