You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
981 B
33 lines
981 B
package interaction_elements;
|
|
|
|
|
|
import net.yacy.cora.protocol.RequestHeader;
|
|
import de.anomic.server.serverObjects;
|
|
import de.anomic.server.serverSwitch;
|
|
|
|
public class Footer {
|
|
|
|
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader requestHeader, @SuppressWarnings("unused") final serverObjects post, final serverSwitch env) {
|
|
|
|
final serverObjects prop = new serverObjects();
|
|
|
|
prop.put("enabled_color", env.getConfig("color_tableheader", ""));
|
|
|
|
int count = 0;
|
|
|
|
prop.put("enabled_userlogonenabled", env.getConfigBool("interaction.userlogon.enabled", false) ? "1" : "0");
|
|
if (env.getConfigBool("interaction.userlogon.enabled", false)) count++;
|
|
|
|
if (count > 0) {
|
|
prop.put("enabled", "1");
|
|
prop.put("enabled_userlogonenabled_ratio", Math.round(100/count)-1);
|
|
|
|
} else {
|
|
prop.put("enabled", "0");
|
|
}
|
|
|
|
|
|
return prop;
|
|
}
|
|
}
|